mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
Improved code robustness
This commit is contained in:
@@ -46,6 +46,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TreeMap;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
@@ -231,11 +232,16 @@ public class Presenter implements IPlugInPort {
|
||||
importDefaultBlocks();
|
||||
}
|
||||
|
||||
public void installPlugin(IPlugIn plugIn) {
|
||||
LOG.info(String.format("installPlugin(%s)", plugIn.getClass().getSimpleName()));
|
||||
plugIns.add(plugIn);
|
||||
plugIn.connect(this);
|
||||
messageDispatcher.registerListener(plugIn);
|
||||
public void installPlugin(Supplier<IPlugIn> plugInSupplier) {
|
||||
try {
|
||||
IPlugIn plugIn = plugInSupplier.get();
|
||||
LOG.info(String.format("installPlugin(%s)", plugIn.getClass().getSimpleName()));
|
||||
plugIns.add(plugIn);
|
||||
plugIn.connect(this);
|
||||
messageDispatcher.registerListener(plugIn);
|
||||
} catch (Exception e) {
|
||||
LOG.error("Error while installing plugin", e);
|
||||
}
|
||||
}
|
||||
|
||||
public void dispose() {
|
||||
|
||||
@@ -3477,5 +3477,21 @@
|
||||
</changes>
|
||||
<url>https://github.com/bancika/diy-layout-creator/releases</url>
|
||||
</org.diylc.appframework.update.Version>
|
||||
<org.diylc.appframework.update.Version>
|
||||
<versionNumber>
|
||||
<major>4</major>
|
||||
<minor>16</minor>
|
||||
<build>0</build>
|
||||
</versionNumber>
|
||||
<releaseDate>2021-01-04 00:00:00.000 CET</releaseDate>
|
||||
<name></name>
|
||||
<changes>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>IMPROVEMENT</changeType>
|
||||
<description>Improved code robustness</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
</changes>
|
||||
<url>https://github.com/bancika/diy-layout-creator/releases</url>
|
||||
</org.diylc.appframework.update.Version>
|
||||
</a>
|
||||
</java.util.Arrays_-ArrayList>
|
||||
|
||||
Reference in New Issue
Block a user