Add PersistencyService to the reuse concept/plugin to enable easy undo?
Related to #4125 (closed)
Currently, the reuse functionality is completely based on the locally stored reuse libraries. Every time something is updated, it will be directly performed on the local folder/files.
This means that e.g. und and redo is not possible.
Maybe it would be better to add a PersistencyService for the reuse plugin (with a DummyTopLevelElement where all stored libraries will be attached to in the beginning and then a stack will be automatically be used in the background which should allow undo/redo.
Keep in mind: all actions like deleteElement, deleteLibrary, etc. need to be executed then within this new context, e.g.:
ICommandStackService css = ICommandStackService.getInstance(); css.runAsCommand(target, () -> { deleteReuseLibrary((ReuseLibrary) target); viewController.updateReuseLibraryView(); }); // target will lead then to the context root