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.

0

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.

0

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

0

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:

  1. I can't find documentation on these extension points. I can guess at most of the API (I think), but if there are docs, it would be helpful.
  2. Can I re-use most of the existing SSH connections and just set up some clever defaults? Due to how our remote VMs work, I know specifically that (a) the user auth auth using an SSH key, not a password, (b) a setup step is necessary between VM creation and initial checkout, (c) projects will be checked out with a very consistent pattern on the disk.
  3. I'm wondering if there are hooks to separate initializing a new VM from startup/shutdown. I don't know much about Space, but I don't see anything specific in the API around this.

Thanks,

Mike

0

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

0

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".

0

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 performed
  • collectorIdForPaths – 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 of com.jetbrains.gateway.ssh.RemoteRecentConnectionsManager
  • getExecutor – your implementation of com.jetbrains.gateway.ssh.deploy.HostCommandExecutor
  • tryGetUserHomeDir – a function that returns home directory of current user. Right now not used, so one can return null here
  • processProviderSpecificDownloadException – processes archive download exceptions. If the function returns false, exception is logged with logger.warn 
0

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.

0

请先登录再写评论。