Move Kotlin internal actions to Internal menu and unify modes (KT-23975)
#KT-23975 Fixed
This commit is contained in:
@@ -137,7 +137,6 @@ fun Project.runIdeTask(name: String, ideaPluginDir: File, ideaSandboxDir: File,
|
||||
"-Dapple.awt.graphics.UseQuartz=true",
|
||||
"-Dsun.io.useCanonCaches=false",
|
||||
"-Dplugin.path=${ideaPluginDir.absolutePath}",
|
||||
"-Dkotlin.internal.mode.enabled=true",
|
||||
"-Didea.additional.classpath=../idea-kotlin-runtime/kotlin-runtime.jar,../idea-kotlin-runtime/kotlin-reflect.jar"
|
||||
)
|
||||
|
||||
|
||||
+7
-11
@@ -16,19 +16,15 @@
|
||||
|
||||
package org.jetbrains.kotlin.idea.actions.internal
|
||||
|
||||
import com.intellij.ide.util.PropertiesComponent
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
|
||||
class KotlinInternalMode {
|
||||
companion object Instance {
|
||||
private val INTERNAL_MODE_PROPERTY = "kotlin.internal.mode.enabled"
|
||||
|
||||
var enabled: Boolean
|
||||
get() = PropertiesComponent.getInstance()!!.getBoolean(
|
||||
INTERNAL_MODE_PROPERTY,
|
||||
System.getProperty(INTERNAL_MODE_PROPERTY) == "true"
|
||||
)
|
||||
set(value) {
|
||||
PropertiesComponent.getInstance()!!.setValue(INTERNAL_MODE_PROPERTY, value.toString())
|
||||
}
|
||||
@Deprecated(
|
||||
"Same as Application.isInternal()",
|
||||
ReplaceWith("com.intellij.openapi.application.ApplicationManager.getApplication().isInternal")
|
||||
)
|
||||
val enabled: Boolean
|
||||
get() = ApplicationManager.getApplication().isInternal
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,6 @@ class DebugInfoAnnotator : Annotator {
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
val isDebugInfoEnabled: Boolean
|
||||
get() = KotlinInternalMode.enabled
|
||||
}
|
||||
|
||||
-6
@@ -47,8 +47,6 @@ import java.util.*
|
||||
import kotlin.reflect.full.findAnnotation
|
||||
|
||||
abstract class KotlinLightCodeInsightFixtureTestCase : KotlinLightCodeInsightFixtureTestCaseBase() {
|
||||
private var kotlinInternalModeOriginalValue = false
|
||||
|
||||
private val exceptions = ArrayList<Throwable>()
|
||||
|
||||
protected val module: Module get() = myFixture.module
|
||||
@@ -60,9 +58,6 @@ abstract class KotlinLightCodeInsightFixtureTestCase : KotlinLightCodeInsightFix
|
||||
(StartupManager.getInstance(project) as StartupManagerImpl).runPostStartupActivities()
|
||||
VfsRootAccess.allowRootAccess(KotlinTestUtils.getHomeDirectory())
|
||||
|
||||
kotlinInternalModeOriginalValue = KotlinInternalMode.enabled
|
||||
KotlinInternalMode.enabled = true
|
||||
|
||||
project.getComponent(EditorTracker::class.java)?.projectOpened()
|
||||
|
||||
invalidateLibraryCache(project)
|
||||
@@ -81,7 +76,6 @@ abstract class KotlinLightCodeInsightFixtureTestCase : KotlinLightCodeInsightFix
|
||||
override fun tearDown() {
|
||||
LoggedErrorProcessor.restoreDefaultProcessor()
|
||||
|
||||
KotlinInternalMode.enabled = kotlinInternalModeOriginalValue
|
||||
VfsRootAccess.disallowRootAccess(KotlinTestUtils.getHomeDirectory())
|
||||
|
||||
doKotlinTearDown(project) {
|
||||
|
||||
-6
@@ -47,8 +47,6 @@ import java.util.*
|
||||
import kotlin.reflect.full.findAnnotation
|
||||
|
||||
abstract class KotlinLightCodeInsightFixtureTestCase : KotlinLightCodeInsightFixtureTestCaseBase() {
|
||||
private var kotlinInternalModeOriginalValue = false
|
||||
|
||||
private val exceptions = ArrayList<Throwable>()
|
||||
|
||||
protected val module: Module get() = myFixture.module
|
||||
@@ -60,9 +58,6 @@ abstract class KotlinLightCodeInsightFixtureTestCase : KotlinLightCodeInsightFix
|
||||
(StartupManager.getInstance(project) as StartupManagerImpl).runPostStartupActivities()
|
||||
VfsRootAccess.allowRootAccess(KotlinTestUtils.getHomeDirectory())
|
||||
|
||||
kotlinInternalModeOriginalValue = KotlinInternalMode.enabled
|
||||
KotlinInternalMode.enabled = true
|
||||
|
||||
project.getComponent(EditorTracker::class.java)?.projectOpened()
|
||||
|
||||
invalidateLibraryCache(project)
|
||||
@@ -80,7 +75,6 @@ abstract class KotlinLightCodeInsightFixtureTestCase : KotlinLightCodeInsightFix
|
||||
override fun tearDown() {
|
||||
LoggedErrorProcessor.restoreDefaultProcessor()
|
||||
|
||||
KotlinInternalMode.enabled = kotlinInternalModeOriginalValue
|
||||
VfsRootAccess.disallowRootAccess(KotlinTestUtils.getHomeDirectory())
|
||||
|
||||
doKotlinTearDown(project) {
|
||||
|
||||
-6
@@ -26,20 +26,14 @@ import org.jetbrains.kotlin.test.TestMetadata
|
||||
import kotlin.reflect.full.findAnnotation
|
||||
|
||||
abstract class KotlinLightPlatformCodeInsightFixtureTestCase: LightPlatformCodeInsightFixtureTestCase() {
|
||||
private var kotlinInternalModeOriginalValue: Boolean = false
|
||||
|
||||
override fun setUp() {
|
||||
super.setUp()
|
||||
(StartupManager.getInstance(project) as StartupManagerImpl).runPostStartupActivities()
|
||||
VfsRootAccess.allowRootAccess(KotlinTestUtils.getHomeDirectory())
|
||||
invalidateLibraryCache(project)
|
||||
|
||||
kotlinInternalModeOriginalValue = KotlinInternalMode.enabled
|
||||
KotlinInternalMode.enabled = true
|
||||
}
|
||||
|
||||
override fun tearDown() {
|
||||
KotlinInternalMode.enabled = kotlinInternalModeOriginalValue
|
||||
VfsRootAccess.disallowRootAccess(KotlinTestUtils.getHomeDirectory())
|
||||
|
||||
doKotlinTearDown(project) {
|
||||
|
||||
@@ -123,51 +123,44 @@
|
||||
<add-to-group group-id="KotlinToolsGroup" anchor="last"/>
|
||||
</action>
|
||||
|
||||
<action id="KotlinInternalMode" class="org.jetbrains.kotlin.idea.actions.internal.KotlinInternalModeToggleAction">
|
||||
<add-to-group group-id="KotlinToolsGroup" anchor="last"/>
|
||||
</action>
|
||||
<group id="InternalKotlin" text="IDEA Internal Actions" internal="true">
|
||||
<separator/>
|
||||
<group id="KotlinInternalGroup" text="Kotlin" popup="true">
|
||||
<group id="KotlinCompletionBenchmarkGroup" popup="true" text="Benchmark completion">
|
||||
<action id="TopLevelCompletionBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.TopLevelCompletionBenchmarkAction"
|
||||
text="Top-level scenario"/>
|
||||
|
||||
<action id="LocalCompletionBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.LocalCompletionBenchmarkAction"
|
||||
text="Local scenario"/>
|
||||
</group>
|
||||
|
||||
<action id="HighlightingBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.HighlightingBenchmarkAction"
|
||||
text="Benchmark highlighting"/>
|
||||
|
||||
<group id="KotlinInternalGroup" popup="true" text="Internal" icon="/general/balloonWarning.png"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.KotlinInternalActionGroup">
|
||||
<action id="CacheResetOnProcessCanceledToggleAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.CacheResetOnProcessCanceledToggleAction"
|
||||
text="Reset caches on ProcessCanceledException"/>
|
||||
|
||||
<group id="KotlinCompletionBenchmarkGroup" popup="true" text="Benchmark completion"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.KotlinInternalActionGroup" >
|
||||
<action id="CheckComponentsUsageSearchAction" class="org.jetbrains.kotlin.idea.actions.internal.CheckComponentsUsageSearchAction"
|
||||
text="Check Component Functions Usage Search"/>
|
||||
|
||||
<action id="TopLevelCompletionBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.TopLevelCompletionBenchmarkAction"
|
||||
text="Top-level scenario"/>
|
||||
<action id="FindImplicitNothingAction" class="org.jetbrains.kotlin.idea.actions.internal.FindImplicitNothingAction"
|
||||
text="Find Implicit Nothing Calls"/>
|
||||
|
||||
<action id="LocalCompletionBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.LocalCompletionBenchmarkAction"
|
||||
text="Local scenario"/>
|
||||
<action id="PrintOutNotPropertyMatches" class="org.jetbrains.kotlin.idea.actions.internal.SearchNotPropertyCandidatesAction"
|
||||
text="Search Not Property Candidates"/>
|
||||
|
||||
<action id="StoredExceptionsThrowToggleAction" class="org.jetbrains.kotlin.idea.actions.internal.StoredExceptionsThrowToggleAction"
|
||||
text="Throw cached PCE"/>
|
||||
</group>
|
||||
<separator/>
|
||||
|
||||
<action id="HighlightingBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.HighlightingBenchmarkAction"
|
||||
text="Benchmark highlighting"/>
|
||||
|
||||
<action id="CacheResetOnProcessCanceledToggleAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.CacheResetOnProcessCanceledToggleAction"
|
||||
text="Reset caches on ProcessCanceledException"/>
|
||||
|
||||
<action id="CheckComponentsUsageSearchAction" class="org.jetbrains.kotlin.idea.actions.internal.CheckComponentsUsageSearchAction"
|
||||
text="Check Component Functions Usage Search"/>
|
||||
|
||||
<action id="FindImplicitNothingAction" class="org.jetbrains.kotlin.idea.actions.internal.FindImplicitNothingAction"
|
||||
text="Find Implicit Nothing Calls"/>
|
||||
|
||||
<action id="PrintOutNotPropertyMatches" class="org.jetbrains.kotlin.idea.actions.internal.SearchNotPropertyCandidatesAction"
|
||||
text="Search Not Property Candidates"/>
|
||||
|
||||
<action id="StoredExceptionsThrowToggleAction" class="org.jetbrains.kotlin.idea.actions.internal.StoredExceptionsThrowToggleAction"
|
||||
text="Throw cached PCE"/>
|
||||
|
||||
<add-to-group group-id="KotlinToolsGroup" anchor="last"/>
|
||||
<add-to-group group-id="Internal" anchor="last"/>
|
||||
</group>
|
||||
|
||||
|
||||
<action id="ExtractFunctionToScope" class="org.jetbrains.kotlin.idea.refactoring.introduce.extractFunction.ExtractFunctionToScopeAction"
|
||||
text="Function to _Scope...">
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="control alt shift M"/>
|
||||
|
||||
@@ -82,9 +82,9 @@
|
||||
|
||||
<group id = "ConvertJavaToKotlinGroup">
|
||||
<separator/>
|
||||
<action id="ConvertJavaToKotlin" class="org.jetbrains.kotlin.idea.actions.JavaToKotlinAction"
|
||||
text="Convert Java File to Kotlin File">
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="control alt shift K"/>
|
||||
<action id="ConvertJavaToKotlin" class="org.jetbrains.kotlin.idea.actions.JavaToKotlinAction"
|
||||
text="Convert Java File to Kotlin File">
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="control alt shift K"/>
|
||||
</action>
|
||||
<add-to-group group-id="CodeMenu" anchor="last"/>
|
||||
<add-to-group group-id="ProjectViewPopupMenu" anchor="last"/>
|
||||
@@ -123,51 +123,44 @@
|
||||
<add-to-group group-id="KotlinToolsGroup" anchor="last"/>
|
||||
</action>
|
||||
|
||||
<action id="KotlinInternalMode" class="org.jetbrains.kotlin.idea.actions.internal.KotlinInternalModeToggleAction">
|
||||
<add-to-group group-id="KotlinToolsGroup" anchor="last"/>
|
||||
</action>
|
||||
<group id="InternalKotlin" text="IDEA Internal Actions" internal="true">
|
||||
<separator/>
|
||||
<group id="KotlinInternalGroup" text="Kotlin" popup="true">
|
||||
<group id="KotlinCompletionBenchmarkGroup" popup="true" text="Benchmark completion">
|
||||
<action id="TopLevelCompletionBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.TopLevelCompletionBenchmarkAction"
|
||||
text="Top-level scenario"/>
|
||||
|
||||
<action id="LocalCompletionBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.LocalCompletionBenchmarkAction"
|
||||
text="Local scenario"/>
|
||||
</group>
|
||||
|
||||
<action id="HighlightingBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.HighlightingBenchmarkAction"
|
||||
text="Benchmark highlighting"/>
|
||||
|
||||
<group id="KotlinInternalGroup" popup="true" text="Internal" icon="/general/balloonWarning.png"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.KotlinInternalActionGroup">
|
||||
<action id="CacheResetOnProcessCanceledToggleAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.CacheResetOnProcessCanceledToggleAction"
|
||||
text="Reset caches on ProcessCanceledException"/>
|
||||
|
||||
<group id="KotlinCompletionBenchmarkGroup" popup="true" text="Benchmark completion"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.KotlinInternalActionGroup" >
|
||||
<action id="CheckComponentsUsageSearchAction" class="org.jetbrains.kotlin.idea.actions.internal.CheckComponentsUsageSearchAction"
|
||||
text="Check Component Functions Usage Search"/>
|
||||
|
||||
<action id="TopLevelCompletionBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.TopLevelCompletionBenchmarkAction"
|
||||
text="Top-level scenario"/>
|
||||
<action id="FindImplicitNothingAction" class="org.jetbrains.kotlin.idea.actions.internal.FindImplicitNothingAction"
|
||||
text="Find Implicit Nothing Calls"/>
|
||||
|
||||
<action id="LocalCompletionBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.LocalCompletionBenchmarkAction"
|
||||
text="Local scenario"/>
|
||||
<action id="PrintOutNotPropertyMatches" class="org.jetbrains.kotlin.idea.actions.internal.SearchNotPropertyCandidatesAction"
|
||||
text="Search Not Property Candidates"/>
|
||||
|
||||
<action id="StoredExceptionsThrowToggleAction" class="org.jetbrains.kotlin.idea.actions.internal.StoredExceptionsThrowToggleAction"
|
||||
text="Throw cached PCE"/>
|
||||
</group>
|
||||
<separator/>
|
||||
|
||||
<action id="HighlightingBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.HighlightingBenchmarkAction"
|
||||
text="Benchmark highlighting"/>
|
||||
|
||||
<action id="CacheResetOnProcessCanceledToggleAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.CacheResetOnProcessCanceledToggleAction"
|
||||
text="Reset caches on ProcessCanceledException"/>
|
||||
|
||||
<action id="CheckComponentsUsageSearchAction" class="org.jetbrains.kotlin.idea.actions.internal.CheckComponentsUsageSearchAction"
|
||||
text="Check Component Functions Usage Search"/>
|
||||
|
||||
<action id="FindImplicitNothingAction" class="org.jetbrains.kotlin.idea.actions.internal.FindImplicitNothingAction"
|
||||
text="Find Implicit Nothing Calls"/>
|
||||
|
||||
<action id="PrintOutNotPropertyMatches" class="org.jetbrains.kotlin.idea.actions.internal.SearchNotPropertyCandidatesAction"
|
||||
text="Search Not Property Candidates"/>
|
||||
|
||||
<action id="StoredExceptionsThrowToggleAction" class="org.jetbrains.kotlin.idea.actions.internal.StoredExceptionsThrowToggleAction"
|
||||
text="Throw cached PCE"/>
|
||||
|
||||
<add-to-group group-id="KotlinToolsGroup" anchor="last"/>
|
||||
<add-to-group group-id="Internal" anchor="last"/>
|
||||
</group>
|
||||
|
||||
|
||||
<action id="ExtractFunctionToScope" class="org.jetbrains.kotlin.idea.refactoring.introduce.extractFunction.ExtractFunctionToScopeAction"
|
||||
text="Function to _Scope...">
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="control alt shift M"/>
|
||||
|
||||
@@ -82,9 +82,9 @@
|
||||
|
||||
<group id = "ConvertJavaToKotlinGroup">
|
||||
<separator/>
|
||||
<action id="ConvertJavaToKotlin" class="org.jetbrains.kotlin.idea.actions.JavaToKotlinAction"
|
||||
text="Convert Java File to Kotlin File">
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="control alt shift K"/>
|
||||
<action id="ConvertJavaToKotlin" class="org.jetbrains.kotlin.idea.actions.JavaToKotlinAction"
|
||||
text="Convert Java File to Kotlin File">
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="control alt shift K"/>
|
||||
</action>
|
||||
<add-to-group group-id="CodeMenu" anchor="last"/>
|
||||
<add-to-group group-id="ProjectViewPopupMenu" anchor="last"/>
|
||||
@@ -123,51 +123,44 @@
|
||||
<add-to-group group-id="KotlinToolsGroup" anchor="last"/>
|
||||
</action>
|
||||
|
||||
<action id="KotlinInternalMode" class="org.jetbrains.kotlin.idea.actions.internal.KotlinInternalModeToggleAction">
|
||||
<add-to-group group-id="KotlinToolsGroup" anchor="last"/>
|
||||
</action>
|
||||
<group id="InternalKotlin" text="IDEA Internal Actions" internal="true">
|
||||
<separator/>
|
||||
<group id="KotlinInternalGroup" text="Kotlin" popup="true">
|
||||
<group id="KotlinCompletionBenchmarkGroup" popup="true" text="Benchmark completion">
|
||||
<action id="TopLevelCompletionBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.TopLevelCompletionBenchmarkAction"
|
||||
text="Top-level scenario"/>
|
||||
|
||||
<action id="LocalCompletionBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.LocalCompletionBenchmarkAction"
|
||||
text="Local scenario"/>
|
||||
</group>
|
||||
|
||||
<action id="HighlightingBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.HighlightingBenchmarkAction"
|
||||
text="Benchmark highlighting"/>
|
||||
|
||||
<group id="KotlinInternalGroup" popup="true" text="Internal" icon="/general/balloonWarning.png"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.KotlinInternalActionGroup">
|
||||
<action id="CacheResetOnProcessCanceledToggleAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.CacheResetOnProcessCanceledToggleAction"
|
||||
text="Reset caches on ProcessCanceledException"/>
|
||||
|
||||
<group id="KotlinCompletionBenchmarkGroup" popup="true" text="Benchmark completion"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.KotlinInternalActionGroup" >
|
||||
<action id="CheckComponentsUsageSearchAction" class="org.jetbrains.kotlin.idea.actions.internal.CheckComponentsUsageSearchAction"
|
||||
text="Check Component Functions Usage Search"/>
|
||||
|
||||
<action id="TopLevelCompletionBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.TopLevelCompletionBenchmarkAction"
|
||||
text="Top-level scenario"/>
|
||||
<action id="FindImplicitNothingAction" class="org.jetbrains.kotlin.idea.actions.internal.FindImplicitNothingAction"
|
||||
text="Find Implicit Nothing Calls"/>
|
||||
|
||||
<action id="LocalCompletionBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.LocalCompletionBenchmarkAction"
|
||||
text="Local scenario"/>
|
||||
<action id="PrintOutNotPropertyMatches" class="org.jetbrains.kotlin.idea.actions.internal.SearchNotPropertyCandidatesAction"
|
||||
text="Search Not Property Candidates"/>
|
||||
|
||||
<action id="StoredExceptionsThrowToggleAction" class="org.jetbrains.kotlin.idea.actions.internal.StoredExceptionsThrowToggleAction"
|
||||
text="Throw cached PCE"/>
|
||||
</group>
|
||||
<separator/>
|
||||
|
||||
<action id="HighlightingBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.HighlightingBenchmarkAction"
|
||||
text="Benchmark highlighting"/>
|
||||
|
||||
<action id="CacheResetOnProcessCanceledToggleAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.CacheResetOnProcessCanceledToggleAction"
|
||||
text="Reset caches on ProcessCanceledException"/>
|
||||
|
||||
<action id="CheckComponentsUsageSearchAction" class="org.jetbrains.kotlin.idea.actions.internal.CheckComponentsUsageSearchAction"
|
||||
text="Check Component Functions Usage Search"/>
|
||||
|
||||
<action id="FindImplicitNothingAction" class="org.jetbrains.kotlin.idea.actions.internal.FindImplicitNothingAction"
|
||||
text="Find Implicit Nothing Calls"/>
|
||||
|
||||
<action id="PrintOutNotPropertyMatches" class="org.jetbrains.kotlin.idea.actions.internal.SearchNotPropertyCandidatesAction"
|
||||
text="Search Not Property Candidates"/>
|
||||
|
||||
<action id="StoredExceptionsThrowToggleAction" class="org.jetbrains.kotlin.idea.actions.internal.StoredExceptionsThrowToggleAction"
|
||||
text="Throw cached PCE"/>
|
||||
|
||||
<add-to-group group-id="KotlinToolsGroup" anchor="last"/>
|
||||
<add-to-group group-id="Internal" anchor="last"/>
|
||||
</group>
|
||||
|
||||
|
||||
<action id="ExtractFunctionToScope" class="org.jetbrains.kotlin.idea.refactoring.introduce.extractFunction.ExtractFunctionToScopeAction"
|
||||
text="Function to _Scope...">
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="control alt shift M"/>
|
||||
|
||||
@@ -83,9 +83,9 @@
|
||||
|
||||
<group id = "ConvertJavaToKotlinGroup">
|
||||
<separator/>
|
||||
<action id="ConvertJavaToKotlin" class="org.jetbrains.kotlin.idea.actions.JavaToKotlinAction"
|
||||
text="Convert Java File to Kotlin File">
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="control alt shift K"/>
|
||||
<action id="ConvertJavaToKotlin" class="org.jetbrains.kotlin.idea.actions.JavaToKotlinAction"
|
||||
text="Convert Java File to Kotlin File">
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="control alt shift K"/>
|
||||
</action>
|
||||
<add-to-group group-id="CodeMenu" anchor="last"/>
|
||||
<add-to-group group-id="ProjectViewPopupMenu" anchor="last"/>
|
||||
@@ -124,51 +124,44 @@
|
||||
<add-to-group group-id="KotlinToolsGroup" anchor="last"/>
|
||||
</action>
|
||||
|
||||
<action id="KotlinInternalMode" class="org.jetbrains.kotlin.idea.actions.internal.KotlinInternalModeToggleAction">
|
||||
<add-to-group group-id="KotlinToolsGroup" anchor="last"/>
|
||||
</action>
|
||||
<group id="InternalKotlin" text="IDEA Internal Actions" internal="true">
|
||||
<separator/>
|
||||
<group id="KotlinInternalGroup" text="Kotlin" popup="true">
|
||||
<group id="KotlinCompletionBenchmarkGroup" popup="true" text="Benchmark completion">
|
||||
<action id="TopLevelCompletionBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.TopLevelCompletionBenchmarkAction"
|
||||
text="Top-level scenario"/>
|
||||
|
||||
<action id="LocalCompletionBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.LocalCompletionBenchmarkAction"
|
||||
text="Local scenario"/>
|
||||
</group>
|
||||
|
||||
<action id="HighlightingBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.HighlightingBenchmarkAction"
|
||||
text="Benchmark highlighting"/>
|
||||
|
||||
<group id="KotlinInternalGroup" popup="true" text="Internal" icon="/general/balloonWarning.png"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.KotlinInternalActionGroup">
|
||||
<action id="CacheResetOnProcessCanceledToggleAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.CacheResetOnProcessCanceledToggleAction"
|
||||
text="Reset caches on ProcessCanceledException"/>
|
||||
|
||||
<group id="KotlinCompletionBenchmarkGroup" popup="true" text="Benchmark completion"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.KotlinInternalActionGroup" >
|
||||
<action id="CheckComponentsUsageSearchAction" class="org.jetbrains.kotlin.idea.actions.internal.CheckComponentsUsageSearchAction"
|
||||
text="Check Component Functions Usage Search"/>
|
||||
|
||||
<action id="TopLevelCompletionBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.TopLevelCompletionBenchmarkAction"
|
||||
text="Top-level scenario"/>
|
||||
<action id="FindImplicitNothingAction" class="org.jetbrains.kotlin.idea.actions.internal.FindImplicitNothingAction"
|
||||
text="Find Implicit Nothing Calls"/>
|
||||
|
||||
<action id="LocalCompletionBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.LocalCompletionBenchmarkAction"
|
||||
text="Local scenario"/>
|
||||
<action id="PrintOutNotPropertyMatches" class="org.jetbrains.kotlin.idea.actions.internal.SearchNotPropertyCandidatesAction"
|
||||
text="Search Not Property Candidates"/>
|
||||
|
||||
<action id="StoredExceptionsThrowToggleAction" class="org.jetbrains.kotlin.idea.actions.internal.StoredExceptionsThrowToggleAction"
|
||||
text="Throw cached PCE"/>
|
||||
</group>
|
||||
<separator/>
|
||||
|
||||
<action id="HighlightingBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.HighlightingBenchmarkAction"
|
||||
text="Benchmark highlighting"/>
|
||||
|
||||
<action id="CacheResetOnProcessCanceledToggleAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.CacheResetOnProcessCanceledToggleAction"
|
||||
text="Reset caches on ProcessCanceledException"/>
|
||||
|
||||
<action id="CheckComponentsUsageSearchAction" class="org.jetbrains.kotlin.idea.actions.internal.CheckComponentsUsageSearchAction"
|
||||
text="Check Component Functions Usage Search"/>
|
||||
|
||||
<action id="FindImplicitNothingAction" class="org.jetbrains.kotlin.idea.actions.internal.FindImplicitNothingAction"
|
||||
text="Find Implicit Nothing Calls"/>
|
||||
|
||||
<action id="PrintOutNotPropertyMatches" class="org.jetbrains.kotlin.idea.actions.internal.SearchNotPropertyCandidatesAction"
|
||||
text="Search Not Property Candidates"/>
|
||||
|
||||
<action id="StoredExceptionsThrowToggleAction" class="org.jetbrains.kotlin.idea.actions.internal.StoredExceptionsThrowToggleAction"
|
||||
text="Throw cached PCE"/>
|
||||
|
||||
<add-to-group group-id="KotlinToolsGroup" anchor="last"/>
|
||||
<add-to-group group-id="Internal" anchor="last"/>
|
||||
</group>
|
||||
|
||||
|
||||
<action id="ExtractFunctionToScope" class="org.jetbrains.kotlin.idea.refactoring.introduce.extractFunction.ExtractFunctionToScopeAction"
|
||||
text="Function to _Scope...">
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="control alt shift M"/>
|
||||
|
||||
@@ -82,9 +82,9 @@
|
||||
|
||||
<group id = "ConvertJavaToKotlinGroup">
|
||||
<separator/>
|
||||
<action id="ConvertJavaToKotlin" class="org.jetbrains.kotlin.idea.actions.JavaToKotlinAction"
|
||||
text="Convert Java File to Kotlin File">
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="control alt shift K"/>
|
||||
<action id="ConvertJavaToKotlin" class="org.jetbrains.kotlin.idea.actions.JavaToKotlinAction"
|
||||
text="Convert Java File to Kotlin File">
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="control alt shift K"/>
|
||||
</action>
|
||||
<add-to-group group-id="CodeMenu" anchor="last"/>
|
||||
<add-to-group group-id="ProjectViewPopupMenu" anchor="last"/>
|
||||
@@ -123,51 +123,44 @@
|
||||
<add-to-group group-id="KotlinToolsGroup" anchor="last"/>
|
||||
</action>
|
||||
|
||||
<action id="KotlinInternalMode" class="org.jetbrains.kotlin.idea.actions.internal.KotlinInternalModeToggleAction">
|
||||
<add-to-group group-id="KotlinToolsGroup" anchor="last"/>
|
||||
</action>
|
||||
<group id="InternalKotlin" text="IDEA Internal Actions" internal="true">
|
||||
<separator/>
|
||||
<group id="KotlinInternalGroup" text="Kotlin" popup="true">
|
||||
<group id="KotlinCompletionBenchmarkGroup" popup="true" text="Benchmark completion">
|
||||
<action id="TopLevelCompletionBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.TopLevelCompletionBenchmarkAction"
|
||||
text="Top-level scenario"/>
|
||||
|
||||
<action id="LocalCompletionBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.LocalCompletionBenchmarkAction"
|
||||
text="Local scenario"/>
|
||||
</group>
|
||||
|
||||
<action id="HighlightingBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.HighlightingBenchmarkAction"
|
||||
text="Benchmark highlighting"/>
|
||||
|
||||
<group id="KotlinInternalGroup" popup="true" text="Internal" icon="/general/balloonWarning.png"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.KotlinInternalActionGroup">
|
||||
<action id="CacheResetOnProcessCanceledToggleAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.CacheResetOnProcessCanceledToggleAction"
|
||||
text="Reset caches on ProcessCanceledException"/>
|
||||
|
||||
<group id="KotlinCompletionBenchmarkGroup" popup="true" text="Benchmark completion"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.KotlinInternalActionGroup" >
|
||||
<action id="CheckComponentsUsageSearchAction" class="org.jetbrains.kotlin.idea.actions.internal.CheckComponentsUsageSearchAction"
|
||||
text="Check Component Functions Usage Search"/>
|
||||
|
||||
<action id="TopLevelCompletionBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.TopLevelCompletionBenchmarkAction"
|
||||
text="Top-level scenario"/>
|
||||
<action id="FindImplicitNothingAction" class="org.jetbrains.kotlin.idea.actions.internal.FindImplicitNothingAction"
|
||||
text="Find Implicit Nothing Calls"/>
|
||||
|
||||
<action id="LocalCompletionBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.LocalCompletionBenchmarkAction"
|
||||
text="Local scenario"/>
|
||||
<action id="PrintOutNotPropertyMatches" class="org.jetbrains.kotlin.idea.actions.internal.SearchNotPropertyCandidatesAction"
|
||||
text="Search Not Property Candidates"/>
|
||||
|
||||
<action id="StoredExceptionsThrowToggleAction" class="org.jetbrains.kotlin.idea.actions.internal.StoredExceptionsThrowToggleAction"
|
||||
text="Throw cached PCE"/>
|
||||
</group>
|
||||
<separator/>
|
||||
|
||||
<action id="HighlightingBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.HighlightingBenchmarkAction"
|
||||
text="Benchmark highlighting"/>
|
||||
|
||||
<action id="CacheResetOnProcessCanceledToggleAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.CacheResetOnProcessCanceledToggleAction"
|
||||
text="Reset caches on ProcessCanceledException"/>
|
||||
|
||||
<action id="CheckComponentsUsageSearchAction" class="org.jetbrains.kotlin.idea.actions.internal.CheckComponentsUsageSearchAction"
|
||||
text="Check Component Functions Usage Search"/>
|
||||
|
||||
<action id="FindImplicitNothingAction" class="org.jetbrains.kotlin.idea.actions.internal.FindImplicitNothingAction"
|
||||
text="Find Implicit Nothing Calls"/>
|
||||
|
||||
<action id="PrintOutNotPropertyMatches" class="org.jetbrains.kotlin.idea.actions.internal.SearchNotPropertyCandidatesAction"
|
||||
text="Search Not Property Candidates"/>
|
||||
|
||||
<action id="StoredExceptionsThrowToggleAction" class="org.jetbrains.kotlin.idea.actions.internal.StoredExceptionsThrowToggleAction"
|
||||
text="Throw cached PCE"/>
|
||||
|
||||
<add-to-group group-id="KotlinToolsGroup" anchor="last"/>
|
||||
<add-to-group group-id="Internal" anchor="last"/>
|
||||
</group>
|
||||
|
||||
|
||||
<action id="ExtractFunctionToScope" class="org.jetbrains.kotlin.idea.refactoring.introduce.extractFunction.ExtractFunctionToScopeAction"
|
||||
text="Function to _Scope...">
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="control alt shift M"/>
|
||||
|
||||
@@ -82,9 +82,9 @@
|
||||
|
||||
<group id = "ConvertJavaToKotlinGroup">
|
||||
<separator/>
|
||||
<action id="ConvertJavaToKotlin" class="org.jetbrains.kotlin.idea.actions.JavaToKotlinAction"
|
||||
text="Convert Java File to Kotlin File">
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="control alt shift K"/>
|
||||
<action id="ConvertJavaToKotlin" class="org.jetbrains.kotlin.idea.actions.JavaToKotlinAction"
|
||||
text="Convert Java File to Kotlin File">
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="control alt shift K"/>
|
||||
</action>
|
||||
<add-to-group group-id="CodeMenu" anchor="last"/>
|
||||
<add-to-group group-id="ProjectViewPopupMenu" anchor="last"/>
|
||||
@@ -123,51 +123,44 @@
|
||||
<add-to-group group-id="KotlinToolsGroup" anchor="last"/>
|
||||
</action>
|
||||
|
||||
<action id="KotlinInternalMode" class="org.jetbrains.kotlin.idea.actions.internal.KotlinInternalModeToggleAction">
|
||||
<add-to-group group-id="KotlinToolsGroup" anchor="last"/>
|
||||
</action>
|
||||
<group id="InternalKotlin" text="IDEA Internal Actions" internal="true">
|
||||
<separator/>
|
||||
<group id="KotlinInternalGroup" text="Kotlin" popup="true">
|
||||
<group id="KotlinCompletionBenchmarkGroup" popup="true" text="Benchmark completion">
|
||||
<action id="TopLevelCompletionBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.TopLevelCompletionBenchmarkAction"
|
||||
text="Top-level scenario"/>
|
||||
|
||||
<action id="LocalCompletionBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.LocalCompletionBenchmarkAction"
|
||||
text="Local scenario"/>
|
||||
</group>
|
||||
|
||||
<action id="HighlightingBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.HighlightingBenchmarkAction"
|
||||
text="Benchmark highlighting"/>
|
||||
|
||||
<group id="KotlinInternalGroup" popup="true" text="Internal" icon="/general/balloonWarning.png"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.KotlinInternalActionGroup">
|
||||
<action id="CacheResetOnProcessCanceledToggleAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.CacheResetOnProcessCanceledToggleAction"
|
||||
text="Reset caches on ProcessCanceledException"/>
|
||||
|
||||
<group id="KotlinCompletionBenchmarkGroup" popup="true" text="Benchmark completion"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.KotlinInternalActionGroup" >
|
||||
<action id="CheckComponentsUsageSearchAction" class="org.jetbrains.kotlin.idea.actions.internal.CheckComponentsUsageSearchAction"
|
||||
text="Check Component Functions Usage Search"/>
|
||||
|
||||
<action id="TopLevelCompletionBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.TopLevelCompletionBenchmarkAction"
|
||||
text="Top-level scenario"/>
|
||||
<action id="FindImplicitNothingAction" class="org.jetbrains.kotlin.idea.actions.internal.FindImplicitNothingAction"
|
||||
text="Find Implicit Nothing Calls"/>
|
||||
|
||||
<action id="LocalCompletionBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.LocalCompletionBenchmarkAction"
|
||||
text="Local scenario"/>
|
||||
<action id="PrintOutNotPropertyMatches" class="org.jetbrains.kotlin.idea.actions.internal.SearchNotPropertyCandidatesAction"
|
||||
text="Search Not Property Candidates"/>
|
||||
|
||||
<action id="StoredExceptionsThrowToggleAction" class="org.jetbrains.kotlin.idea.actions.internal.StoredExceptionsThrowToggleAction"
|
||||
text="Throw cached PCE"/>
|
||||
</group>
|
||||
<separator/>
|
||||
|
||||
<action id="HighlightingBenchmarkAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.benchmark.HighlightingBenchmarkAction"
|
||||
text="Benchmark highlighting"/>
|
||||
|
||||
<action id="CacheResetOnProcessCanceledToggleAction"
|
||||
class="org.jetbrains.kotlin.idea.actions.internal.CacheResetOnProcessCanceledToggleAction"
|
||||
text="Reset caches on ProcessCanceledException"/>
|
||||
|
||||
<action id="CheckComponentsUsageSearchAction" class="org.jetbrains.kotlin.idea.actions.internal.CheckComponentsUsageSearchAction"
|
||||
text="Check Component Functions Usage Search"/>
|
||||
|
||||
<action id="FindImplicitNothingAction" class="org.jetbrains.kotlin.idea.actions.internal.FindImplicitNothingAction"
|
||||
text="Find Implicit Nothing Calls"/>
|
||||
|
||||
<action id="PrintOutNotPropertyMatches" class="org.jetbrains.kotlin.idea.actions.internal.SearchNotPropertyCandidatesAction"
|
||||
text="Search Not Property Candidates"/>
|
||||
|
||||
<action id="StoredExceptionsThrowToggleAction" class="org.jetbrains.kotlin.idea.actions.internal.StoredExceptionsThrowToggleAction"
|
||||
text="Throw cached PCE"/>
|
||||
|
||||
<add-to-group group-id="KotlinToolsGroup" anchor="last"/>
|
||||
<add-to-group group-id="Internal" anchor="last"/>
|
||||
</group>
|
||||
|
||||
|
||||
<action id="ExtractFunctionToScope" class="org.jetbrains.kotlin.idea.refactoring.introduce.extractFunction.ExtractFunctionToScopeAction"
|
||||
text="Function to _Scope...">
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="control alt shift M"/>
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2017 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.kotlin.idea.actions.internal
|
||||
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent
|
||||
import com.intellij.openapi.actionSystem.DefaultActionGroup
|
||||
|
||||
class KotlinInternalActionGroup : DefaultActionGroup() {
|
||||
|
||||
override fun update(e: AnActionEvent) {
|
||||
super.update(e)
|
||||
e.presentation.isEnabledAndVisible = KotlinInternalMode.enabled
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
* 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.kotlin.idea.actions.internal
|
||||
|
||||
import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent
|
||||
import com.intellij.openapi.actionSystem.ToggleAction
|
||||
|
||||
class KotlinInternalModeToggleAction: ToggleAction("Kotlin Internal Mode", "Show debug highlighting", null) {
|
||||
override fun isSelected(e: AnActionEvent?): Boolean {
|
||||
return KotlinInternalMode.enabled
|
||||
}
|
||||
|
||||
override fun setSelected(e: AnActionEvent?, state: Boolean) {
|
||||
KotlinInternalMode.enabled = state
|
||||
|
||||
DaemonCodeAnalyzer.getInstance(e!!.project)!!.settingsChanged()
|
||||
}
|
||||
}
|
||||
@@ -14,14 +14,9 @@ class SuspendingCallHintsTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
override fun getProjectDescriptor(): KotlinLightProjectDescriptor = KotlinWithJdkAndRuntimeLightProjectDescriptor.INSTANCE
|
||||
|
||||
fun check(text: String) {
|
||||
KotlinInternalMode.enabled = true
|
||||
try {
|
||||
HintType.SUSPENDING_CALL.option.set(true)
|
||||
myFixture.configureByText("A.kt", text)
|
||||
myFixture.testInlays()
|
||||
} finally {
|
||||
KotlinInternalMode.enabled = false
|
||||
}
|
||||
HintType.SUSPENDING_CALL.option.set(true)
|
||||
myFixture.configureByText("A.kt", text)
|
||||
myFixture.testInlays()
|
||||
}
|
||||
|
||||
fun testSimple() {
|
||||
|
||||
Reference in New Issue
Block a user