This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
JetBrains Toolbox plugin that enables local IntelliJ IDEs to connect to Red Hat OpenShift Dev Spaces (Eclipse Che) workspaces via SSH.
# Build the plugin JAR
./gradlew build
# Build and install to JetBrains Toolbox
./gradlew installPlugin
# Clean build artifacts
./gradlew cleanAfter installing, restart the Toolbox App to load the plugin.
DataSource → EnvironmentConfig → Repository → RemoteEnvironment → Provider → Toolbox UI
Key components in plugin/src/main/kotlin/com/redhat/devtools/toolbox/:
-
DevSpacesRemoteDevExtension (
DevSpacesPlugin.kt): Entry point implementingRemoteDevExtension. Creates the provider and repository, wires up the data source. -
DevSpacesRemoteProvider (
DevSpacesRemoteProvider.kt):RemoteProviderimplementation. 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, cachesRemoteEnvironmentinstances, exposes reactive state viaMutableStateFlow. -
EnvironmentDataSource (
datasource/): Interface for fetching environment configs.DevWorkspacesDataSourceis the real implementation. -
DevSpacesRemoteEnvironment (
environment/): WrapsEnvironmentConfigwith 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.
- The
groupvalue inplugin/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).