Skip to content

Commit 89eba8c

Browse files
committed
Removed bundled offline docs
The offline documentation is hard to update and gets outdated very quickly. Fix #8860
1 parent eb1e2ca commit 89eba8c

File tree

6 files changed

+25
-84
lines changed

6 files changed

+25
-84
lines changed

app/src/processing/app/Base.java

-54
Original file line numberDiff line numberDiff line change
@@ -2169,60 +2169,6 @@ static public void registerWindowCloseKeys(JRootPane root,
21692169
// .................................................................
21702170

21712171

2172-
static public void showReference(String filename) {
2173-
showReference("reference/www.arduino.cc/en", filename);
2174-
}
2175-
2176-
static public void showReference(String prefix, String filename) {
2177-
File referenceFolder = getContentFile(prefix);
2178-
File referenceFile = new File(referenceFolder, filename);
2179-
if (!referenceFile.exists())
2180-
referenceFile = new File(referenceFolder, filename + ".html");
2181-
2182-
if(referenceFile.exists()){
2183-
openURL(referenceFile.getAbsolutePath());
2184-
}else{
2185-
showWarning(tr("Problem Opening URL"), format(tr("Could not open the URL\n{0}"), referenceFile), null);
2186-
}
2187-
}
2188-
2189-
public static void showEdisonGettingStarted() {
2190-
showReference("reference/Edison_help_files", "ArduinoIDE_guide_edison");
2191-
}
2192-
2193-
static public void showArduinoGettingStarted() {
2194-
if (OSUtils.isMacOS()) {
2195-
showReference("Guide/MacOSX");
2196-
} else if (OSUtils.isWindows()) {
2197-
showReference("Guide/Windows");
2198-
} else {
2199-
openURL("http://www.arduino.cc/playground/Learning/Linux");
2200-
}
2201-
}
2202-
2203-
static public void showReference() {
2204-
showReference("Reference/HomePage");
2205-
}
2206-
2207-
2208-
static public void showEnvironment() {
2209-
showReference("Guide/Environment");
2210-
}
2211-
2212-
2213-
static public void showTroubleshooting() {
2214-
showReference("Guide/Troubleshooting");
2215-
}
2216-
2217-
2218-
static public void showFAQ() {
2219-
showReference("Main/FAQ");
2220-
}
2221-
2222-
2223-
// .................................................................
2224-
2225-
22262172
/**
22272173
* "No cookie for you" type messages. Nothing fatal or all that
22282174
* much of a bummer, but something to notify the user about.

app/src/processing/app/Editor.java

+21-14
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,11 @@
4646
import java.io.FileFilter;
4747
import java.io.FilenameFilter;
4848
import java.io.IOException;
49+
import java.io.UnsupportedEncodingException;
4950
import java.net.ConnectException;
5051
import java.net.URL;
5152
import java.net.URLClassLoader;
53+
import java.net.URLEncoder;
5254
import java.util.ArrayList;
5355
import java.util.Arrays;
5456
import java.util.Collections;
@@ -1134,29 +1136,29 @@ private JMenu buildHelpMenu() {
11341136
menu.setMnemonic(KeyEvent.VK_H);
11351137

11361138
JMenuItem item = new JMenuItem(tr("Getting Started"));
1137-
item.addActionListener(event -> Base.showArduinoGettingStarted());
1139+
item.addActionListener(event -> Base.openURL("https://www.arduino.cc/en/Guide"));
11381140
menu.add(item);
11391141

11401142
item = new JMenuItem(tr("Environment"));
1141-
item.addActionListener(event -> Base.showEnvironment());
1143+
item.addActionListener(event -> Base.openURL("https://www.arduino.cc/en/Guide/Environment"));
11421144
menu.add(item);
11431145

11441146
item = new JMenuItem(tr("Troubleshooting"));
1145-
item.addActionListener(event -> Base.showTroubleshooting());
1147+
item.addActionListener(event -> Base.openURL("https://support.arduino.cc/hc/en-us"));
11461148
menu.add(item);
11471149

11481150
item = new JMenuItem(tr("Reference"));
1149-
item.addActionListener(event -> Base.showReference());
1151+
item.addActionListener(event -> Base.openURL("https://www.arduino.cc/reference/en/"));
11501152
menu.add(item);
11511153

11521154
menu.addSeparator();
11531155

11541156
item = newJMenuItemShift(tr("Find in Reference"), 'F');
1155-
item.addActionListener(event -> handleFindReference(event));
1157+
item.addActionListener(event -> handleFindReference(getCurrentTab().getCurrentKeyword()));
11561158
menu.add(item);
11571159

11581160
item = new JMenuItem(tr("Frequently Asked Questions"));
1159-
item.addActionListener(event -> Base.showFAQ());
1161+
item.addActionListener(event -> Base.openURL("https://support.arduino.cc/hc/en-us"));
11601162
menu.add(item);
11611163

11621164
item = new JMenuItem(tr("Visit Arduino.cc"));
@@ -1553,20 +1555,25 @@ protected void removeTab(SketchFile file) throws IOException {
15531555
tabs.remove(index);
15541556
}
15551557

1558+
15561559
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15571560

1558-
void handleFindReference(ActionEvent e) {
1559-
String text = getCurrentTab().getCurrentKeyword();
15601561

1562+
void handleFindReference(String text) {
15611563
String referenceFile = base.getPdeKeywords().getReference(text);
1564+
String q;
15621565
if (referenceFile == null) {
1563-
statusNotice(I18n.format(tr("No reference available for \"{0}\""), text));
1566+
q = text;
1567+
} else if (referenceFile.startsWith("Serial_")) {
1568+
q = referenceFile.substring(7);
15641569
} else {
1565-
if (referenceFile.startsWith("Serial_")) {
1566-
Base.showReference("Serial/" + referenceFile.substring("Serial_".length()));
1567-
} else {
1568-
Base.showReference("Reference/" + referenceFile);
1569-
}
1570+
q = referenceFile;
1571+
}
1572+
try {
1573+
Base.openURL("https://www.arduino.cc/search?tab=&q="
1574+
+ URLEncoder.encode(q, "UTF-8"));
1575+
} catch (UnsupportedEncodingException e) {
1576+
e.printStackTrace();
15701577
}
15711578
}
15721579

app/src/processing/app/EditorTab.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ public void actionPerformed(ActionEvent e) {
247247
menu.add(item);
248248

249249
final JMenuItem referenceItem = new JMenuItem(tr("Find in Reference"));
250-
referenceItem.addActionListener(editor::handleFindReference);
250+
referenceItem.addActionListener(ev -> editor.handleFindReference(getCurrentKeyword()));
251251
menu.add(referenceItem);
252252

253253
final JMenuItem openURLItem = new JMenuItem(tr("Open URL"));

build/build.xml

-14
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,6 @@
214214

215215
<antcall target="assemble-examples" />
216216

217-
<mkdir dir="${target.path}/reference"/>
218-
219-
<antcall target="assemble-docs" />
220-
221217
<!-- Write the revision file! -->
222218
<echo file="${target.path}/lib/version.txt" message="${version}" />
223219

@@ -254,16 +250,6 @@
254250
</copy>
255251
</target>
256252

257-
<target name="assemble-docs" unless="no_docs">
258-
<!-- Unzip documentation -->
259-
<antcall target="unzip">
260-
<param name="archive_file" value="shared/reference-1.6.6-3.zip" />
261-
<param name="archive_url" value="https://downloads.arduino.cc/reference-1.6.6-3.zip" />
262-
<param name="final_folder" value="${target.path}/reference/www.arduino.cc" />
263-
<param name="dest_folder" value="${target.path}/reference/" />
264-
</antcall>
265-
</target>
266-
267253
<!-- copy library folder -->
268254
<target name="assemble-libraries" unless="light_bundle">
269255
<download-library name="Ethernet" version="2.0.0"/>

build/shared/reference-1.6.6-3.zip.sha

-1
This file was deleted.

build/shared/revisions.txt

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
ARDUINO 1.8.15 Not yet release
22

3+
[ide]
4+
* Removed the very outdated off-line documentation.
5+
36
[wifi-firmware]
47
* Added latest firmwares (up to version 1.4.8) for NINA-based boards
58

0 commit comments

Comments
 (0)