コード例 #1
0
 /** @generated */
 public void run(IAction action) {
   LoadResourceAction.LoadResourceDialog loadResourceDialog =
       new LoadResourceAction.LoadResourceDialog(getWindow().getShell());
   if (Dialog.OK == loadResourceDialog.open()) {
     for (Iterator i = loadResourceDialog.getURIs().iterator(); i.hasNext(); ) {
       openEditor(getWindow().getWorkbench(), (URI) i.next());
     }
   }
 }
コード例 #2
0
ファイル: TarotEditorAdvisor.java プロジェクト: rhajamor/eef
 /**
  * Opens the editors for the files selected using the LoadResourceDialog.
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated
  */
 public void run(IAction action) {
   LoadResourceAction.LoadResourceDialog loadResourceDialog =
       new LoadResourceAction.LoadResourceDialog(getWindow().getShell());
   if (Window.OK == loadResourceDialog.open()) {
     for (URI uri : loadResourceDialog.getURIs()) {
       openEditor(getWindow().getWorkbench(), uri);
     }
   }
 }
コード例 #3
0
 /** @generated */
 public Object execute(ExecutionEvent event) throws ExecutionException {
   IEditorPart diagramEditor = HandlerUtil.getActiveEditorChecked(event);
   Shell shell = diagramEditor.getEditorSite().getShell();
   assert diagramEditor instanceof DiagramEditor;
   TransactionalEditingDomain editingDomain = ((DiagramEditor) diagramEditor).getEditingDomain();
   LoadResourceAction.LoadResourceDialog loadResourceDialog =
       new LoadResourceAction.LoadResourceDialog(shell, editingDomain);
   loadResourceDialog.open();
   return null;
 }