Examples of DiagramDocumentEditor


Examples of org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor

*/
public class OverriddenPropertyMarker extends EclipseTestCaseHelper {
 
  private DiagramDocumentEditor initialize() throws Exception {
    // initialise and load
    DiagramDocumentEditor editor = initializeAndLoad(
        "OverriddenPropertyMarker.iaml",
        "src/org/openiaml/model/tests/eclipse/");
   
    assertEditorRoot(editor);
   
View Full Code Here

Examples of org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor

  /**
   * Test the root editor.
   */
  public void testRoot() throws Exception {
    // initialise and load
    DiagramDocumentEditor editor = initialize();
   
    {
      ShapeNodeEditPart part = assertHasFrame(editor, "Home");
      Frame e = (Frame) part.resolveSemanticElement();
      assertFalse(e.isIsGenerated());
View Full Code Here

Examples of org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor

  /**
   * Test the frame editor.
   */
  public void testFrame() throws Exception {
    // initialise and load
    DiagramDocumentEditor editor = initialize();
   
    ShapeNodeEditPart home = assertHasFrame(editor, "Home");
    DiagramDocumentEditor frame = openDiagram(home);
   
    assertEditorFrame(frame);
   
    {
      ShapeNodeEditPart part = assertHasOperation(frame, "Normal Operation");
View Full Code Here

Examples of org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor

        targetModel);
    IFile targetDiagram = getProject().getFile("generation-sync-multiple.iaml_diagram");
    copyFileIntoWorkspace("src/org/openiaml/model/tests/eclipse/generation-sync-multiple.iaml_diagram",
        targetDiagram);
   
    DiagramDocumentEditor editor = (DiagramDocumentEditor) loadDiagramFile(targetDiagram);
    assertEditorRoot(editor);

    // there should be four children
    assertEditorHasChildren(4, editor);
   
View Full Code Here

Examples of org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor

   
    Frame page = (Frame) part.resolveSemanticElement();
    assertEquals(page.getName(), "a page");
   
    // open diagram
    DiagramDocumentEditor sub = openDiagram(part);
    assertEditorFrame(sub);
   
    // check contents
    assertEditorHasChildren(2, sub);
    {
      ShapeNodeEditPart p = assertHasDomainAttribute(sub, "da");
      assertNotNull(p);
     
      DomainAttribute obj = (DomainAttribute) p.resolveSemanticElement();
      assertEquals(obj.getName(), "da");
    }
    {
      ShapeNodeEditPart p = assertHasDomainAttribute(sub, "fa");
      assertNotNull(p);
     
      DomainAttribute obj = (DomainAttribute) p.resolveSemanticElement();
      assertEquals(obj.getName(), "fa");
    }
   
    sub.close(false);
  }
View Full Code Here

Examples of org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor

     
      // directly, there is a button and a static value
      ShapeNodeEditPart button = assertHasButton(editor_page, "direct");
     
      // open the button
      DiagramDocumentEditor editor_button = openDiagram(button);
      try {
       
        // it has an event trigger onChange (not a shortcut)
        ShapeNodeEditPart event = assertHasEvent(editor_button, false, ModelPackage.eINSTANCE.getChangeable_OnChange());
       
        // there is a shortcutted operation
        ShapeNodeEditPart op = assertHasActivityOperation(editor_button, "some operation", true);
       
        // the event is connected to the op by a RunAction
        ConnectionNodeEditPart run = assertHasECARule(editor_button, event, op, "run");
       
        // there is also a shortcutted StaticValue, which is the parameter
        ShapeNodeEditPart staticValue = assertHasValue(editor_button, "parameter", true);
       
        // which is connected to the RunAction
        assertHasParameter(editor_button, staticValue, run);

        // there should only be three children (as above)
        assertEditorHasChildren(3, editor_button);

      } finally {
        editor_button.close(false);
      }
    } finally {
      editor_page.close(false);
    }
  }
View Full Code Here

Examples of org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor

     
      // get the active workbench editor part
      // based on IamlDiagramEditorUtil#openDiagram()
      IWorkbenchPage page = PlatformUI.getWorkbench()
        .getActiveWorkbenchWindow().getActivePage();
      DiagramDocumentEditor editor = (DiagramDocumentEditor) page.getActiveEditor();
     
      // export only one image
      exportDiagramThenClose(cls, editor, new SubProgressMonitor(monitor, 40));
     
      // finally, delete the diagram file
View Full Code Here

Examples of org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor

    // find the edit part for the page
    ShapeNodeEditPart pageNode = assertHasFrame(editor, "page1");

    // open the page
    DiagramDocumentEditor pageEditor = openDiagram(pageNode);
    assertNotNull(pageEditor);
    assertEditorFrame(pageEditor);

    // there shouldn't be anything here
    assertEditorHasChildren(0, pageEditor);
View Full Code Here

Examples of org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor

   * Tests loading the model file with the editor.
   *
   * @throws Exception
   */
  public void testLoadModel() throws Exception {
    DiagramDocumentEditor editor = initializeAndLoad(
        "shortcuts-root.iaml",
        "src/org/openiaml/model/tests/eclipse/",
        "shortcuts-root.iaml_diagram");
    assertEditorRoot(editor);

    // there should be three children
    assertEditorHasChildren(3, editor);

    // a primitive operation, a frame, and a shortcutted EventTrigger
    assertHasBuiltinOperation(editor, "op", false);
    ShapeNodeEditPart page = assertHasFrame(editor, "page", false);
    assertHasEvent(editor, true, ModelPackage.eINSTANCE.getScope_OnInit());

    // open the domain store
    DiagramDocumentEditor editor_page = openDiagram(page);

    assertEditorFrame(editor_page);

    // close editors
    ((DiagramDocumentEditor) editor_page).close(false);
View Full Code Here

Examples of org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor

    initializeModelFile(sourceModel, targetDiagram);
   
    assertTrue("the target diagram should have been created", targetDiagram.exists());
   
    // load up the editor
    DiagramDocumentEditor editor = (DiagramDocumentEditor) loadDiagramFile(targetDiagram);
   
    return editor;
  }
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.