Create welcome tab plugin for JetBrains Gateway?
已回答
Is there any way to target JetBrains Gateway's welcome screen with a plugin? I have a private plugin that works in IU to target my company's cloud VM development solution, and I'd like to deploy it to the JetBrains Gateway thin client. When I install it, logs say that it has been been loaded (at least the "Loaded custom plugin" line), but the tab never appears.
I'm also interested in finding out if there is a way to target testing to JetBrains Gateway directly, but when I set `platformType` to `GW`, version 2022.1, resolution of the required libraries fails.
请先登录再写评论。
Well, that's unfortunate -- it looks like my plugin is registered at the beginning of the Gateway startup, but then immediately unregistered by `com.jetbrains.gateway.LauncherExtensionsConfigurator`. Is there any way to prevent that from happening? It would be really nice to be able to add this plugin to the welcome tab.
Hi Mike. The main idea in gateway welcome screen: use `GatewayConnector` extension point instead of default welcome screen tab EP. `GatewayConnector` provides UI which will be shown on welcome screen or in some other places (like "connect to remote machine" dialog).
Also you have to implement `GatewayConnectionProvider` which is will be used to perform actual connection from:
- GatewayConnector UI
- URL handling when a user inserts a link to a browser and gateway handles it
Wow -- that is very interesting. I was assuming before this that my plugin would have to sit outside the Remote Development tab, and then force the user to setup normal SSH connections manually. Those extension points open up new possibilities. A few followup questions:
Thanks,
Mike
1. There is no proper documentation yet, but all public api is located in `com.jetbrains.gateway.api` package. Feel free ask me here about details =)
2. I think yes, you can. But probably you hate to implement your UI with your custom fields and workflow. Internally it has to use common ssh api from IDEA platform and common gateway api to upload IDE to a remote machine and download / launch a proper thin client.
3. No idea, will ask other devs
Hi Evgeniy Stepanov I am creating an Intellij plugin for internal organization purposes, can you help me with an example of using the public api 'com.jetbrains.gateway.api'? I want to consume this class "RemoteLogCollector".
It’s better to inherit
com.jetbrains.gateway.api.RemoteLogCollectorBase
that has almost everything regarding the log downloading.You'll need to override the following:
presentableName
– the name of your provider which is shown while log collection is being performedcollectorIdForPaths
– a string that is added to the name of the resulting .tar.gz file. Archive file name format:"${REMOTE_LOGS_FOLDER}_${collectorIdForPaths}_$productCode${buildNumber}_${projectName}.tar.gz"
recentConnectionsManager
– your implementation ofcom.jetbrains.gateway.ssh.RemoteRecentConnectionsManager
getExecutor
– your implementation ofcom.jetbrains.gateway.ssh.deploy.HostCommandExecutor
tryGetUserHomeDir
– a function that returns home directory of current user. Right now not used, so one can return null hereprocessProviderSpecificDownloadException
– processes archive download exceptions. If the function returns false, exception is logged withlogger.warn
Hi, Ivan Migalev is it possible to share some code examples (mainly these files: build.gradle.kts, plugin.xml)?. I created an IntelliJ plugin from "IDE Plugin" template wizard, but I can't import these dependencies com.jetbrains.gateway.api.RemoteLogCollectorBase in my classes.