1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-02-17 11:54:33 +01:00

Library search now works also for headers (.h) provided by libraries

Fixes #7604
This commit is contained in:
Cristian Maglie 2018-05-22 16:28:52 +02:00
parent e18261f486
commit 60021c1e63
2 changed files with 8 additions and 2 deletions

View File

@ -145,8 +145,12 @@ public class LibrariesIndexTableModel
}
ContributedLibrary latest = lib.getLatest();
String compoundTargetSearchText = latest.getName() + "\n" + latest.getParagraph()
+ "\n" + latest.getSentence();
String compoundTargetSearchText = latest.getName() + " "
+ latest.getParagraph() + " "
+ latest.getSentence();
if (latest.getProvidesIncludes() != null) {
compoundTargetSearchText += " " + latest.getProvidesIncludes();
}
if (!stringContainsAll(compoundTargetSearchText, selectedFilters)) {
return false;
}

View File

@ -65,6 +65,8 @@ public abstract class ContributedLibrary extends DownloadableContribution {
public abstract List<ContributedLibraryReference> getRequires();
public abstract List<String> getProvidesIncludes();
public static final Comparator<ContributedLibrary> CASE_INSENSITIVE_ORDER = (o1, o2) -> o1.getName().compareToIgnoreCase(o2.getName());
private Optional<UserLibrary> installedLib = Optional.empty();