-
-
Notifications
You must be signed in to change notification settings - Fork 87
New links in "Help" menu for issues and forum #1210
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
Conversation
Added no tests btw. Works bug-free on MacOS 15.6 and should work universally. |
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.
Hi! Great work on this! I am curious about which version of Java you are using. We use Eclipse Temurin 17. I believe if you set that SDK then you will see that desktop.browse()
will throw an exception.
here is an example in the file of the pattern you'll want to follow:
item = new JMenuItem(Language.text("menu.help.getting_started"));
item.addActionListener(e -> Platform.openURL(Language.text("menu.help.getting_started.url")));
menu.add(item);
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.
Changed used method to Platform.openURL(). Should now work universally.
import java.net.URI; | ||
import java.net.URISyntaxException; | ||
|
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.
Are these necessary anymore? If not please remove, and then this is ready to be approved! 🎉
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.
Okay, removed the imports now. I personally think it looks good now. But of course I would love to make some changes if needed.
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.
Thank you!
|
||
// Ask on the Forum link opener | ||
item = new JMenuItem(Language.text("menu.help.ask")); | ||
item.addActionListener(e -> Platform.openURL(Language.text("menu.help.getting_started.url"))); |
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.
Hey @lassevonpfeil. I just caught while testing: the URL here should have been menu.help.ask.url
instead of menu.help.getting_started.url
. Would you mind making another PR for this small fix? Thanks! cc @catilac
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.
Hi @lassevonpfeil just checking in. Would you be able to confirm whether or not you'll be able to make this small PR?
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.
Hi, sorry for the delay. Of course, will work on it asap.
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.
No problem at all! Just wanted to check in. Thank you so much, @lassevonpfeil :)
Added two links to the help menu bar. Opens either processing forum or GitHub issues tab in standard browser when clicked. Resolves Issue #1208
Implemented the new features in JavaEditor.java and also provided German language support.
Used Desktop.getDesktop() and then Desktop.browse(oURL) to follow the link.
I Placed the MenuItems between "Download official reference" and "library reference".
I will change the code ASAP when somethings bugging or the I messed up with the style guidelines.