Skip to content
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

Add support for opening the IDE from DevUI even if the default IDE script doesn't exist #16121

Merged
merged 1 commit into from
Mar 31, 2021

Conversation

geoand
Copy link
Contributor

@geoand geoand commented Mar 30, 2021

Currently support for this is only added for IntelliJ.
Code is opened client side (via the URL handler it installs)
so this support isn't needed, Netbeans already used something similar
and Eclipse seems to be sort of problematic because we don't have
a command which we can test that would not launch the IDE.

Furthermore this fallback is only tried if the default script does not exist

Fixes: #15721

@geoand
Copy link
Contributor Author

geoand commented Mar 30, 2021

I tested this on IntelliJ for both cases where idea exists on $PATH and where it doesn't

@geoand geoand changed the title Add support for opening the IDE from DevUI even if the default ide script doesn't exist Add support for opening the IDE from DevUI even if the default IDE script doesn't exist Mar 30, 2021
Comment on lines 5 to 19
final class IdeUtil {

private IdeUtil() {
}

static boolean isWindows() {
String os = System.getProperty("os.name");
return os.toLowerCase(Locale.ENGLISH).startsWith("windows");
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isWindows() is currently used only in the "ide" package, but it seems not be dependent on only "ide". Isn't it better to change the class name to be more general? like 'SystemUtil' or 'PlatfromUtil'. And since the package '../deploy/util' already exists, wouldn't this class be better to be in it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, if the need arises, I'll move it

Copy link
Member

@phillip-kruger phillip-kruger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to do some fixes on Netbeans anyway, so I can change that null back to netbeans.

…ript doesn't exist

Currently support for this is only added for IntelliJ.
Code is opened client side (via the URL handler it installs)
so this support isn't needed, Netbeans already used something similar
and Eclipse seems to be sort of problematic because we don't have
a command which we can test that would not launch the IDE.

Fixes: quarkusio#15721
@geoand geoand added triage/waiting-for-ci Ready to merge when CI successfully finishes and removed area/core area/vertx labels Mar 31, 2021
@phillip-kruger phillip-kruger merged commit a3a6f42 into quarkusio:main Mar 31, 2021
@quarkus-bot quarkus-bot bot added this to the 1.14 - main milestone Mar 31, 2021
@quarkus-bot quarkus-bot bot removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label Mar 31, 2021
@geoand geoand deleted the #15721 branch March 31, 2021 08:47
@gsmet gsmet modified the milestones: 1.14 - main, 1.13.1.Final Apr 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dev UI: open code in IDE should use IDE path from scanning processes
4 participants