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
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ data class RemoteIDEServerStatus(
return !joinLink.isNullOrBlank()
}

val hasProject: Boolean
get() {
return !projects.isNullOrEmpty()
}

override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import com.intellij.openapi.application.runInEdt
import com.intellij.openapi.diagnostic.thisLogger
import com.intellij.openapi.progress.ProgressManager
import com.intellij.openapi.ui.MessageDialogBuilder

Check warning on line 20 in src/main/kotlin/com/redhat/devtools/gateway/view/steps/DevSpacesWorkspacesStepView.kt

View workflow job for this annotation

GitHub Actions / Inspect code

Unused import directive

Unused import directive
import com.intellij.openapi.util.Disposer
import com.intellij.openapi.wm.impl.welcomeScreen.WelcomeScreenUIManager
import com.intellij.ui.ColoredListCellRenderer
Expand Down Expand Up @@ -143,7 +143,7 @@
return false
}
devSpacesContext.devWorkspace = workspace
val serverStatus = try {

Check warning on line 146 in src/main/kotlin/com/redhat/devtools/gateway/view/steps/DevSpacesWorkspacesStepView.kt

View workflow job for this annotation

GitHub Actions / Inspect code

Unused variable

Unused variable
getServerStatus()
} catch (e: Exception) {
if (e.isCancellationException()) {
Expand All @@ -157,20 +157,6 @@
return false
} ?: return false // Canceled, stay on this step

if (!serverStatus.hasProject) {
val proceed = MessageDialogBuilder
.yesNo(
"Workspace IDE Without Project",
"The Workspace IDE has no project.\nWould you like to connect anyway?"
)
.asWarning()
.yesText("Connect Anyway")
.noText("Cancel")
.ask(component)

if (!proceed) return false // Stay on this step
}

connect()
return false // Stay on this step after connection
}
Expand Down
Loading