Skip to content

Commit 206dd61

Browse files
author
jantje
committed
#1339 replaced LibraryDescriptor class by LibraryJson class
1 parent 743d816 commit 206dd61

File tree

4 files changed

+32
-44
lines changed

4 files changed

+32
-44
lines changed

io.sloeber.core/src/io/sloeber/core/api/IInstallLibraryHandler.java

+21-16
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import java.util.Map;
44

5+
import io.sloeber.core.api.Json.library.LibraryJson;
6+
57
/**
68
* this interface is to allow the ui to handle the automatic installation
79
* of libraries.
@@ -14,20 +16,23 @@
1416
*
1517
*/
1618

17-
public interface IInstallLibraryHandler {
18-
/**
19-
* The core will call this method to find out if you want to install
20-
* the libraries automatically or not
21-
*
22-
* @return true if you want libraries to beinstalled automatically
23-
*/
24-
abstract boolean autoInstall();
25-
/**
26-
* given the set of proposed libraries to install
27-
* let the user decide on what to install
28-
* @param proposedLibsToInstall the libraries Sloeber proposes to install
29-
*
30-
* @return The libraries the user wants to install
31-
*/
32-
abstract Map<String, LibraryDescriptor> selectLibrariesToInstall(Map<String, LibraryDescriptor> proposedLibsToInstall);
19+
public interface IInstallLibraryHandler {
20+
/**
21+
* The core will call this method to find out if you want to install
22+
* the libraries automatically or not
23+
*
24+
* @return true if you want libraries to beinstalled automatically
25+
*/
26+
abstract boolean autoInstall();
27+
28+
/**
29+
* given the set of proposed libraries to install
30+
* let the user decide on what to install
31+
*
32+
* @param proposedLibsToInstall
33+
* the libraries Sloeber proposes to install
34+
*
35+
* @return The libraries the user wants to install
36+
*/
37+
abstract Map<String, LibraryJson> selectLibrariesToInstall(Map<String, LibraryJson> proposedLibsToInstall);
3338
}

io.sloeber.core/src/io/sloeber/core/api/LibraryDescriptor.java

-16
This file was deleted.

io.sloeber.core/src/io/sloeber/core/core/DefaultInstallHandler.java

+9-10
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,19 @@
33
import java.util.Map;
44

55
import io.sloeber.core.api.IInstallLibraryHandler;
6-
import io.sloeber.core.api.LibraryDescriptor;
6+
import io.sloeber.core.api.Json.library.LibraryJson;
77

88
public class DefaultInstallHandler implements IInstallLibraryHandler {
99

10-
@Override
11-
public boolean autoInstall() {
12-
return false;
13-
}
10+
@Override
11+
public boolean autoInstall() {
12+
return false;
13+
}
1414

15+
@Override
16+
public Map<String, LibraryJson> selectLibrariesToInstall(Map<String, LibraryJson> proposedLibsToInstall) {
1517

16-
@Override
17-
public Map<String, LibraryDescriptor> selectLibrariesToInstall(Map<String, LibraryDescriptor> proposedLibsToInstall) {
18-
19-
return proposedLibsToInstall;
20-
}
18+
return proposedLibsToInstall;
19+
}
2120

2221
}

io.sloeber.ui/src/io/sloeber/ui/listeners/MyLibraryInstallHandler.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import java.util.Map;
44

55
import io.sloeber.core.api.IInstallLibraryHandler;
6-
import io.sloeber.core.api.LibraryDescriptor;
6+
import io.sloeber.core.api.Json.library.LibraryJson;
77
import io.sloeber.ui.helpers.MyPreferences;
88

99
public class MyLibraryInstallHandler implements IInstallLibraryHandler {
@@ -14,7 +14,7 @@ public boolean autoInstall() {
1414
}
1515

1616
@Override
17-
public Map<String, LibraryDescriptor> selectLibrariesToInstall(Map<String, LibraryDescriptor> proposedLibsToInstall) {
17+
public Map<String, LibraryJson> selectLibrariesToInstall(Map<String, LibraryJson> proposedLibsToInstall) {
1818
return proposedLibsToInstall;
1919
}
2020

0 commit comments

Comments
 (0)