Community
Participate
Working Groups
In org.eclipse.gef.tools.AbstractConnectionCreationTool, method protected Cursor calculateCursor() { if (isInState(STATE_INITIAL)) { if (getCurrentCommand() != null) return getDefaultCursor(); } return super.calculateCursor(); } should be replaced by protected Cursor calculateCursor() { if (isInState(STATE_INITIAL)) { if (getCurrentCommand() != null && getCurrentCommand().canExecute()) return getDefaultCursor(); } return super.calculateCursor(); } Reason: Treatment of unexecutable commands and null commands should be the same across EditParts and Tools. Method getCommand() in org.eclipse.gef.editparts.AbstractEditPart returns an unexecutable command when one of the EditPart's installed EditPoliciys returns an unexecutable command, and ignores 'null commands' returned by installed EditPolicys (by chaining them which doesn't have any effect on an existing chain of commands). Method calculateCursor() in org.eclipse.gef.tools.AbstractConnectionCreationTool returns a default cursor (in state STATE_INITIAL) even if the current command is unexecutable, which contradicts the semantics of treating unexecutable commands in AbstractEditPart. Method calculateCursor() in AbstractTool also considers executability of the current command.