|
1 | 1 | package io.sloeber.core;
|
2 | 2 |
|
3 | 3 | import static io.sloeber.core.common.Const.*;
|
4 |
| -import static io.sloeber.core.managers.InternalPackageManager.*; |
5 | 4 | import static org.eclipse.core.resources.IResource.*;
|
6 | 5 |
|
7 | 6 | import java.io.File;
|
|
42 | 41 | import org.osgi.service.prefs.Preferences;
|
43 | 42 |
|
44 | 43 | import cc.arduino.packages.discoverers.SloeberNetworkDiscovery;
|
45 |
| -import io.sloeber.core.api.PackageManager; |
| 44 | +import io.sloeber.core.api.BoardsManager; |
46 | 45 | import io.sloeber.core.common.Common;
|
47 | 46 | import io.sloeber.core.common.ConfigurationPreferences;
|
48 | 47 | import io.sloeber.core.common.InstancePreferences;
|
49 | 48 | import io.sloeber.core.listeners.ConfigurationChangeListener;
|
50 | 49 | import io.sloeber.core.listeners.IndexerListener;
|
51 | 50 | import io.sloeber.core.listeners.resourceChangeListener;
|
| 51 | +import io.sloeber.core.tools.PackageManager; |
52 | 52 |
|
53 | 53 | /**
|
54 | 54 | * generated code
|
@@ -207,14 +207,13 @@ private static void initializeImportantVariables() {
|
207 | 207 | try {
|
208 | 208 | workspace.setDescription(workspaceDesc);
|
209 | 209 | } catch (CoreException e) {
|
210 |
| - // TODO Auto-generated catch block |
211 |
| - e.printStackTrace(); |
| 210 | + Common.log(new Status(IStatus.ERROR, CORE_PLUGIN_ID, e.getMessage(), e)); |
212 | 211 | }
|
213 | 212 | // Make sure some important variables are being initialized
|
214 | 213 | InstancePreferences.setPrivateLibraryPaths(InstancePreferences.getPrivateLibraryPaths());
|
215 | 214 | InstancePreferences.setPrivateHardwarePaths(InstancePreferences.getPrivateHardwarePaths());
|
216 | 215 | InstancePreferences.setAutomaticallyImportLibraries(InstancePreferences.getAutomaticallyImportLibraries());
|
217 |
| - PackageManager.setJsonURLs(PackageManager.getJsonURLs()); |
| 216 | + BoardsManager.setJsonURLs(BoardsManager.getJsonURLs()); |
218 | 217 | }
|
219 | 218 |
|
220 | 219 | private void runPluginCoreStartInstantiatorJob() {
|
@@ -252,7 +251,7 @@ protected IStatus run(IProgressMonitor monitor) {
|
252 | 251 |
|
253 | 252 | installOtherStuff();
|
254 | 253 |
|
255 |
| - startup_Pluging(monitor); |
| 254 | + BoardsManager.startup_Pluging(monitor); |
256 | 255 |
|
257 | 256 | monitor.setTaskName("Done!");
|
258 | 257 | if (InstancePreferences.useBonjour()) {
|
@@ -418,14 +417,14 @@ private static void installOtherStuff() {
|
418 | 417 | }
|
419 | 418 | if (!localMakePath.append(MAKE_EXE).toFile().exists()) {
|
420 | 419 | IProgressMonitor monitor = new NullProgressMonitor();
|
421 |
| - Common.log(downloadAndInstall(MAKE_URL, MAKE_ZIP, localMakePath, false, monitor)); |
| 420 | + Common.log(PackageManager.downloadAndInstall(MAKE_URL, MAKE_ZIP, localMakePath, false, monitor)); |
422 | 421 | }
|
423 | 422 |
|
424 | 423 | // Install awk if needed
|
425 | 424 | IPath localAwkPath = ConfigurationPreferences.getAwkPath();
|
426 | 425 | if (!localAwkPath.append(AWK_EXE).toFile().exists()) {
|
427 | 426 | IProgressMonitor monitor = new NullProgressMonitor();
|
428 |
| - Common.log(downloadAndInstall(AWK_URL, AWK_ZIP, localAwkPath, false, monitor)); |
| 427 | + Common.log(PackageManager.downloadAndInstall(AWK_URL, AWK_ZIP, localAwkPath, false, monitor)); |
429 | 428 | }
|
430 | 429 | }
|
431 | 430 | }
|
|
0 commit comments