Examples of Diagram


Examples of org.eclipse.gmf.runtime.notation.Diagram

      protected CommandResult doExecuteWithResult(
          IProgressMonitor monitor, IAdaptable info)
          throws ExecutionException {
       
        Diagram diagram = ViewService.createDiagram(
            diagramRoot,
            CompilationUnitEditPart.MODEL_ID,
            DispelDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
        diagramResource.getContents().add(diagram);
        return CommandResult.newOKCommandResult();
View Full Code Here

Examples of org.eclipse.gmf.runtime.notation.Diagram

                .getModelElement());
        if (diagramVID != DispelFunctionEditPart.VISUAL_ID) {
          return CommandResult
              .newErrorCommandResult(Messages.DispelNewDiagramFileWizard_IncorrectRootError);
        }
        Diagram diagram = ViewService.createDiagram(
            diagramRootElementSelectionPage.getModelElement(),
            DispelFunctionEditPart.MODEL_ID,
            DispelDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
        diagramResource.getContents().add(diagram);
        return CommandResult.newOKCommandResult();
View Full Code Here

Examples of org.eclipse.gmf.runtime.notation.Diagram

        .getInstance().getDocumentProvider()
        .getDiagramDocument(anInput);
    if (document == null) {
      return StructuredSelection.EMPTY;
    }
    Diagram diagram = document.getDiagram();
    IFile file = WorkspaceSynchronizer.getFile(diagram.eResource());
    if (file != null) {
      eu.admire.visual.pmml.neuralnetwork._40.diagram.navigator.PMMLNavigatorItem item = new eu.admire.visual.pmml.neuralnetwork._40.diagram.navigator.PMMLNavigatorItem(
          diagram, file, false);
      return new StructuredSelection(item);
    }
View Full Code Here

Examples of org.eclipse.gmf.runtime.notation.Diagram

   * @generated
   */
  private Collection getDiagramLinksByType(Collection diagrams, String type) {
    Collection result = new ArrayList();
    for (Iterator it = diagrams.iterator(); it.hasNext();) {
      Diagram nextDiagram = (Diagram) it.next();
      result.addAll(selectViewsByType(nextDiagram.getEdges(), type));
    }
    return result;
  }
View Full Code Here

Examples of org.eclipse.gmf.runtime.notation.Diagram

        } else if (selectedElement instanceof IAdaptable) {
          selectedElement = ((IAdaptable) selectedElement)
              .getAdapter(View.class);
        }
        if (selectedElement instanceof Diagram) {
          Diagram diagram = (Diagram) selectedElement;
          if (eu.admire.visual.pmml.neuralnetwork._40.diagram.edit.parts.NeuralNetworkTypeEditPart.MODEL_ID
              .equals(eu.admire.visual.pmml.neuralnetwork._40.diagram.part.PMMLVisualIDRegistry
                  .getModelID(diagram))) {
            myDiagram = diagram;
          }
View Full Code Here

Examples of org.eclipse.gmf.runtime.notation.Diagram

      throws CoreException {
    IDiagramDocument diagramDocument = (IDiagramDocument) document;
    TransactionalEditingDomain domain = diagramDocument.getEditingDomain();
    if (element instanceof FileEditorInput) {
      IStorage storage = ((FileEditorInput) element).getStorage();
      Diagram diagram = DiagramIOUtil.load(domain, storage, true,
          getProgressMonitor());
      document.setContent(diagram);
    } else if (element instanceof URIEditorInput) {
      URI uri = ((URIEditorInput) element).getURI();
      Resource resource = null;
View Full Code Here

Examples of org.eclipse.gmf.runtime.notation.Diagram

                "Incorrect document used: " + document + " instead of org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument", null)); //$NON-NLS-1$ //$NON-NLS-2$
      }
      IDiagramDocument diagramDocument = (IDiagramDocument) document;
      final Resource newResource = diagramDocument.getEditingDomain()
          .getResourceSet().createResource(newResoruceURI);
      final Diagram diagramCopy = (Diagram) EcoreUtil
          .copy(diagramDocument.getDiagram());
      try {
        new AbstractTransactionalCommand(
            diagramDocument.getEditingDomain(),
            NLS
                .bind(
                    eu.admire.visual.pmml.neuralnetwork._40.diagram.part.Messages.PMMLDocumentProvider_SaveAsOperation,
                    diagramCopy.getName()), affectedFiles) {
          protected CommandResult doExecuteWithResult(
              IProgressMonitor monitor, IAdaptable info)
              throws ExecutionException {
            newResource.getContents().add(diagramCopy);
            return CommandResult.newOKCommandResult();
View Full Code Here

Examples of org.eclipse.gmf.runtime.notation.Diagram

  protected void initListeners() {
    EditPart p = getDiagramEditPart();
    if((p!=null)&&(p instanceof IGraphicalEditPart)) {
      IGraphicalEditPart g = (IGraphicalEditPart)p;
      editingDomain = g.getEditingDomain();
      Diagram d = null;
      Object m = g.getModel();
      String name = null;
      if((m!=null)&&(m instanceof Diagram)) {
        d = (Diagram)m;
        EObject eo = d.getElement();
        if(eo instanceof Package) {
          name =
            PackageHandler.buildFullyQualifiedName(
                (Package)eo
            );
View Full Code Here

Examples of org.eclipse.gmf.runtime.notation.Diagram

                .getModelElement());
        if (diagramVID != eu.admire.visual.pmml.neuralnetwork._40.diagram.edit.parts.NeuralNetworkTypeEditPart.VISUAL_ID) {
          return CommandResult
              .newErrorCommandResult(eu.admire.visual.pmml.neuralnetwork._40.diagram.part.Messages.PMMLNewDiagramFileWizard_IncorrectRootError);
        }
        Diagram diagram = ViewService
            .createDiagram(
                diagramRootElementSelectionPage
                    .getModelElement(),
                eu.admire.visual.pmml.neuralnetwork._40.diagram.edit.parts.NeuralNetworkTypeEditPart.MODEL_ID,
                eu.admire.visual.pmml.neuralnetwork._40.diagram.part.PMMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
View Full Code Here

Examples of org.eclipse.gmf.runtime.notation.Diagram

    if (operation instanceof ILayoutNodeOperation) {
            Iterator nodes = ((ILayoutNodeOperation) operation)
                .getLayoutNodes().listIterator();
            if (nodes.hasNext()) {
                View node = ((ILayoutNode) nodes.next()).getNode();
                Diagram container = node.getDiagram();                             
                if (container == null || !(container.getType().equals("PMML Visualization"))) //$NON-NLS-1$
                    return false;
            }
        } else {
            return false;
        }
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.