Package eu.admire.workbench.visualeditor.wizard

Examples of eu.admire.workbench.visualeditor.wizard.LoadDispelFileAction


    }
  }
 
  @SuppressWarnings("restriction")
  public static DiagramEditor loadTestWorkflow(String fileName, Object test) {
    final LoadDispelFileAction loadDispel = new LoadDispelFileAction();
   
    final Action a = new Action() { };
   
    IWorkspaceRoot r = ResourcesPlugin.getWorkspace().getRoot();
    loadDispel.setActivePart(a,
        PlatformUI.getWorkbench().getActiveWorkbenchWindow(
            ).getActivePage().getActivePart());
   
    IProject project = r.getProject("testProject");
    IFile testFile = null;
    try {
      project.create(project.getWorkspace().newProjectDescription(
          "testProject"), null);
      project.open(null);

      testFile = addFileToProject(project, new Path(fileName),
          test.getClass().getResourceAsStream(fileName), null);
    } catch (CoreException e) {
      fail("Caught exception when creating project: " + e.getMessage());
    }
   
    loadDispel.selectionChanged(a, new StructuredSelection(testFile));
    loadDispel.run(a);
    DiagramEditorInput di = (DiagramEditorInput) PlatformUI.getWorkbench(
        ).getActiveWorkbenchWindow().getActivePage().getActiveEditor(
            ).getEditorInput();
    IEditorPart ep =  PlatformUI.getWorkbench(
        ).getActiveWorkbenchWindow().getActivePage().getActiveEditor();
View Full Code Here

TOP

Related Classes of eu.admire.workbench.visualeditor.wizard.LoadDispelFileAction

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.