mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[migration to Kotlin LV 2.3] Update Kotlin code w.r.t. KTLC-284 (1)
(trivial migrations w/ decreased null safety) GitOrigin-RevId: 78d524a5a1905f5e44d14247ed68386af5a05324
This commit is contained in:
committed by
intellij-monorepo-bot
parent
59f9cd284f
commit
ad3231ac2f
+1
-1
@@ -39,7 +39,7 @@ internal fun doGetUniqueNameEditorTabTitle(project: Project, file: VirtualFile):
|
||||
|
||||
// Even though this is a 'tab title provider' it is used also when tabs are not shown, namely for building IDE frame title.
|
||||
val uniqueFilePathBuilder = UniqueVFilePathBuilder.getInstance()
|
||||
var uniqueName = ReadAction.compute<String?, Throwable> {
|
||||
var uniqueName = ReadAction.compute<String, Throwable> {
|
||||
if (uiSettings.editorTabPlacement == UISettings.TABS_NONE) {
|
||||
uniqueFilePathBuilder.getUniqueVirtualFilePath(project, file)
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ class GroupMapping @JvmOverloads constructor(private val myShowNonPopupGroups: B
|
||||
}
|
||||
|
||||
override fun compareTo(o: GroupMapping?): Int {
|
||||
return Comparing.compare<String?>(this.firstGroupName, o?.firstGroupName)
|
||||
return Comparing.compare(this.firstGroupName, o?.firstGroupName)
|
||||
}
|
||||
|
||||
val bestGroupName: @ActionText String?
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ class ImportClassDuringTypingTest: KotlinLightCodeInsightFixtureTestCase() {
|
||||
assertTrue(errDesc!!.getAction().isAvailable(getProject(), getEditor(), getFile()))
|
||||
for (i in error.getActualStartOffset()..<error.getActualEndOffset()) {
|
||||
getEditor().getCaretModel().moveToOffset(i)
|
||||
val errDescriptors = ReadAction.nonBlocking<MutableList<IntentionActionDescriptor?>?>(Callable {
|
||||
val errDescriptors = ReadAction.nonBlocking(Callable {
|
||||
ShowIntentionsPass.getActionsToShow(getEditor(), getFile()).errorFixesToShow
|
||||
}).submit(AppExecutorUtil.getAppExecutorService()).get()
|
||||
val importDesc = errDescriptors.find{ descriptor ->
|
||||
|
||||
+2
-2
@@ -222,7 +222,7 @@ class MavenShCommandLineState(val environment: ExecutionEnvironment, private val
|
||||
): BuildView? {
|
||||
val console = createConsole()
|
||||
val project = myConfiguration.project
|
||||
val viewManager = project.getService<ExternalSystemRunConfigurationViewManager?>(ExternalSystemRunConfigurationViewManager::class.java)
|
||||
val viewManager = project.getService<ExternalSystemRunConfigurationViewManager>(ExternalSystemRunConfigurationViewManager::class.java)
|
||||
return object : BuildView(project, console, descriptor, "build.toolwindow.run.selection.state", viewManager) {
|
||||
override fun onEvent(buildId: Any, event: BuildEvent) {
|
||||
super.onEvent(buildId, event)
|
||||
@@ -245,7 +245,7 @@ class MavenShCommandLineState(val environment: ExecutionEnvironment, private val
|
||||
processHandler: ProcessHandler,
|
||||
): ExecutionResult {
|
||||
val consoleView = createConsole()
|
||||
val viewManager = environment.project.getService<BuildViewManager?>(BuildViewManager::class.java)
|
||||
val viewManager = environment.project.getService<BuildViewManager>(BuildViewManager::class.java)
|
||||
|
||||
descriptor.withProcessHandler(MavenBuildHandlerFilterSpyWrapper(processHandler, isWrapperedOutput(), isWindows()), null)
|
||||
descriptor.withExecutionEnvironment(environment)
|
||||
|
||||
@@ -1735,7 +1735,7 @@ object MavenUtil {
|
||||
val mavenProjectsManager = MavenProjectsManager.getInstance(project)
|
||||
if (mavenProjectsManager.findProject(file) != null) return true
|
||||
|
||||
return ReadAction.compute<Boolean?, RuntimeException?>(ThrowableComputable {
|
||||
return ReadAction.compute<Boolean, RuntimeException>(ThrowableComputable {
|
||||
if (project.isDisposed()) return@ThrowableComputable false
|
||||
val psiFile = PsiManager.getInstance(project).findFile(file)
|
||||
if (psiFile == null) return@ThrowableComputable false
|
||||
|
||||
Reference in New Issue
Block a user