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

[NETBEANS-1733] Ask when downloading nbjavac - backport to 10.0 release #1036

Merged

Conversation

JaroslavTulach
Copy link

@JaroslavTulach JaroslavTulach commented Nov 24, 2018

When an ergonomics feature is installed while opening a project, it could download a (GPL licensed!) Javac without asking the user.

This change shows a dialog and let's user confirm or cancel the action.

This request merges into release100 branch - this is a convenience request. It should be merged once #1035 is merged and verified into master branch.

@JaroslavTulach JaroslavTulach changed the title Jtulach/ask when downloading nb javac [NETBEANS-1733] Ask when downloading nbjavac - backport to 10.0 release Nov 24, 2018
getBundle ("InstallerMissingModules_Install"));
boolean ok = PluginManager.openInstallWizard(installContainer);
if (!ok) {
StringBuilder sb = new StringBuilder();
Copy link
Contributor

Choose a reason for hiding this comment

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

For what it's worth, you might want to use a Stream instead (with a static import for Collectors::joining):

Suggested change
StringBuilder sb = new StringBuilder();
String s = modules4install.stream()
.map(UpdateElement::getDisplayName)
.collect(joining(", "));

@lkishalmi
Copy link
Contributor

Tested before merging. It works, though cancelling the nb-javac installation also cancels the activation on JavaSE feature.

@lkishalmi lkishalmi merged commit 6242f29 into apache:release100 Nov 24, 2018
@matthiasblaesing
Copy link
Contributor

Cancelling the nb-javac installation also cancels the activation on JavaSE feature.

So JavaSE can only be enabled with nb-javac? If I remember correctly @jlahoda put effort into enabling at least basic IDE features with the JDK javac. If this really makes that work unusable, there should be a followup reinstating the vanilla javac work.

@jtulach
Copy link
Contributor

jtulach commented Nov 24, 2018

I'd say the current state is good enough for 10.0 - it fixes the licensing blocker. Fine tuning can happen for next version.

@jtulach jtulach deleted the jtulach/AskWhenDownloadingNbJavac branch November 24, 2018 18:49
@matthiasblaesing
Copy link
Contributor

Sure ... I'm a bit tired of removing fallout from rash implementations (we are still suffering from the directory reorganisation ...).

@lkishalmi
Copy link
Contributor

JavaSE still can be enabled without nb-javac. See my comments on https://issues.apache.org/jira/browse/NETBEANS-1733

@jlahoda
Copy link
Contributor

jlahoda commented Nov 24, 2018

Hmmm, I find the UI to be fairly "not good". It does not say why it is trying to install the plugins, how to recover from the Cancel, etc.

But, can we please make this at least a little bit better for those that run on JDK where we can run without nb-javac? Something along the lines of #1037.

@vieiro
Copy link
Contributor

vieiro commented Nov 25, 2018

Hi all,
Should we doing this for JUnit as well or not? I recall having to download the JUnit jar in previous IDE releases (Oracle era, I think), but I cannot remember why.
Thanks!

@matthiasblaesing
Copy link
Contributor

@vieiro JUnit was CPL according to wikipedia that license is deemed incompatible with the GPL, so that would have prevented combination. JUnit was relicensed to EPL. EPL v1 + v2 are both cleared by apache legal and that is reflected in the existens of the platform/libs.junit4 and platform/lib.junit5 modules.

@vieiro
Copy link
Contributor

vieiro commented Nov 25, 2018

Thanks for the explanation @matthiasblaesing !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants