mirror of
https://github.com/sirjonasxx/G-Earth.git
synced 2024-11-26 18:30:52 +01:00
fix error when no extensions installed
This commit is contained in:
parent
16a014b96d
commit
a2d65d01b9
@ -45,6 +45,7 @@ public class InstalledOverview extends HOverview {
|
|||||||
|
|
||||||
installed = installed.subList(startIndex, Math.min(startIndex + limit, installed.size()));
|
installed = installed.subList(startIndex, Math.min(startIndex + limit, installed.size()));
|
||||||
Map<String, StoreExtension> nameToExt = new HashMap<>();
|
Map<String, StoreExtension> nameToExt = new HashMap<>();
|
||||||
|
// getExtensions() with no filtering includes outdated extensions
|
||||||
storeRepository.getExtensions().forEach(e -> nameToExt.put(e.getTitle(), e));
|
storeRepository.getExtensions().forEach(e -> nameToExt.put(e.getTitle(), e));
|
||||||
|
|
||||||
return installed.stream().map(i -> new StoreExtensionInstalledItem(nameToExt.get(i.getName()), i)).collect(Collectors.toList());
|
return installed.stream().map(i -> new StoreExtensionInstalledItem(nameToExt.get(i.getName()), i)).collect(Collectors.toList());
|
||||||
@ -59,8 +60,8 @@ public class InstalledOverview extends HOverview {
|
|||||||
public void buttonClick(GExtensionStore gExtensionStore) {
|
public void buttonClick(GExtensionStore gExtensionStore) {
|
||||||
try {
|
try {
|
||||||
Desktop.getDesktop().open(new File(StoreExtensionTools.EXTENSIONS_PATH));
|
Desktop.getDesktop().open(new File(StoreExtensionTools.EXTENSIONS_PATH));
|
||||||
} catch (IOException e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
// e.printStackTrace(); // no extensions installed yet, directory isnt created
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@ import gearth.services.internal_extensions.extensionstore.application.WebUtils;
|
|||||||
import gearth.services.internal_extensions.extensionstore.application.entities.StoreExtensionItem;
|
import gearth.services.internal_extensions.extensionstore.application.entities.StoreExtensionItem;
|
||||||
import gearth.services.internal_extensions.extensionstore.repository.models.StoreExtension;
|
import gearth.services.internal_extensions.extensionstore.repository.models.StoreExtension;
|
||||||
import gearth.services.internal_extensions.extensionstore.tools.InstalledExtension;
|
import gearth.services.internal_extensions.extensionstore.tools.InstalledExtension;
|
||||||
import netscape.javascript.JSObject;
|
|
||||||
import org.apache.maven.artifact.versioning.ComparableVersion;
|
import org.apache.maven.artifact.versioning.ComparableVersion;
|
||||||
|
|
||||||
public class StoreExtensionInstalledItem extends StoreExtensionItem {
|
public class StoreExtensionInstalledItem extends StoreExtensionItem {
|
||||||
|
Loading…
Reference in New Issue
Block a user