1.通知EditPart顯示和隐藏FeedBack
2.從EditPart中擷取Command(當然,EditPart又會從EditPolicy去取Command)
3.在指令堆棧裡執行Command。
AbstractTool裡面的代碼
protected void executeCommand(Command command) {
getDomain().getCommandStack().removeCommandStackEventListener
(commandStackListener);
try {
getDomain().getCommandStack()
.execute(command);
} finally {
getDomain().getCommandStack().addCommandStackEventListener
(commandStackListener);
}
}
4.更新滑鼠光标