mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 23:39:07 +07:00
Code review 107358 resolve issues
GitOrigin-RevId: d86947841925d0fc238cec1f3f735519e66c32e5
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c8162203b2
commit
6ab4e94b06
@@ -5,6 +5,7 @@ import com.intellij.core.JavaPsiBundle.message
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.project.guessProjectDir
|
||||
import com.intellij.openapi.ui.playback.PlaybackContext
|
||||
import com.intellij.openapi.vfs.findDirectory
|
||||
import com.intellij.platform.diagnostic.telemetry.helpers.useWithScope
|
||||
import com.intellij.psi.JavaDirectoryService
|
||||
import com.intellij.psi.impl.file.PsiJavaDirectoryFactory
|
||||
@@ -38,8 +39,8 @@ class CreateJavaFileCommand(text: String, line: Int) : PerformanceCommandCorouti
|
||||
val directory = PsiJavaDirectoryFactory
|
||||
.getInstance(context.project)
|
||||
.createDirectory(
|
||||
(context.project.guessProjectDir() ?: throw RuntimeException("'guessProjectDir' dir returned 'null'"))
|
||||
.findFileByRelativePath(filePath) ?: throw RuntimeException("Can't find file $filePath")
|
||||
(context.project.guessProjectDir() ?: throw RuntimeException("Root of the project was not found"))
|
||||
.findDirectory(filePath) ?: throw RuntimeException("Can't find file $filePath")
|
||||
)
|
||||
|
||||
val templateName = POSSIBLE_FILE_TYPES[fileType.lowercase()]
|
||||
|
||||
Reference in New Issue
Block a user