mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-26 20:54:22 +01:00
Add reference to packager in tools
This commit is contained in:
parent
3db7ec2de0
commit
8efed7f2d2
@ -42,6 +42,20 @@ public abstract class ContributedTool {
|
||||
|
||||
public abstract List<HostDependentDownloadableContribution> getSystems();
|
||||
|
||||
private ContributedPackage contributedPackage;
|
||||
|
||||
public ContributedPackage getPackage() {
|
||||
return contributedPackage;
|
||||
}
|
||||
|
||||
public void setPackage(ContributedPackage pack) {
|
||||
contributedPackage = pack;
|
||||
}
|
||||
|
||||
public String getPackager() {
|
||||
return contributedPackage.getName();
|
||||
}
|
||||
|
||||
public DownloadableContribution getDownloadableContribution(Platform platform) {
|
||||
for (HostDependentDownloadableContribution c : getSystems()) {
|
||||
if (c.isCompatible(platform))
|
||||
|
@ -104,6 +104,11 @@ public class ContributionsIndexer {
|
||||
.collect(Collectors.toList());
|
||||
|
||||
for (ContributedPackage pack : packages) {
|
||||
// Fill references to package in tools
|
||||
for (ContributedTool tool : pack.getTools()) {
|
||||
tool.setPackage(pack);
|
||||
}
|
||||
|
||||
for (ContributedPlatform platform : pack.getPlatforms()) {
|
||||
// Set a reference to parent packages
|
||||
platform.setParentPackage(pack);
|
||||
|
Loading…
x
Reference in New Issue
Block a user