File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
arduino-core/src/cc/arduino/contributions/packages Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,20 @@ public abstract class ContributedTool {
4242
4343 public abstract List <HostDependentDownloadableContribution > getSystems ();
4444
45+ private ContributedPackage contributedPackage ;
46+
47+ public ContributedPackage getPackage () {
48+ return contributedPackage ;
49+ }
50+
51+ public void setPackage (ContributedPackage pack ) {
52+ contributedPackage = pack ;
53+ }
54+
55+ public String getPackager () {
56+ return contributedPackage .getName ();
57+ }
58+
4559 public DownloadableContribution getDownloadableContribution (Platform platform ) {
4660 for (HostDependentDownloadableContribution c : getSystems ()) {
4761 if (c .isCompatible (platform ))
Original file line number Diff line number Diff line change @@ -104,6 +104,11 @@ public void parseIndex() throws Exception {
104104 .collect (Collectors .toList ());
105105
106106 for (ContributedPackage pack : packages ) {
107+ // Fill references to package in tools
108+ for (ContributedTool tool : pack .getTools ()) {
109+ tool .setPackage (pack );
110+ }
111+
107112 for (ContributedPlatform platform : pack .getPlatforms ()) {
108113 // Set a reference to parent packages
109114 platform .setParentPackage (pack );
You can’t perform that action at this time.
0 commit comments