File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
java/src/processing/mode/java Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 3636import java .util .zip .ZipEntry ;
3737import java .util .zip .ZipOutputStream ;
3838
39+ import java .net .URI ;
40+ import java .net .URISyntaxException ;
41+
3942import javax .swing .*;
4043import javax .swing .event .*;
4144import javax .swing .text .BadLocationException ;
@@ -327,6 +330,34 @@ public JMenu buildHelpMenu() {
327330
328331 menu .addSeparator ();
329332
333+ // Report a bug link opener
334+ item = new JMenuItem (Language .text ("menu.help.report" ));
335+ item .addActionListener (e -> {
336+ Desktop desktop = java .awt .Desktop .getDesktop ();
337+ try {
338+ URI oURL = new URI (Language .text ("menu.help.report.url" ));
339+ desktop .browse (oURL );
340+ } catch (IOException | URISyntaxException ex ) {
341+ throw new RuntimeException (ex );
342+ }
343+ });
344+ menu .add (item );
345+
346+ // Ask on the Forum link opener
347+ item = new JMenuItem (Language .text ("menu.help.ask" ));
348+ item .addActionListener (e -> {
349+ Desktop desktop = java .awt .Desktop .getDesktop ();
350+ try {
351+ URI oURL = new URI (Language .text ("menu.help.ask.url" ));
352+ desktop .browse (oURL );
353+ } catch (IOException | URISyntaxException ex ) {
354+ throw new RuntimeException (ex );
355+ }
356+ });
357+ menu .add (item );
358+
359+ menu .addSeparator ();
360+
330361 final JMenu libRefSubmenu = new JMenu (Language .text ("menu.help.libraries_reference" ));
331362
332363 // Adding this in case references are included in a core library,
You can’t perform that action at this time.
0 commit comments