Andrei486 / uml-diagram-collab

0 stars 0 forks source link

Implement tracked commands and command tracker #47

Closed Andrei486 closed 8 months ago

Andrei486 commented 8 months ago

We need a way to choose, when creating a command, whether it should be "tracked". Tracked commands are the ones that should be sent to other users via TCP and added to the command stack, etc. Untracked commands are things like commands used to move or resize previews, which do not actually affect the diagram but still use commands.

One suggestion for implementation is to make a TrackedCommand implementing Command that wraps another command, and have factories be able to optionally create tracked comamnds (boolean to create? or separate method?). When a tracked command is executed, it should schedule the command to be run using Platform.runLater, and add it to the TCP queue of messages to send. For now we don't need a command stack.

Andrei486 commented 8 months ago

Now rolled into PR #59.