mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-29 18:52:13 +01:00
Preliminary support to online help/reference
This commit is contained in:
parent
d022111fde
commit
6b6866370a
@ -28,13 +28,14 @@
|
||||
*/
|
||||
package cc.arduino.contributions.packages.ui;
|
||||
|
||||
import cc.arduino.contributions.DownloadableContributionVersionComparator;
|
||||
import cc.arduino.contributions.VersionComparator;
|
||||
import cc.arduino.contributions.filters.InstalledPredicate;
|
||||
import cc.arduino.contributions.filters.BuiltInPredicate;
|
||||
import cc.arduino.contributions.filters.InstalledPredicate;
|
||||
import cc.arduino.contributions.packages.ContributedBoard;
|
||||
import cc.arduino.contributions.packages.ContributedHelp;
|
||||
import cc.arduino.contributions.packages.ContributedPlatform;
|
||||
import cc.arduino.contributions.packages.DownloadableContribution;
|
||||
import cc.arduino.contributions.DownloadableContributionVersionComparator;
|
||||
import cc.arduino.contributions.ui.InstallerTableCell;
|
||||
import cc.arduino.contributions.ui.listeners.DelegatingKeyListener;
|
||||
import cc.arduino.utils.ReverseComparator;
|
||||
@ -368,6 +369,19 @@ public class ContributedPlatformTableCell extends InstallerTableCell {
|
||||
}
|
||||
desc = desc.substring(0, desc.lastIndexOf(',')) + ".<br />";
|
||||
|
||||
ContributedHelp help = null;
|
||||
if (selected.getHelp() != null) {
|
||||
help = selected.getHelp();
|
||||
} else if (selected.getParentPackage().getHelp() != null) {
|
||||
help = selected.getParentPackage().getHelp();
|
||||
}
|
||||
if (help != null) {
|
||||
String url = help.getOnline();
|
||||
if (url != null && !url.isEmpty()) {
|
||||
desc += " " + format("<a href=\"{0}\">Online help</a><br/>", url);
|
||||
}
|
||||
}
|
||||
|
||||
String url = selected.getParentPackage().getWebsiteURL();
|
||||
if (url != null && !url.isEmpty()) {
|
||||
desc += " " + format("<a href=\"{0}\">More info</a>", url);
|
||||
|
@ -0,0 +1,7 @@
|
||||
package cc.arduino.contributions.packages;
|
||||
|
||||
public abstract class ContributedHelp {
|
||||
|
||||
public abstract String getOnline();
|
||||
|
||||
}
|
@ -46,6 +46,8 @@ public abstract class ContributedPackage {
|
||||
|
||||
public abstract List<ContributedTool> getTools();
|
||||
|
||||
public abstract ContributedHelp getHelp();
|
||||
|
||||
public ContributedPlatform findPlatform(String architecture, String version) {
|
||||
if (architecture == null || version == null) {
|
||||
return null;
|
||||
|
@ -47,6 +47,8 @@ public abstract class ContributedPlatform extends DownloadableContribution {
|
||||
|
||||
public abstract List<ContributedBoard> getBoards();
|
||||
|
||||
public abstract ContributedHelp getHelp();
|
||||
|
||||
private List<ContributedTool> resolvedTools = null;
|
||||
|
||||
private ContributedPackage parentPackage;
|
||||
|
Loading…
x
Reference in New Issue
Block a user