Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/io/flutter/FlutterBundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ settings.enable.logs.preserve.during.hot.reload.and.restart=Preserve console log
settings.enable.file.path.logging=Allow logging of full file paths
settings.enable.file.path.logging.tooltip=Logs full file paths that could show private user information

action.new.project.title=New Flutter Project...
welcome.new.project.compact=New Flutter Project

npw_platform_android=Android
Expand Down
8 changes: 2 additions & 6 deletions src/io/flutter/actions/FlutterNewProjectAction.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,15 @@ import com.intellij.openapi.roots.ui.configuration.ModulesProvider
import com.intellij.openapi.wm.impl.welcomeScreen.NewWelcomeScreen
import io.flutter.FlutterBundle
import io.flutter.FlutterUtils
import kotlinx.coroutines.DelicateCoroutinesApi
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import kotlinx.coroutines.*

/**
* This classes was re-implemented with Kotlin from FlutterNewProjectAction.java to resolve the New Flutter Project action from hanging,
* https://github.com/flutter/flutter-intellij/issues/8310.
*
* See https://github.com/JetBrains/intellij-community/blob/master/java/idea-ui/src/com/intellij/ide/impl/NewProjectUtil.kt
*/
class FlutterNewProjectAction : AnAction(FlutterBundle.message("action.new.project.title")), DumbAware {
class FlutterNewProjectAction : AnAction(), DumbAware {
override fun update(e: AnActionEvent) {
if (NewWelcomeScreen.isNewWelcomeScreen(e)) {
e.presentation.setText(FlutterBundle.message("welcome.new.project.compact"))
Expand Down