-
Notifications
You must be signed in to change notification settings - Fork 15
Initial impl of defaultIde selection setting #522
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
Initial impl of defaultIde selection setting #522
Conversation
CONTRIBUTING.md
Outdated
@@ -34,7 +34,7 @@ To simulate opening a workspace from the dashboard pass the Gateway link via | |||
`--args`. For example: | |||
|
|||
``` | |||
./gradlew clean runIDE --args="jetbrains-gateway://connect#type=coder&workspace=dev&agent=coder&folder=/home/coder&url=https://dev.coder.com&token=<redacted>&ide_product_code=IU&ide_build_number=223.8836.41&ide_download_link=https://download.jetbrains.com/idea/ideaIU-2022.3.3.tar.gz" | |||
./gradlew clean runIDE --args="jetbrains-gateway://connect#type=coder&workspace=bcpeinhardt&owner=benpeinhardt&agent=dev&folder=/home/coder&url=https://dev.coder.com&token=<redacted>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll change this back when I'm done messing with it.
Qodana Community for JVM5 new problems were found
💡 Qodana analysis was run in the pull request mode: only the changed files were checked View the detailed Qodana reportTo be able to view the detailed Qodana report, you can either:
To get - name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2023.3.2
with:
upload-result: true Contact Qodana teamContact us at qodana-support@jetbrains.com
|
@code-asher I'm not actually sure what the best way to test this is 🤔 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me!
@@ -54,6 +56,7 @@ import com.jetbrains.gateway.ssh.IdeWithStatus | |||
import com.jetbrains.gateway.ssh.IntelliJPlatformProduct | |||
import com.jetbrains.gateway.ssh.deploy.DeployException | |||
import com.jetbrains.gateway.ssh.util.validateRemotePath | |||
import com.jetbrains.rd.generator.nova.PredefinedType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably already see the warning but appears to be unused (I think ktlint
will delete unused imports if you want to try using that)
// Using contains on the displayable version of the ide means they can be as specific or as vague as they want | ||
// CL 2023.3.6 233.15619.8 -> a specific Clion build | ||
// CL 2023.3.6 -> a specific Clion version | ||
// 2023.3.6 -> a specific version (some customers will on have one specific IDE in their list anyway) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo I think in will on have
(will only have
maybe)
@@ -258,9 +270,24 @@ class CoderWorkspaceProjectIDEStepView( | |||
) | |||
}, | |||
) | |||
|
|||
// Check the provided setting to see if there's a default IDE to set. | |||
val defaultIde = ides.find { it -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Qodana will complain about it ->
since that is the default, although idk how much we should care about Qodana. Possibly ktlint
would change this automatically.
Tangent, but I think there is an alias for find
called firstOrNull
. Kinda surprised there is no indexOfFirstOrNull
, only indexOfFirst
. indexOfFirst().takeIf { it >= 0 }
would work around that I guess.
Anyway, no need to change to those, more that I nerd sniped myself. 😆
row(CoderGatewayBundle.message("gateway.connector.settings.default-ide")) { | ||
textField().resizableColumn().align(AlignX.FILL) | ||
.bindText(state::defaultIde) | ||
.comment("The default IDE version to display in the IDE selection dropdown. " + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we need to make mention that JetBrains by default only shows the latest version (latest stable and latest EAP I think, right?), so as soon as JetBrains updates their list this setting may become obsolete unless they are using just the IDE name or year.
But, maybe this option will only be used by folks that have provided their own list instead of fetching from JetBrains, so that might not be an issue.
I think we have no way to test this view really, but I suppose one could extract the list model and test that part. I did a similar thing with the workspace selection list. |
No description provided.