mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-03 00:29:21 +01:00
Added Edison and Galileo help menus
This commit is contained in:
parent
5ff7b351d5
commit
65f285fa66
@ -2006,14 +2006,22 @@ public class Base {
|
|||||||
|
|
||||||
|
|
||||||
static public void showReference(String filename) {
|
static public void showReference(String filename) {
|
||||||
File referenceFolder = getContentFile("reference/arduino.cc/en");
|
showReference("reference/arduino.cc/en", filename);
|
||||||
|
}
|
||||||
|
|
||||||
|
static public void showReference(String prefix, String filename) {
|
||||||
|
File referenceFolder = getContentFile(prefix);
|
||||||
File referenceFile = new File(referenceFolder, filename);
|
File referenceFile = new File(referenceFolder, filename);
|
||||||
if (!referenceFile.exists())
|
if (!referenceFile.exists())
|
||||||
referenceFile = new File(referenceFolder, filename + ".html");
|
referenceFile = new File(referenceFolder, filename + ".html");
|
||||||
openURL(referenceFile.getAbsolutePath());
|
openURL(referenceFile.getAbsolutePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
static public void showGettingStarted() {
|
public static void showEdisonGettingStarted() {
|
||||||
|
showReference("reference/Edison_help_files", "ArduinoIDE_guide_edison");
|
||||||
|
}
|
||||||
|
|
||||||
|
static public void showArduinoGettingStarted() {
|
||||||
if (OSUtils.isMacOS()) {
|
if (OSUtils.isMacOS()) {
|
||||||
showReference("Guide/MacOSX");
|
showReference("Guide/MacOSX");
|
||||||
} else if (OSUtils.isWindows()) {
|
} else if (OSUtils.isWindows()) {
|
||||||
|
@ -1090,35 +1090,79 @@ public class Editor extends JFrame implements RunnerListener {
|
|||||||
item = new JMenuItem(_("Getting Started"));
|
item = new JMenuItem(_("Getting Started"));
|
||||||
item.addActionListener(new ActionListener() {
|
item.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
Base.showGettingStarted();
|
Base.showArduinoGettingStarted();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
menu.add(item);
|
menu.add(item);
|
||||||
|
|
||||||
item = new JMenuItem(_("Environment"));
|
item = new JMenuItem(_("Environment"));
|
||||||
item.addActionListener(new ActionListener() {
|
item.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
Base.showEnvironment();
|
Base.showEnvironment();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
menu.add(item);
|
menu.add(item);
|
||||||
|
|
||||||
item = new JMenuItem(_("Troubleshooting"));
|
item = new JMenuItem(_("Troubleshooting"));
|
||||||
item.addActionListener(new ActionListener() {
|
item.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
Base.showTroubleshooting();
|
Base.showTroubleshooting();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
menu.add(item);
|
menu.add(item);
|
||||||
|
|
||||||
item = new JMenuItem(_("Reference"));
|
item = new JMenuItem(_("Reference"));
|
||||||
item.addActionListener(new ActionListener() {
|
item.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
Base.showReference();
|
Base.showReference();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
menu.add(item);
|
menu.add(item);
|
||||||
|
|
||||||
|
menu.addSeparator();
|
||||||
|
|
||||||
|
item = new JMenuItem(_("Galileo Help"));
|
||||||
|
item.setEnabled(false);
|
||||||
|
menu.add(item);
|
||||||
|
|
||||||
|
item = new JMenuItem(_("Getting Started"));
|
||||||
|
item.addActionListener(new ActionListener() {
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
Base.showReference("reference/Galileo_help_files", "ArduinoIDE_guide_galileo");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
menu.add(item);
|
||||||
|
item = new JMenuItem(_("Troubleshooting"));
|
||||||
|
item.addActionListener(new ActionListener() {
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
Base.showReference("reference/Galileo_help_files", "Guide_Troubleshooting_Galileo");;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
menu.add(item);
|
||||||
|
|
||||||
|
menu.addSeparator();
|
||||||
|
|
||||||
|
item = new JMenuItem(_("Edison Help"));
|
||||||
|
item.setEnabled(false);
|
||||||
|
menu.add(item);
|
||||||
|
|
||||||
|
item = new JMenuItem(_("Getting Started"));
|
||||||
|
item.addActionListener(new ActionListener() {
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
Base.showReference("reference/Edison_help_files", "ArduinoIDE_guide_edison");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
menu.add(item);
|
||||||
|
item = new JMenuItem(_("Troubleshooting"));
|
||||||
|
item.addActionListener(new ActionListener() {
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
Base.showReference("reference/Edison_help_files", "Guide_Troubleshooting_Edison");;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
menu.add(item);
|
||||||
|
|
||||||
|
menu.addSeparator();
|
||||||
|
|
||||||
item = newJMenuItemShift(_("Find in Reference"), 'F');
|
item = newJMenuItemShift(_("Find in Reference"), 'F');
|
||||||
item.addActionListener(new ActionListener() {
|
item.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user