mirror of
https://github.com/arduino/Arduino.git
synced 2024-11-29 10:24:12 +01:00
Better names for ContributedLibrary dependencies fields
This commit is contained in:
parent
492553cde0
commit
745cb01ed5
@ -64,7 +64,7 @@ public abstract class ContributedLibrary extends DownloadableContribution {
|
||||
|
||||
public abstract List<String> getTypes();
|
||||
|
||||
public abstract List<ContributedLibraryDependency> getRequires();
|
||||
public abstract List<ContributedLibraryDependency> getDependencies();
|
||||
|
||||
public abstract List<String> getProvidesIncludes();
|
||||
|
||||
@ -146,8 +146,8 @@ public abstract class ContributedLibrary extends DownloadableContribution {
|
||||
}
|
||||
res += "\n";
|
||||
res += " requires :\n";
|
||||
if (getRequires() != null)
|
||||
for (ContributedLibraryDependency r : getRequires()) {
|
||||
if (getDependencies() != null)
|
||||
for (ContributedLibraryDependency r : getDependencies()) {
|
||||
res += " " + r;
|
||||
}
|
||||
res += "\n";
|
||||
|
@ -33,10 +33,10 @@ public abstract class ContributedLibraryDependency {
|
||||
|
||||
public abstract String getName();
|
||||
|
||||
public abstract String getVersionRequired();
|
||||
public abstract String getVersion();
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getName() + " " + getVersionRequired();
|
||||
return getName() + " " + getVersion();
|
||||
}
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ public abstract class LibrariesIndex {
|
||||
|
||||
public boolean resolveDependeciesOf(List<ContributedLibrary> solution,
|
||||
ContributedLibrary library) {
|
||||
List<ContributedLibraryDependency> requirements = library.getRequires();
|
||||
List<ContributedLibraryDependency> requirements = library.getDependencies();
|
||||
if (requirements == null) {
|
||||
// No deps for this library, great!
|
||||
return true;
|
||||
@ -160,7 +160,7 @@ public abstract class LibrariesIndex {
|
||||
|
||||
private List<ContributedLibrary> findMatchingDependencies(ContributedLibraryDependency dep) {
|
||||
List<ContributedLibrary> available = find(dep.getName());
|
||||
if (dep.getVersionRequired() == null || dep.getVersionRequired().isEmpty())
|
||||
if (dep.getVersion() == null || dep.getVersion().isEmpty())
|
||||
return available;
|
||||
|
||||
// XXX: The following part is actually never reached. The use of version
|
||||
|
@ -38,7 +38,7 @@ public class UnavailableContributedLibrary extends ContributedLibrary {
|
||||
private String version;
|
||||
|
||||
public UnavailableContributedLibrary(ContributedLibraryDependency dependency) {
|
||||
this(dependency.getName(), dependency.getVersionRequired());
|
||||
this(dependency.getName(), dependency.getVersion());
|
||||
}
|
||||
|
||||
public UnavailableContributedLibrary(String _name, String _version) {
|
||||
@ -101,7 +101,7 @@ public class UnavailableContributedLibrary extends ContributedLibrary {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ContributedLibraryDependency> getRequires() {
|
||||
public List<ContributedLibraryDependency> getDependencies() {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user