-
Notifications
You must be signed in to change notification settings - Fork 2
Add "from-Toolbox" connection flow; auto port-forward; multi-conection #4
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
6cb6789
Support the 'from Toolbox' connection flow; auto-port-fwd
azatsarynnyy 964aabc
Support the 'from Toolbox' connection flow; auto-port-fwd
azatsarynnyy 4117153
multi-connection mode
azatsarynnyy 80f13e6
fetch ssh user name from CDE; list Toolbox-compatible CDEs only; UX i…
azatsarynnyy 60335da
Merge branch 'main' into from-tbx-flow
azatsarynnyy 82d3351
Bump up the plugin version
azatsarynnyy 8576f55
fix build
azatsarynnyy 6351a39
Update plugin/src/main/kotlin/com/redhat/devtools/toolbox/openshift/D…
azatsarynnyy 1e7fec4
add URL parameter validation
azatsarynnyy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # CLAUDE.md | ||
|
|
||
| This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. | ||
|
|
||
| ## Project Overview | ||
|
|
||
| JetBrains Toolbox plugin that enables local IntelliJ IDEs to connect to Red Hat OpenShift Dev Spaces (Eclipse Che) workspaces via SSH. | ||
|
|
||
| ## Build & Install Commands | ||
|
|
||
| ```bash | ||
| # Build the plugin JAR | ||
| ./gradlew build | ||
|
|
||
| # Build and install to JetBrains Toolbox | ||
| ./gradlew installPlugin | ||
|
|
||
| # Clean build artifacts | ||
| ./gradlew clean | ||
| ``` | ||
|
|
||
| After installing, restart the Toolbox App to load the plugin. | ||
|
|
||
| ## Architecture | ||
|
|
||
| ``` | ||
| DataSource → EnvironmentConfig → Repository → RemoteEnvironment → Provider → Toolbox UI | ||
| ``` | ||
|
|
||
| **Key components in `plugin/src/main/kotlin/com/redhat/devtools/toolbox/`:** | ||
|
|
||
| - **DevSpacesRemoteDevExtension** (`DevSpacesPlugin.kt`): Entry point implementing `RemoteDevExtension`. Creates the provider and repository, wires up the data source. | ||
|
|
||
| - **DevSpacesRemoteProvider** (`DevSpacesRemoteProvider.kt`): `RemoteProvider` implementation. Handles URI callbacks (`jetbrains://gateway/com.redhat.devtools.toolbox?...`) from Dev Spaces Dashboard, triggering environment refresh and connection requests. | ||
|
|
||
| - **EnvironmentRepository** (`EnvironmentRepository.kt`): Manages environment lifecycle - fetches configs from data source, caches `RemoteEnvironment` instances, exposes reactive state via `MutableStateFlow`. | ||
|
|
||
| - **EnvironmentDataSource** (`datasource/`): Interface for fetching environment configs. `DevWorkspacesDataSource` is the real implementation. | ||
|
|
||
| - **DevSpacesRemoteEnvironment** (`environment/`): Wraps `EnvironmentConfig` with Toolbox API reactive properties (state, description, connection requests). | ||
|
|
||
| - **SshEnvironmentContentsViewFactory** (`environment/`): Creates SSH connection views. Current limitation: hardcoded local port 2022, supports only one active connection. | ||
|
|
||
| ## Technical Notes | ||
|
|
||
| - The `group` value in `plugin/build.gradle.kts` (`com.redhat.devtools.toolbox`) is the provider ID used in URI handling. | ||
| - Plugin requires Java 21 (configured via `jvmToolchain(21)`). | ||
| - Uses JetBrains Toolbox Plugin API version defined in `gradle/libs.versions.toml`. | ||
| - Periodic environment polling is currently disabled to preserve environments received via external URLs (see TODO in `EnvironmentRepository.kt:61-67`). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.