Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions build/shared/lib/languages/PDE.properties
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ menu.help.reference.download = Download Offline Reference
menu.help.libraries_reference = Libraries Reference
menu.help.tools_reference = Tools Reference
menu.help.empty = (empty)
menu.help.report = Report a bug
menu.help.ask = Ask on the Forum
menu.help.online = Online

# Only include the .url lines in the translation file if there
Expand All @@ -167,6 +169,8 @@ menu.help.foundation = The Processing Foundation
menu.help.foundation.url = https://processing.foundation/
menu.help.visit = Visit Processing.org
menu.help.visit.url = https://processing.org/
menu.help.report.url = https://github.com/processing/processing4/issues
menu.help.ask.url = https://discourse.processing.org


# ---------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions build/shared/lib/languages/PDE_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ menu.help.troubleshooting = Fehlerbehandlung
menu.help.faq = Häufig gestellte Fragen (FAQ)
menu.help.foundation = "The Processing Foundation"
menu.help.visit = Processing.org besuchen
menu.help.report = Einen Fehler melden
menu.help.ask = Im Forum fragen


# ---------------------------------------
Expand Down
31 changes: 31 additions & 0 deletions java/src/processing/mode/java/JavaEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;

import java.net.URI;
import java.net.URISyntaxException;

Copy link
Collaborator

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! 🎉

import javax.swing.*;
import javax.swing.event.*;
import javax.swing.text.BadLocationException;
Expand Down Expand Up @@ -327,6 +330,34 @@ public JMenu buildHelpMenu() {

menu.addSeparator();

// Report a bug link opener
item = new JMenuItem(Language.text("menu.help.report"));
item.addActionListener(e -> {
Desktop desktop = java.awt.Desktop.getDesktop();
try {
URI oURL = new URI(Language.text("menu.help.report.url"));
desktop.browse(oURL);
} catch (IOException | URISyntaxException ex) {
throw new RuntimeException(ex);
}
});
menu.add(item);

// Ask on the Forum link opener
item = new JMenuItem(Language.text("menu.help.ask"));
item.addActionListener(e -> {
Desktop desktop = java.awt.Desktop.getDesktop();
try {
URI oURL = new URI(Language.text("menu.help.ask.url"));
desktop.browse(oURL);
} catch (IOException | URISyntaxException ex) {
throw new RuntimeException(ex);
}
});
menu.add(item);

menu.addSeparator();

final JMenu libRefSubmenu = new JMenu(Language.text("menu.help.libraries_reference"));

// Adding this in case references are included in a core library,
Expand Down