DLR-RM / RAFCON

RAFCON (RMC advanced flow control) uses hierarchical state machines, featuring concurrent state execution, to represent robot programs. It ships with a graphical user interface supporting the creation of state machines and contains IDE like debugging mechanisms. Alternatively, state machines can programmatically be generated using RAFCON's API.
https://dlr-rm.github.io/RAFCON/
Eclipse Public License 1.0
180 stars 34 forks source link

Let tabs inherit from ExtendedController #435

Open franzlst opened 4 years ago

franzlst commented 4 years ago

Currently, both the StateMachinesEditorController and the StatesEditorController create the tabs themselves and keep them up to date. With increasing information in the tabs, this blows up the code in those controllers, in addition, it violates the single responsibility principle.

Therefore, I think tabs should become ExtendedControllers themselves and thus observe and react to their desired models.

Originally created by @franzlst (Franz.Steinmetz@dlr.de) at 2017-11-22 09:05:21+00:00 (moved from RMC internal repository)

franzlst commented 4 years ago

I also thought about this kind of solution while fixing issue #424 and refactoring the StateMachinesEditorController. What I don't like about this design is, that the controller would adapt/change elements which are not part of the StateMachineEditor- or StateEditor-Controller view attribute because the tab label is a part of the notebook class or better of the page in the notebook. Thereby a clean implementation would create a new Hierarchy in the controller structure and would hold the NoteBookPage view.

So basically you are talking about a State- or StateMachine-NoteBookPageController which both will be strongly different.

I would at this point also discuss the option to create a utils NoteBookController as a utils class which integrates the duplicated and abstract interfaces StatesEditor- and StateMachines-EditorController are implementing so that both can inherit from those class. This will reduce the cascade and number of generated controller from my point of view.

Originally created by @Rbelder at 2017-11-22 11:08:39+00:00 (moved from RMC internal repository)