DesignAndDeploy/dnd — pull request #34 by Patagonicus (2013-08-11 19:22:55+00:00)
Title: Rework FunctionBlocks

This pull request is intended to be a rework of how FunctionBlocks are defined and loaded. It is not yet finished, but this pull request can be used as a discussion platform for the new features. Some discussion was already done in #31.

The basic idea is to do as much analysis static as possible. The current model loads the FunctionBlocks to inspect them and before creating a Distribution and deploying that. We're going to switch to BCEL for static code analysis, so that no unknown code is execute inside of Eclipse (we obviously can't keep the code from being executed on the Modules).

For this to work I'm planning to do the following changes:

* FunctionBlock becomes a very simple abstract class, mostly just defining the methods a real FunctionBlock will implement. I may put the synchronization code back in, but it may be better to keep that somewhere else.
* Input will no longer be an Annotation but instead a generic class like Output. This also allows us to give the FunctionBlock programmers more control over how they want to process the input values.
* Output will mostly stay the same. I will remove ConnectionTargets, but I may introduce a similar (but simpler) class.
* Options will stay pretty much the same, but they will all be stored as Strings. I may add wrappers so that FunctionBlocks can interact with them as if they were other basic types like booleans or integer.
* DistributionGenerator and Deploy will work with the EMF model directly
* FunctionBlocks will no longer be send serialized to the Modules but instead just their important values (UUID, name, Options) will be send, so that the Modules can instantiate them