Examples of DiagramEditorInput


Examples of org.eclipse.graphiti.ui.editor.DiagramEditorInput

        fragment = diagramResource.getURIFragment(e);
      }
    }
   
    diagramModelURI = diagramModelURI.appendFragment(fragment);
    DiagramEditorInput editorInput = new DiagramEditorInput(
        diagramModelURI, editingDomain,
        "eu.admire.workbench.visualeditor.DispelDiagramTypeProvider");
   
    try {
      PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
View Full Code Here

Examples of org.eclipse.graphiti.ui.editor.DiagramEditorInput

      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();
   
    assertTrue(ep instanceof DiagramEditor);
   
    DiagramEditor de = (DiagramEditor) ep;
    Diagram d = di.getDiagram();
   
    de.getDiagramTypeProvider().getFeatureProvider(
        ).updateIfPossible(new UpdateContext(d));
   
    return de;
View Full Code Here

Examples of org.eclipse.graphiti.ui.editor.DiagramEditorInput

        public String getXml() throws IOException {
          return IOUtils.loadText(uriInput.getURI().toURL().openStream(), "UTF-8");
        }
      };
        } else if (input instanceof DiagramEditorInput) {
            final DiagramEditorInput uriInput = (DiagramEditorInput) input;
            return new IRemoteCamelEditorInput() {

                @Override
                public String getUriText() {
                    return uriInput.getName();
                }

                @Override
                public String getXml() throws IOException {
                    try {
                        return IOUtils.loadText(new URI(uriInput.getUri().toString()).toURL().openStream(), "UTF-8");
                    } catch (URISyntaxException e) {
                        throw new IOException("Unable to resolve resource.", e);
                    }
                }
            };
View Full Code Here

Examples of org.eclipse.graphiti.ui.editor.DiagramEditorInput

    }
    activeRoute = newRoute;
    if (this.cache.containsKey(newRoute)) {
      this.activeConfig = this.cache.get(newRoute);
    } else {
      DiagramEditorInput oldInput = this.activeConfig.input;
      this.activeConfig = new DesignerCache();
      this.activeConfig.input = oldInput;
    }
    refreshDiagramContents();
  }
View Full Code Here

Examples of org.eclipse.graphiti.ui.editor.DiagramEditorInput

  public void setTransactionalEditingDomain(TransactionalEditingDomain editingDomain) {
//    this.editingDomain = editingDomain;
  }

  protected DiagramEditorInput getDiagramInput() {
    DiagramEditorInput diagramInput = null;
    IEditorInput input = getEditorInput();
    if (input instanceof DiagramEditorInput) {
      diagramInput = (DiagramEditorInput) input;
    }
    return diagramInput;
View Full Code Here

Examples of org.eclipse.graphiti.ui.editor.DiagramEditorInput

    uri = URI.createPlatformResourceURI(diagramFile.getFullPath().toString(), true);

    TransactionalEditingDomain domain = FileService.createEmfFileForDiagram(uri, diagram);

    String providerId = GraphitiUi.getExtensionManager().getDiagramTypeProviderId(diagram.getDiagramTypeId());
    final DiagramEditorInput editorInput = new Bpmn2DiagramEditorInput(EcoreUtil.getURI(diagram), domain,
        providerId);

    if (openEditor) {
      openEditor(editorInput);
    }
View Full Code Here

Examples of org.eclipse.graphiti.ui.editor.DiagramEditorInput

    if (input instanceof ActivitiDiagramEditorInput) {
      final ActivitiDiagramEditorInput adei = (ActivitiDiagramEditorInput) input;

      return adei.getDataFile();
    } else if (input instanceof DiagramEditorInput) {
      final DiagramEditorInput dei = (DiagramEditorInput) input;

      IPath path = new Path(dei.getUri().trimFragment().toPlatformString(true));

      return recreateDataFile(path);
    } else if (input instanceof FileEditorInput) {
      final FileEditorInput fei = (FileEditorInput) input;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.