Package org.eclipse.gmf.runtime.diagram.ui.editparts

Examples of org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart


    // there should be four children
    assertEditorHasChildren(1, editor);
   
    // check the contents
    ShapeNodeEditPart page = assertHasFrame(editor, "page");

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

    assertEditorFrame(editor_page);

    // it should have two forms
    assertEditorHasChildren(2, editor_page);
    ShapeNodeEditPart form1 = assertHasInputForm(editor_page, "form1");
    ShapeNodeEditPart form2 = assertHasInputForm(editor_page, "form2");
   
    // open up the first form
    editor_form1 = openDiagram(form1);

    assertEditorVisual(editor_form1);
   
    // it should have a domain attribute connected to an event trigger
    assertEditorHasChildren(8, editor_form1);
    ShapeNodeEditPart f1f1 = assertHasInputTextField(editor_form1, "f1");
    ShapeNodeEditPart f1f2 = assertHasInputTextField(editor_form1, "f2");
    ShapeNodeEditPart f1f3 = assertHasInputTextField(editor_form1, "f3");
    ShapeNodeEditPart f1f4 = assertHasInputTextField(editor_form1, "f4");
    ShapeNodeEditPart f1t1 = assertHasInputTextField(editor_form1, "t1");
    ShapeNodeEditPart f1t2 = assertHasInputTextField(editor_form1, "t2");
    ShapeNodeEditPart f1t3 = assertHasInputTextField(editor_form1, "t3");
    ShapeNodeEditPart f1t4 = assertHasInputTextField(editor_form1, "t4");
   
    // they should be connected
    assertHasSyncWire(editor_form1, f1f1, f1t1, "s1");
    assertHasSyncWire(editor_form1, f1f2, f1t2, "s2");
    assertHasSyncWire(editor_form1, f1f3, f1t3, "s3");
    assertHasSyncWire(editor_form1, f1f4, f1t4, "s4");
    assertNotShortcut(f1f1);
    assertNotShortcut(f1f2);
    assertNotShortcut(f1f3);
    assertNotShortcut(f1f4);
    assertShortcut(f1t1);
    assertShortcut(f1t2);
    assertShortcut(f1t3);
    assertShortcut(f1t4);

    // open up the next form
    editor_form2 = openDiagram(form2);
   
    assertEditorVisual(editor_form2);
   
    // it should have a domain attribute connected to an event trigger
    assertEditorHasChildren(8, editor_form2);
    ShapeNodeEditPart f2f1 = assertHasInputTextField(editor_form2, "f1");
    ShapeNodeEditPart f2f2 = assertHasInputTextField(editor_form2, "f2");
    ShapeNodeEditPart f2f3 = assertHasInputTextField(editor_form2, "f3");
    ShapeNodeEditPart f2f4 = assertHasInputTextField(editor_form2, "f4");
    ShapeNodeEditPart f2t1 = assertHasInputTextField(editor_form2, "t1");
    ShapeNodeEditPart f2t2 = assertHasInputTextField(editor_form2, "t2");
    ShapeNodeEditPart f2t3 = assertHasInputTextField(editor_form2, "t3");
    ShapeNodeEditPart f2t4 = assertHasInputTextField(editor_form2, "t4");
   
    // they should be connected
    assertHasSyncWire(editor_form2, f2f1, f2t1, "s1");
    assertHasSyncWire(editor_form2, f2f2, f2t2, "s2");
    assertHasSyncWire(editor_form2, f2f3, f2t3, "s3");
View Full Code Here


    // there should be three children (one of them is a shortcut)
    assertEditorHasChildren(3, editor);
   
    // check the contents
    ShapeNodeEditPart page = assertHasFrame(editor, "page");
    ShapeNodeEditPart op = assertHasOperation(editor, "op");
    ShapeNodeEditPart chained = assertHasEvent(editor, true, ModelPackage.eINSTANCE.getScope_OnInit());

    // they should be connected
    assertHasECARule(editor, chained, op, "run2");
    assertShortcut(chained);
    assertNotShortcut(page);
    assertNotShortcut(op);

    // open the page
    editor_page = openDiagram(page);

    assertEditorFrame(editor_page);

    // it should have a domain object
    assertEditorHasChildren(2, editor_page);
    ShapeNodeEditPart chained2 = assertHasEvent(editor_page, false, ModelPackage.eINSTANCE.getScope_OnInit());
    ShapeNodeEditPart op2 = assertHasOperation(editor_page, "op");

    // they should be connected
    assertHasECARule(editor_page, chained2, op2, "run2");
    assertShortcut(op2);
    assertNotShortcut(chained2);
View Full Code Here

    // debug
    String found = "";

    for (Object o : root.getDiagramEditPart().getChildren()) {
      if (o instanceof ShapeNodeEditPart) {
        ShapeNodeEditPart s = (ShapeNodeEditPart) o;
        // check for shortcut status if necessary
        if (!checkShortcut || isShortcut(s) == shortcutRequired) {
          EObject obj = s.resolveSemanticElement();
          if (objectClass.isInstance(obj)) {
            // check containing feature name
            NamedElement e = (NamedElement) obj;
            if (name == null || (e.getName() != null && e.getName().equals(name))) {
              if (containingFeature == null || containingFeature.equals(obj.eContainingFeature())) {
View Full Code Here

    // debug
    String found = "";

    for (Object o : root.getDiagramEditPart().getChildren()) {
      if (o instanceof ShapeNodeEditPart) {
        ShapeNodeEditPart s = (ShapeNodeEditPart) o;
        // check for shortcut status if necessary
        if (!checkShortcut || isShortcut(s) == shortcutRequired) {
          EObject obj = s.resolveSemanticElement();
          if (objectClass.isInstance(obj)) {
            // check containing feature name
            ENamedElement e = (ENamedElement) obj;
            if (name == null || (e.getName() != null && e.getName().equals(name))) {
              if (containingFeature == null || containingFeature.equals(obj.eContainingFeature())) {
View Full Code Here

    // debug
    String found = "";

    for (Object o : root.getDiagramEditPart().getChildren()) {
      if (o instanceof ShapeNodeEditPart) {
        ShapeNodeEditPart s = (ShapeNodeEditPart) o;
        // check for shortcut status if necessary
        if (!checkShortcut || isShortcut(s) == shortcutRequired) {
          EObject obj = s.resolveSemanticElement();
          if (objectClass.isInstance(obj)) {
            // check containing feature name
            DecisionNode e = (DecisionNode) obj;
            if (name == null || (e.getName() != null && e.getName().equals(name))) {
              if (containingFeature == null || containingFeature.equals(obj.eContainingFeature())) {
View Full Code Here

   * @return
   */
  public ShapeNodeEditPart assertHasSession(DiagramDocumentEditor root, String sessionName) {
    for (Object o : root.getDiagramEditPart().getChildren()) {
      if (o instanceof ShapeNodeEditPart) {
        ShapeNodeEditPart s = (ShapeNodeEditPart) o;
        EObject obj = s.resolveSemanticElement();
        if (obj instanceof Session) {
          Session p = (Session) obj;
          if (p.getName() != null && p.getName().equals(sessionName)) {
            assertNotNull(s);
            return s;
View Full Code Here

   * @return
   */
  public ShapeNodeEditPart assertHasStartNode(DiagramDocumentEditor root) {
    for (Object o : root.getDiagramEditPart().getChildren()) {
      if (o instanceof ShapeNodeEditPart) {
        ShapeNodeEditPart s = (ShapeNodeEditPart) o;
        EObject obj = s.resolveSemanticElement();
        if (obj instanceof StartNode) {
          assertNotNull(s);
          return s;
        }
      }
View Full Code Here

      boolean shortcutRequired) {
    String found = "";

    for (Object o : editor.getDiagramEditPart().getChildren()) {
      if (o instanceof ShapeNodeEditPart) {
        ShapeNodeEditPart s = (ShapeNodeEditPart) o;
        if (!checkShortcut || isShortcut(s) == shortcutRequired) {
          EObject obj = s.resolveSemanticElement();
          if (obj instanceof Value) {
            Value p = (Value) obj;
            if (p.getName().equals("fieldValue")) {
              assertNotNull(s);
              return s;
View Full Code Here

    // there should be four children
    assertEditorHasChildren(4, editor);

    // check the contents
    ShapeNodeEditPart page1 = assertHasFrame(editor, "page1");
    ShapeNodeEditPart page2 = assertHasFrame(editor, "page2");
    ShapeNodeEditPart store = assertHasDomainType(editor, "domainStore");
    ShapeNodeEditPart page4 = assertHasFrame(editor, "last signup user");

    // stop warnings
    assertNotNull(page1);
    assertNotNull(page2);
    assertNotNull(store);
View Full Code Here

      assertNotNull(iep);
      assertEquals("InternetApplication", iep.getBreadcrumb()); // it has no name
    }

    // check the contents
    ShapeNodeEditPart page2 = assertHasFrame(editor, "page2");

    // open the domain store
    org.openiaml.model.diagram.frame.part.IamlDiagramEditor ep2
      = (org.openiaml.model.diagram.frame.part.IamlDiagramEditor) openDiagram(page2);

    // if this is actually an ErrorEditPart, then an error has occured
    // (but it may not be obvious in the log what it is)
    assertEditorFrame(ep2);

    {
      org.openiaml.model.diagram.frame.edit.parts.FrameEditPart iep
        = (org.openiaml.model.diagram.frame.edit.parts.FrameEditPart) ep2.getDiagramEditPart();
      assertNotNull(iep);
      assertEquals("InternetApplication > Frame: 'page2'", iep.getBreadcrumb()); // it has no name
    }

    // check the contents
    ShapeNodeEditPart form = assertHasInputForm((DiagramDocumentEditor) ep2, "form");

    // open the domain store
    org.openiaml.model.diagram.visual.part.IamlDiagramEditor formd
      = (org.openiaml.model.diagram.visual.part.IamlDiagramEditor) openDiagram(form);

    // if this is actually an ErrorEditPart, then an error has occured
    // (but it may not be obvious in the log what it is)
    assertEditorVisual(formd);

    {
      org.openiaml.model.diagram.visual.edit.parts.VisibleThingEditPart iep
        = (org.openiaml.model.diagram.visual.edit.parts.VisibleThingEditPart) formd.getDiagramEditPart();
      assertNotNull(iep);
      assertEquals("InternetApplication > Frame: 'page2' > InputForm: 'form'", iep.getBreadcrumb()); // it has no name
    }

    // check the contents
    ShapeNodeEditPart form2 = assertHasInputForm((DiagramDocumentEditor) formd, "test form for BreadcrumbTestCase");

    // open the domain store
    org.openiaml.model.diagram.visual.part.IamlDiagramEditor formd2
      = (org.openiaml.model.diagram.visual.part.IamlDiagramEditor) openDiagram(form2);
View Full Code Here

TOP

Related Classes of org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart

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.