Skip to content

Commit 34ded8d

Browse files
committed
doc: provide details about IDE resolution based on placeholders
1 parent 584c872 commit 34ded8d

File tree

1 file changed

+110
-9
lines changed

1 file changed

+110
-9
lines changed

README.md

Lines changed: 110 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,15 @@ as:
8989
jetbrains://gateway/coder?url=http(s)://<your-coder-deployment>
9090
```
9191

92-
| Query param | Description | Mandatory |
93-
|------------------|------------------------------------------------------------------------------|-----------|
94-
| url | Your Coder deployment URL (encoded) | Yes |
95-
| token | Coder authentication token | Yes |
96-
| workspace | Name of the Coder workspace to connect to. | Yes |
97-
| agent_name | The name of the agent with the workspace | No |
98-
| ide_product_code | JetBrains IDE product code (e.g., GO for GoLand, RR for Rider) | No |
99-
| ide_build_number | Specific build number of the JetBrains IDE to install on the workspace | No |
100-
| folder | Absolute path to the project folder to open in the remote IDE (URL-encoded) | No |
92+
| Query param | Description | Mandatory |
93+
|------------------|----------------------------------------------------------------------------------------------------|-----------|
94+
| url | Your Coder deployment URL (encoded) | Yes |
95+
| token | Coder authentication token | Yes |
96+
| workspace | Name of the Coder workspace to connect to. | Yes |
97+
| agent_name | The name of the agent with the workspace | No |
98+
| ide_product_code | JetBrains IDE product code (e.g., GO for GoLand, RR for Rider) | No |
99+
| ide_build_number | Specific build number or placeholder (see below) of the JetBrains IDE to install on the workspace | No |
100+
| folder | Absolute path to the project folder to open in the remote IDE (URL-encoded) | No |
101101

102102
> [!NOTE]
103103
> If only a single agent is available, specifying an agent name is optional. However, if multiple agents exist, you must
@@ -109,6 +109,107 @@ If `ide_product_code` and `ide_build_number` is missing, Toolbox will only open
109109
page. Coder Toolbox will attempt to start the workspace if it’s not already running; however, for the most reliable
110110
experience, it’s recommended to ensure the workspace is running prior to initiating the connection.
111111

112+
### Resolving IDE and Build Number
113+
114+
When handling URIs, the Coder Toolbox plugin can resolve the IDE and its build number in several ways. This allows for
115+
flexible and automated IDE management.
116+
117+
The `ide_build_number` parameter supports the following values:
118+
119+
- `latest_eap`: Finds the latest available Early Access Program (EAP) version of the specified `ide_product_code`.
120+
- **Fallback**: If no EAP version is found, it falls back to the latest available build (release or EAP). If no
121+
builds are available at all, an error is shown.
122+
- `latest_release`: Finds the latest available stable release version of the specified `ide_product_code`.
123+
- **Fallback**: If no release version is found, it falls back to the latest available build (release or EAP). If no
124+
builds are available at all, an error is shown.
125+
- `latest_installed`: Uses the latest installed version of the IDE on the Coder workspace.
126+
- **Fallback**: If no IDE is installed, it falls back to the latest available version for installation. If no builds
127+
are available for installation, an error is shown.
128+
- A specific build number (e.g., `241.14494.240`): The plugin will look for and use this exact build number.
129+
- **Fallback**: If the specific build number is not found among installed or available IDEs, an error is shown.
130+
131+
The plugin first checks for installed IDEs on the remote workspace, then queries for all available (but not yet
132+
installed) IDEs. Based on the `ide_build_number` hint, it will either pick an already installed IDE or install a new
133+
one.
134+
135+
### Offline Mode
136+
137+
The Coder Toolbox plugin supports an offline mode, which allows it to function without an internet connection. This is
138+
particularly useful in environments with restricted network access.
139+
140+
To enable offline mode, the JetBrains Toolbox must be launched with the `--offline-mode` flag. In this mode, the plugin
141+
relies on local JSON files (`release.json` and `eap.json`) that you must provide in the plugin's data directory. The
142+
plugin does **not** cache these files automatically.
143+
144+
While online, the plugin fetches the latest IDE feeds from JetBrains' data services. In offline mode, it bypasses these
145+
network requests and uses the local files instead.
146+
147+
#### Offline Mode File Schema and Location
148+
149+
The feed files must be placed in the plugin's data directory, which varies by operating system:
150+
151+
- **macOS**: `~/Library/Application Support/coder-toolbox/`
152+
- **Linux**: `~/.local/share/coder-toolbox/`
153+
- **Windows**: `%LOCALAPPDATA%/coder-toolbox/`
154+
155+
Two files are used for the feeds:
156+
157+
- `release.json`: Contains the stable release versions of JetBrains IDEs.
158+
- `eap.json`: Contains the Early Access Program (EAP) versions.
159+
160+
You can obtain these files by downloading them from the following URLs:
161+
162+
- **Release feed
163+
**: [https://data.services.jetbrains.com/products?type=release](https://data.services.jetbrains.com/products?type=release)
164+
- **EAP feed
165+
**: [https://data.services.jetbrains.com/products?type=eap](https://data.services.jetbrains.com/products?type=eap)
166+
167+
The schema for these JSON files is a list of `IdeProduct` objects. Each `IdeProduct` contains a list of `IdeRelease`
168+
objects.
169+
170+
**Example `release.json` entry:**
171+
172+
```json
173+
[
174+
{
175+
"code": "RR",
176+
"intellijProductCode": "RR",
177+
"name": "RustRover",
178+
"releases": [
179+
{
180+
"build": "241.14494.240",
181+
"version": "2024.1",
182+
"type": "release",
183+
"date": "2024-04-03"
184+
}
185+
]
186+
}
187+
]
188+
```
189+
190+
**Example `eap.json` entry:**
191+
192+
```json
193+
[
194+
{
195+
"code": "RR",
196+
"intellijProductCode": "RR",
197+
"name": "RustRover",
198+
"releases": [
199+
{
200+
"build": "241.14494.120",
201+
"version": "2024.1 EAP 5",
202+
"type": "eap",
203+
"date": "2024-03-15"
204+
}
205+
]
206+
}
207+
]
208+
```
209+
210+
By providing these files, the plugin can resolve and launch the correct IDE version even when it cannot access the
211+
internet.
212+
112213
## GPG Signature Verification
113214

114215
The Coder Toolbox plugin starting with version *0.5.0* implements a comprehensive GPG signature verification system to

0 commit comments

Comments
 (0)