Package org.tuba.spatschorke.diploma.representation.oodraw

Examples of org.tuba.spatschorke.diploma.representation.oodraw.IShapeProvider


    if (representation == null
        || !OODrawRepresentation.TYPE.equals(representation.getType()))
      return null;

    OODrawRepresentation ooRepresentation = (OODrawRepresentation) representation;
    IShapeProvider shapeProvider = ooRepresentation.getShapeProvider();

    IOfficeApplication officeApplication = EditorCorePlugin.getDefault()
        .getManagedLocalOfficeApplication();

    IDrawingDocument document;

    try {
      document = (IDrawingDocument) officeApplication
          .getDocumentService().constructNewDocument(IDocument.DRAW,
              DocumentDescriptor.DEFAULT_HIDDEN);
    } catch (NOAException e) {
      return null;
    } catch (OfficeApplicationException e) {
      return null;
    }

    IShapeFactory shapeFactory = document.getDrawPage(0).getShapeFactory();
    IShape shape = shapeProvider.provide(shapeFactory);

    File image;
    try {
      image = export(shape, document);
    } catch (Exception e) {
View Full Code Here


      if (object instanceof org.eclipse.gmf.runtime.notation.Edge) {
        org.eclipse.gmf.runtime.notation.Edge edge = (org.eclipse.gmf.runtime.notation.Edge) object;
        diagram.getEdges().add(new Edge(edge));
      }
    }
    IShapeProvider shapeProvider = new ShapeProvider(diagram);
    return new OODrawRepresentation(shapeProvider);
  }
View Full Code Here

TOP

Related Classes of org.tuba.spatschorke.diploma.representation.oodraw.IShapeProvider

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.