30
30
package cc .arduino .contributions ;
31
31
32
32
import cc .arduino .UpdatableBoardsLibsFakeURLsHandler ;
33
- import cc .arduino .contributions . libraries . LibraryInstaller ;
33
+ import cc .arduino .cli . ArduinoCoreInstance ;
34
34
import cc .arduino .contributions .libraries .filters .UpdatableLibraryPredicate ;
35
35
import cc .arduino .contributions .packages .ContributionInstaller ;
36
36
import cc .arduino .contributions .packages .filters .UpdatablePlatformPredicate ;
@@ -53,19 +53,19 @@ public class ContributionsSelfCheck extends TimerTask implements NotificationPop
53
53
private final Base base ;
54
54
private final HyperlinkListener hyperlinkListener ;
55
55
private final ContributionInstaller contributionInstaller ;
56
- private final LibraryInstaller libraryInstaller ;
56
+ private final ArduinoCoreInstance core ;
57
57
private final ProgressListener progressListener ;
58
58
private final String boardsManagerURL = "http://boardsmanager/DropdownUpdatableCoresItem" ;
59
59
private final String libraryManagerURL = "http://librarymanager/DropdownUpdatableLibrariesItem" ;
60
60
61
61
private volatile boolean cancelled ;
62
62
private volatile NotificationPopup notificationPopup ;
63
63
64
- public ContributionsSelfCheck (Base base , HyperlinkListener hyperlinkListener , ContributionInstaller contributionInstaller , LibraryInstaller libraryInstaller ) {
64
+ public ContributionsSelfCheck (Base base , HyperlinkListener hyperlinkListener , ContributionInstaller contributionInstaller , ArduinoCoreInstance core ) {
65
65
this .base = base ;
66
66
this .hyperlinkListener = hyperlinkListener ;
67
67
this .contributionInstaller = contributionInstaller ;
68
- this .libraryInstaller = libraryInstaller ;
68
+ this .core = core ;
69
69
this .progressListener = new NoopProgressListener ();
70
70
this .cancelled = false ;
71
71
}
@@ -176,13 +176,13 @@ public void onOptionalButton2Callback() {
176
176
goToManager (libraryManagerURL );
177
177
}
178
178
179
- static boolean checkForUpdatablePlatforms () {
179
+ boolean checkForUpdatablePlatforms () {
180
180
return BaseNoGui .indexer .getPackages ().stream ()
181
181
.flatMap (pack -> pack .getPlatforms ().stream ())
182
182
.anyMatch (new UpdatablePlatformPredicate ());
183
183
}
184
184
185
- static boolean checkForUpdatableLibraries () {
185
+ boolean checkForUpdatableLibraries () {
186
186
return BaseNoGui .librariesIndexer .getIndex ().getLibraries ().stream ()
187
187
.anyMatch (new UpdatableLibraryPredicate ());
188
188
}
@@ -201,7 +201,7 @@ private void updateLibrariesIndex() {
201
201
return ;
202
202
}
203
203
try {
204
- libraryInstaller . updateIndex (progressListener );
204
+ core . updateLibrariesIndex (progressListener );
205
205
} catch (Exception e ) {
206
206
// ignore
207
207
}
0 commit comments