You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I create command class and send it to another method as a parameter, which in turn call the command gateway, navigation icon is shown in the place where command object is created and not where the send() method is called. It would be easier for the developer to navigate between command senders and handlers if the icon was shown where command is sent.
Here is an example:
public class CommandCreator {
public void createCommand() {
sendCommand(new TestCommand());
}
public void sendCommand(TestCommand command) {
commandGateway.send(command);
}
}
Current Behaviour
Navigation icon is shown next to the sendCommand(new TestCommand()); method.
Wanted Behaviour
Navigation icon should be shown next to the commandGateway.send(command); method.
Problem becomes more annoying when command creation is in one class and sending is in another.
The text was updated successfully, but these errors were encountered:
Hello @sopotsabadze, thanks for your feature request.
The reason we put the line marker on the constructor (or builder) invocation is that that is usually the place where the business decision is made. It's also easier to scan for the constructor invocations of concrete classes, instead of all calls to the CommandBus and CommandGateway (method invocation indices tend to be very slow, I tried that before).
Besides that, I assume you have a service that actually sends the command and the command is passed as a parameter. If that parameter is abstract (or even Object/Any), it would match a lot or all commands in your classpath, making navigation very tedious with a large list of options.
Considering these aspects I think it's better to leave the implementation as-is.
Enhancement Description
If I create command class and send it to another method as a parameter, which in turn call the command gateway, navigation icon is shown in the place where command object is created and not where the
send()
method is called. It would be easier for the developer to navigate between command senders and handlers if the icon was shown where command is sent.Here is an example:
Current Behaviour
Navigation icon is shown next to the
sendCommand(new TestCommand());
method.Wanted Behaviour
Navigation icon should be shown next to the
commandGateway.send(command);
method.Problem becomes more annoying when command creation is in one class and sending is in another.
The text was updated successfully, but these errors were encountered: