Package org.eclipse.emf.common.ui

Examples of org.eclipse.emf.common.ui.URIEditorInput


        getString("_WARN_No_Editor", uri.lastSegment()));
      return false;
    }
    else {
      try {
        page.openEditor(new URIEditorInput(uri), editorDescriptor.getId());
      }
      catch (PartInitException exception) {
        MessageDialog.openError(
          workbenchWindow.getShell(),
          getString("_UI_OpenEditorError_label"),
View Full Code Here


      }
    }
    URI uri = EcoreUtil.getURI(diagram);
    String editorName = uri.lastSegment()
        + "#" + diagram.eResource().getContents().indexOf(diagram); //$NON-NLS-1$
    IEditorInput editorInput = new URIEditorInput(uri, editorName);
    return editorInput;
  }
View Full Code Here

  public boolean test(Object receiver, String method, Object[] args,
      Object expectedValue) {
    if (false == receiver instanceof URIEditorInput) {
      return false;
    }
    URIEditorInput editorInput = (URIEditorInput) receiver;
    return "ontouml_diagram".equals(editorInput.getURI().fileExtension()); //$NON-NLS-1$
  }
View Full Code Here

   * @generated
   */
  protected void handleElementMoved(IEditorInput input, URI uri) {

    // TODO: append suffix to the URI! (use diagram as a parameter)
    fireElementMoved(input, new URIEditorInput(uri));
  }
View Full Code Here

        }
      }
      URI uri = EcoreUtil.getURI(myDiagram);
      String editorName = uri.lastSegment()
          + "#" + myDiagram.eResource().getContents().indexOf(myDiagram); //$NON-NLS-1$
      IEditorInput editorInput = new URIEditorInput(uri, editorName);
      return editorInput;
    }
View Full Code Here

   */
  public static boolean openDiagram(Resource diagram)
      throws PartInitException {
    IWorkbenchPage page = PlatformUI.getWorkbench()
        .getActiveWorkbenchWindow().getActivePage();
    page.openEditor(new URIEditorInput(diagram.getURI()),
        OntoUML.diagram.part.OntoUMLDiagramEditor.ID);
    return true;
  }
View Full Code Here

  public void doSaveAs() {
    String[] filters = FILE_EXTENSION_FILTERS.toArray(new String[FILE_EXTENSION_FILTERS.size()]);
    String[] files = OntoUMLEditorAdvisor.openFilePathDialog(getSite().getShell(), SWT.SAVE, filters);
    if (files.length > 0) {
      URI uri = URI.createFileURI(files[0]);
      doSaveAs(uri, new URIEditorInput(uri));
    }
  }
View Full Code Here

  public void doSaveAs() {
    String[] filters = FILE_EXTENSION_FILTERS.toArray(new String[FILE_EXTENSION_FILTERS.size()]);
    String[] files = OntoUMLEditorAdvisor.openFilePathDialog(getSite().getShell(), SWT.SAVE, filters);
    if (files.length > 0) {
      URI uri = URI.createFileURI(files[0]);
      doSaveAs(uri, new URIEditorInput(uri));
    }
  }
View Full Code Here

                      OntoUML.diagram.part.Messages.DiagramEditorActionBarAdvisor_DefaultFileEditorMessage,
                      fileURI.toFileString()));
      return false;
    } else {
      try {
        page.openEditor(new URIEditorInput(fileURI), editorDescriptor
            .getId());
      } catch (PartInitException exception) {
        MessageDialog
            .openError(
                workbenchWindow.getShell(),
View Full Code Here

      }
      else {
        // use EMF URI (readonly) input - will open without validation though...
        // (Could be improved, i.e. perform a download, make readonly, and keep in project,
        // or stored in tmp, and processed as the other linked resources..
        URIEditorInput uriInput = new URIEditorInput(URI.createURI(uri.toString()), name);
        super.init(site, uriInput);
        return;
      }
      return;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.emf.common.ui.URIEditorInput

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.