|
5 | 5 | package io.gitpod.jetbrains.gateway.stable
|
6 | 6 |
|
7 | 7 | import com.jetbrains.gateway.api.GatewayConnector
|
8 |
| -import com.jetbrains.gateway.api.GatewayConnectorView |
9 |
| -import com.jetbrains.gateway.api.GatewayRecentConnections |
| 8 | +import com.jetbrains.gateway.api.GatewayConnectorDocumentationPage |
10 | 9 | import com.jetbrains.rd.util.lifetime.Lifetime
|
| 10 | +import io.gitpod.jetbrains.gateway.GitpodRecentConnections |
11 | 11 | import io.gitpod.jetbrains.icons.GitpodIcons
|
12 | 12 | import java.awt.Component
|
13 |
| -import javax.swing.Icon |
14 |
| -import javax.swing.JComponent |
15 |
| -import com.intellij.ui.components.ActionLink |
16 |
| -import com.intellij.ide.BrowserUtil |
17 |
| -import io.gitpod.jetbrains.gateway.GitpodRecentConnections |
18 | 13 |
|
19 | 14 | class GitpodConnector : GatewayConnector {
|
20 |
| - override val icon: Icon |
21 |
| - get() = GitpodIcons.Logo |
22 |
| - |
23 |
| - override fun createView(lifetime: Lifetime): GatewayConnectorView { |
24 |
| - return GitpodConnectorView(lifetime) |
25 |
| - } |
26 |
| - |
27 |
| - override fun getActionText(): String { |
28 |
| - return "Connect to Gitpod" |
29 |
| - } |
30 |
| - |
31 |
| - override fun getDescription(): String? { |
32 |
| - return "Connect to Gitpod workspaces" |
33 |
| - } |
34 |
| - |
35 |
| - override fun getDocumentationLink(): ActionLink { |
36 |
| - val documentationLink = ActionLink("Documentation") { |
37 |
| - BrowserUtil.browse("https://www.gitpod.io/docs/ides-and-editors/jetbrains-gateway") |
38 |
| - } |
39 |
| - documentationLink.setExternalLinkIcon() |
40 |
| - return documentationLink |
41 |
| - } |
42 |
| - |
43 |
| - override fun getConnectorId(): String = "gitpod.connector" |
44 |
| - |
45 |
| - override fun getRecentConnections(setContentCallback: (Component) -> Unit): GatewayRecentConnections? { |
46 |
| - return GitpodRecentConnections() |
47 |
| - } |
48 |
| - |
49 |
| - override fun getTitle(): String { |
50 |
| - return "Gitpod" |
51 |
| - } |
52 |
| - |
53 |
| - override fun getTitleAdornment(): JComponent? { |
54 |
| - return null |
55 |
| - } |
| 15 | + override val icon = GitpodIcons.Logo |
| 16 | + |
| 17 | + override fun createView(lifetime: Lifetime) = GitpodConnectorView(lifetime) |
| 18 | + |
| 19 | + override fun getActionText() = "Connect to Gitpod" |
| 20 | + |
| 21 | + override fun getDescription() = "Connect to Gitpod workspaces" |
| 22 | + |
| 23 | + override fun getDocumentationAction() = GatewayConnectorDocumentationPage("https://www.gitpod.io/docs/ides-and-editors/jetbrains-gateway") |
| 24 | + |
| 25 | + override fun getConnectorId() = "gitpod.connector" |
| 26 | + |
| 27 | + override fun getRecentConnections(setContentCallback: (Component) -> Unit) = GitpodRecentConnections() |
| 28 | + |
| 29 | + override fun getTitle() = "Gitpod" |
| 30 | + |
| 31 | + @Deprecated("Not used", ReplaceWith("null")) |
| 32 | + override fun getTitleAdornment() = null |
56 | 33 |
|
57 | 34 | override fun initProcedure() {}
|
58 | 35 | }
|
0 commit comments