Package ag.ion.bion.workbench.office.editor.internal.ui.operations

Examples of ag.ion.bion.workbench.office.editor.internal.ui.operations.ConstructNewDocumentOperation


    if(!officeApplication.isActive()) {     
      NOAUIPlugin.startLocalOfficeApplication(getShell(), officeApplication);
    }
    if(officeApplication.isActive()) {
      INewDocumentRequest newDocumentRequest = getNewDocumentRequest();
      ConstructNewDocumentOperation constructNewDocumentOperation = new ConstructNewDocumentOperation(officeApplication,
          newDocumentRequest);
      try {
        getContainer().run(true, true, constructNewDocumentOperation);
      }
      catch(InterruptedException interruptedException) {
        //do not consume
        return false;
      }
      catch(InvocationTargetException invocationTargetException) {
        Throwable cause = invocationTargetException.getCause();
        ErrorDialog.openError(getShell(), Messages.AbstractNewDocumentWizard_dialog_error_title, cause.getMessage(),
            new Status(IStatus.ERROR, EditorUIPlugin.PLUGIN_ID, IStatus.ERROR, cause.getMessage(), cause));
      }
      final IFile file = constructNewDocumentOperation.getDocumentFile();
      if(file != null) {      
        try {
          IDE.openEditor(EditorUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage(), file);
        }
        catch(CoreException coreException) {
View Full Code Here

TOP

Related Classes of ag.ion.bion.workbench.office.editor.internal.ui.operations.ConstructNewDocumentOperation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.