Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the "Lean More" button behavior from JetBrains Gateway home screen #13966

Merged
merged 1 commit into from
Oct 19, 2022
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 @@ -4,55 +4,32 @@

package io.gitpod.jetbrains.gateway.latest

import com.intellij.ide.BrowserUtil
import com.intellij.ui.components.ActionLink
import com.jetbrains.gateway.api.GatewayConnector
import com.jetbrains.gateway.api.GatewayConnectorView
import com.jetbrains.gateway.api.GatewayRecentConnections
import com.jetbrains.gateway.api.GatewayConnectorDocumentationPage
import com.jetbrains.rd.util.lifetime.Lifetime
import io.gitpod.jetbrains.gateway.GitpodRecentConnections
import io.gitpod.jetbrains.icons.GitpodIcons
import java.awt.Component
import javax.swing.Icon
import javax.swing.JComponent

class GitpodConnector : GatewayConnector {
override val icon: Icon
get() = GitpodIcons.Logo

override fun createView(lifetime: Lifetime): GatewayConnectorView {
return GitpodConnectorView(lifetime)
}

override fun getActionText(): String {
return "Connect to Gitpod"
}

override fun getDescription(): String? {
return "Connect to Gitpod workspaces"
}

override fun getDocumentationLink(): ActionLink {
val documentationLink = ActionLink("Documentation") {
BrowserUtil.browse("https://www.gitpod.io/docs/ides-and-editors/jetbrains-gateway")
}
documentationLink.setExternalLinkIcon()
return documentationLink
}

override fun getConnectorId(): String = "gitpod.connector"

override fun getRecentConnections(setContentCallback: (Component) -> Unit): GatewayRecentConnections? {
return GitpodRecentConnections()
}

override fun getTitle(): String {
return "Gitpod"
}

override fun getTitleAdornment(): JComponent? {
return null
}
override val icon = GitpodIcons.Logo

override fun createView(lifetime: Lifetime) = GitpodConnectorView(lifetime)

override fun getActionText() = "Connect to Gitpod"

override fun getDescription() = "Connect to Gitpod workspaces"

override fun getDocumentationAction() = GatewayConnectorDocumentationPage("https://www.gitpod.io/docs/ides-and-editors/jetbrains-gateway")

override fun getConnectorId() = "gitpod.connector"

override fun getRecentConnections(setContentCallback: (Component) -> Unit) = GitpodRecentConnections()

override fun getTitle() = "Gitpod"

@Deprecated("Not used", ReplaceWith("null"))
override fun getTitleAdornment() = null
felladrin marked this conversation as resolved.
Show resolved Hide resolved

override fun initProcedure() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,54 +5,31 @@
package io.gitpod.jetbrains.gateway.stable

import com.jetbrains.gateway.api.GatewayConnector
import com.jetbrains.gateway.api.GatewayConnectorView
import com.jetbrains.gateway.api.GatewayRecentConnections
import com.jetbrains.gateway.api.GatewayConnectorDocumentationPage
import com.jetbrains.rd.util.lifetime.Lifetime
import io.gitpod.jetbrains.gateway.GitpodRecentConnections
import io.gitpod.jetbrains.icons.GitpodIcons
import java.awt.Component
import javax.swing.Icon
import javax.swing.JComponent
import com.intellij.ui.components.ActionLink
import com.intellij.ide.BrowserUtil
import io.gitpod.jetbrains.gateway.GitpodRecentConnections

class GitpodConnector : GatewayConnector {
override val icon: Icon
get() = GitpodIcons.Logo

override fun createView(lifetime: Lifetime): GatewayConnectorView {
return GitpodConnectorView(lifetime)
}

override fun getActionText(): String {
return "Connect to Gitpod"
}

override fun getDescription(): String? {
return "Connect to Gitpod workspaces"
}

override fun getDocumentationLink(): ActionLink {
val documentationLink = ActionLink("Documentation") {
BrowserUtil.browse("https://www.gitpod.io/docs/ides-and-editors/jetbrains-gateway")
}
documentationLink.setExternalLinkIcon()
return documentationLink
}

override fun getConnectorId(): String = "gitpod.connector"

override fun getRecentConnections(setContentCallback: (Component) -> Unit): GatewayRecentConnections? {
return GitpodRecentConnections()
}

override fun getTitle(): String {
return "Gitpod"
}

override fun getTitleAdornment(): JComponent? {
return null
}
override val icon = GitpodIcons.Logo

override fun createView(lifetime: Lifetime) = GitpodConnectorView(lifetime)

override fun getActionText() = "Connect to Gitpod"

override fun getDescription() = "Connect to Gitpod workspaces"

override fun getDocumentationAction() = GatewayConnectorDocumentationPage("https://www.gitpod.io/docs/ides-and-editors/jetbrains-gateway")

override fun getConnectorId() = "gitpod.connector"

override fun getRecentConnections(setContentCallback: (Component) -> Unit) = GitpodRecentConnections()

override fun getTitle() = "Gitpod"

@Deprecated("Not used", ReplaceWith("null"))
override fun getTitleAdornment() = null
felladrin marked this conversation as resolved.
Show resolved Hide resolved

override fun initProcedure() {}
}