theia-ide / sprotty

A next-gen web-based graphics framework
Apache License 2.0
138 stars 23 forks source link

[client] DiagramServer.handleXXX API is unsuggestive #222

Open JanKoehnlein opened 6 years ago

JanKoehnlein commented 6 years ago

These lines from DiagramServer make me think

handle(action: Action): void | ICommand {
        const forwardToServer = this.handleLocally(action);
        if (forwardToServer) {
            ...
            this.sendMessage(message);
        }
 }

Our handleXXX methods should return true if the action was handled, not the other way around.