Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit388d47e

Browse files
committed
Rename ideProductCode to ideProduct
For example, ideProductCode.productCode is a bit weird. This objectcontains more than just the product code.It is still ideProductCode in the recent connections file because therewe do indeed only store the product code, but also we cannot change thename there anyway to avoid breaking backwards compatibility.
1 parentfed13e8 commit388d47e

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

‎src/main/kotlin/com/coder/gateway/CoderRemoteConnectionHandle.kt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ class CoderRemoteConnectionHandle {
161161
indicator.text="Waiting for${workspace.ideName} backend..."
162162
var status:UnattendedHostStatus?=null
163163
val remoteProjectPath= accessor.makeRemotePath(ShellArgument.PlainText(workspace.projectPath))
164-
val logsDir= accessor.getLogsDir(workspace.ideProductCode.productCode, remoteProjectPath)
164+
val logsDir= accessor.getLogsDir(workspace.ideProduct.productCode, remoteProjectPath)
165165
while (lifetime.status==LifetimeStatus.Alive) {
166166
status= ensureIDEBackend(workspace, accessor, ideDir, remoteProjectPath, logsDir, lifetime,null)
167167
if (!status?.joinLink.isNullOrBlank()) {
@@ -262,7 +262,7 @@ class CoderRemoteConnectionHandle {
262262
logger.info("Searching for${workspace.ideName} on${workspace.hostname}")
263263
val installed=
264264
accessor.getInstalledIDEs().find {
265-
it.product== workspace.ideProductCode&& it.buildNumber== workspace.ideBuildNumber
265+
it.product== workspace.ideProduct&& it.buildNumber== workspace.ideBuildNumber
266266
}
267267
if (installed!=null) {
268268
logger.info("${workspace.ideName} found at${workspace.hostname}:${installed.pathToIde}")

‎src/main/kotlin/com/coder/gateway/models/WorkspaceProjectIDE.kt‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class WorkspaceProjectIDE(
1616
valname:String,
1717
valhostname:String,
1818
valprojectPath:String,
19-
valideProductCode:IntelliJPlatformProduct,
19+
valideProduct:IntelliJPlatformProduct,
2020
valideBuildNumber:String,
2121
// One of these must exist; enforced by the constructor.
2222
varidePathOnHost:String?,
@@ -25,7 +25,7 @@ class WorkspaceProjectIDE(
2525
valdeploymentURL:URL,
2626
varlastOpened:String?,// Null if never opened.
2727
) {
28-
val ideName="${ideProductCode.productCode}-$ideBuildNumber"
28+
val ideName="${ideProduct.productCode}-$ideBuildNumber"
2929

3030
privateval maxDisplayLength=35
3131

@@ -53,7 +53,7 @@ class WorkspaceProjectIDE(
5353
name= name,
5454
coderWorkspaceHostname= hostname,
5555
projectPath= projectPath,
56-
ideProductCode=ideProductCode.productCode,
56+
ideProductCode=ideProduct.productCode,
5757
ideBuildNumber= ideBuildNumber,
5858
downloadSource= downloadSource,
5959
idePathOnHost= idePathOnHost,
@@ -98,7 +98,7 @@ class WorkspaceProjectIDE(
9898
name= name,
9999
hostname= hostname,
100100
projectPath= projectPath,
101-
ideProductCode=IntelliJPlatformProduct.fromProductCode(ideProductCode)?:throwException("invalid product code"),
101+
ideProduct=IntelliJPlatformProduct.fromProductCode(ideProductCode)?:throwException("invalid product code"),
102102
ideBuildNumber= ideBuildNumber,
103103
idePathOnHost= idePathOnHost,
104104
downloadSource= downloadSource,
@@ -172,7 +172,7 @@ fun IdeWithStatus.withWorkspaceProject(
172172
name= name,
173173
hostname= hostname,
174174
projectPath= projectPath,
175-
ideProductCode=this.product,
175+
ideProduct=this.product,
176176
ideBuildNumber=this.buildNumber,
177177
downloadSource=this.download?.link,
178178
idePathOnHost=this.pathOnHost,

‎src/main/kotlin/com/coder/gateway/views/CoderGatewayRecentWorkspaceConnectionsView.kt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ class CoderGatewayRecentWorkspaceConnectionsView(private val setContentCallback:
287287
}
288288
connections.forEach { workspaceProjectIDE->
289289
row {
290-
icon(workspaceProjectIDE.ideProductCode.icon)
290+
icon(workspaceProjectIDE.ideProduct.icon)
291291
cell(
292292
ActionLink(workspaceProjectIDE.projectPathDisplay) {
293293
CoderRemoteConnectionHandle().connect { workspaceProjectIDE }

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp