Conversation
| final IRuntimeEventListenerPort elpEnablePlugin = new IRuntimeEventListenerPort() { | ||
| public void receiveEvent(final String data) { | ||
| if (!propEnabled) { | ||
| propEnabled = true; |
There was a problem hiding this comment.
is propEnabled describes the state of an enabled (started) plugin, then I would suggest to
- start()
- propEnabled=true;
There was a problem hiding this comment.
start() does nothing and returns immediately, if propEnabled == false. Therefore propEnabled has to be set to true before starting.
|
|
||
| final IRuntimeEventListenerPort elpDisablePlugin = new IRuntimeEventListenerPort() { | ||
| public void receiveEvent(final String data) { | ||
| if (propEnabled) { |
There was a problem hiding this comment.
here it would be possible to call stop() first, but it wouldn't make any difference to my mind and it looks somewhat inconsistent with the order in elpEnablePlugin.
|
looks good. A complex solution for this could be to implement composition of bundle descriptors, so we could define generic functionality. But nevertheless let's merge until we have time to make something more generic. |
|
thanks for the review! |
👍 ok, will merge |
|
ok, created an issue for the generic solution: #309 |
If a model uses the ComPort plugin but is not used in all cases it's quite annoying to get the error message at model startup
COM port not found.This PR adds the possiblity to disable/enable the ComPort plugin by property and/or events.