1.通知EditPart显示和隐藏FeedBack
2.从EditPart中获取Command(当然,EditPart又会从EditPolicy去取Command)
3.在命令堆栈里执行Command。
AbstractTool里面的代码
/**
* Executes the given command on the command stack.
* @since 3.1
* @param command the command to execute
*/
protected void executeCommand(Command command) {
getDomain().getCommandStack().removeCommandStackEventListener
(commandStackListener);
try {
getDomain().getCommandStack()
.execute(command);
} finally {
getDomain().getCommandStack().addCommandStackEventListener
(commandStackListener);
}
}
4.更新鼠标光标
本文介绍如何通过EditPart来控制反馈的显示与隐藏,并从EditPart中获取Command进行命令堆栈执行的过程。主要涉及EditPart、EditPolicy以及Command等组件间的交互,包括命令的执行、鼠标光标的更新等内容。
390

被折叠的 条评论
为什么被折叠?



