TransactionalEditingDomainImpl editingDomain = (TransactionalEditingDomainImpl) diagramEditor.getEditingDomain();
        editingDomain.getCommandStack().execute(new RecordingCommand(editingDomain) {
            @Override
            protected void doExecute() {
              //do something
            }
        });

EMF中模型不能直接编辑,需要有事务,支持undo redo。

相关文章:

  • 2022-01-17
  • 2021-12-18
  • 2021-08-06
  • 2021-05-20
  • 2021-10-27
  • 2021-09-29
  • 2021-09-07
猜你喜欢
  • 2021-06-11
  • 2021-10-21
  • 2022-12-23
  • 2021-10-11
  • 2021-06-17
  • 2021-09-05
  • 2021-10-04
相关资源
相似解决方案