親/子ダイアログがどのように機能するかを本当に理解する必要があります。
私のユーザーは、Teamcenter という OTB アプリケーションを使用しています。Teamcenter アプリケーションのメニュー選択から呼び出されるアドオン アプリケーションを作成しています。
メニュー項目をクリックすると、ハンドラー クラスが実行され、アプリケーションのベース ダイアログが作成されます。
public class AplotDialogHandler extends AbstractHandler {
private static AplotBaseDialog dlg = null;
public AplotDialogHandler() {
}// end Constructor
//////////////////////////////////////////////////////////////////////////
// execute() //
//////////////////////////////////////////////////////////////////////////
@Override
public Object execute(final ExecutionEvent event) throws ExecutionException {
if (dlg == null) {
try {
AbstractAIFApplication app = AIFDesktop.getActiveDesktop().getCurrentApplication();
TCSession session = (TCSession) app.getSession();
TCUserService userService = session.getUserService();
AplotVersion.negotiateVersion(userService);
AplotQueryCapabilities.initialize(userService);
dlg = new AplotBaseDialog(null, session);
}
catch (Exception ex) {
MessageBox.post(HandlerUtil.getActiveWorkbenchWindowChecked(event).getShell(), ex, true);
}
}
dlg.create();
dlg.getShell().setSize(700, 400);
dlg.open();
return null;
}// end execute()
}// end EdiDialogHandler()
質問 1. 私のアプリケーションが Teamcenter アプリケーションに関連付けられていないようです。つまり、Teamcenter を閉じることができ、アプリケーションは開いたままになります。
質問 2. ワークスペース シェルを取得してベース ダイアログに渡す必要がありますか? ただし、アプリケーションが開いている場合でも、ユーザーは Teamcenter アプリケーションを使用してアプリケーションに送信するデータを選択できる必要があります。
質問 3. ベース ダイアログからダイアログを開くとき、常にベース ダイアログ シェルをそれらのダイアログに渡す必要がありますか?
質問 4. ユーザーが作業を終えたときにダイアログを閉じる標準的な方法はありますか?