0
假設我有一個Handler通過偵聽器將數據記錄到某個對象。如何在兩個命令處理程序之間進行通信
public Object execute(ExecutionEvent event) throws ExecutionException {
IHandlerService service;
IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
try {
RecordingDocument d = new RecordingDocument("TestProject", "Tester", true);
d.record();
MessageDialog.openInformation(
window.getShell(),
"JavaTV",
"You are now recording.");
} catch (CoreException e) {
e.printStackTrace();
}
return null;
}
該對象是在選擇某個菜單項並開始記錄到對象內的數據結構時創建的。
如何從不同的處理程序中檢索此文檔?如果有人使用菜單停止錄製,我需要這個。