コード例 #1
0
  public SWTBotGefEditPart addPickOnMessage(
      SWTBotGefEditPart pickPart, String in, String[] operationInfo) {
    setFocus(pickPart);
    gEditor.clickContextMenu("Add OnMessage");
    save();

    // get the new ElseIfPart
    List<SWTBotGefEditPart> children = pickPart.children();
    SWTBotGefEditPart onMessagePart = children.get(children.size() - 1);
    // test the part
    if (!(onMessagePart.part().getModel() instanceof OnMessage)) {
      onMessagePart = children.get(children.size() - 2);
    }

    setFocus(onMessagePart);
    propsView.selectTab(0);
    SWTBot propsBot = propsView.bot();
    propsBot.tree().expandNode(operationInfo).select();
    propsBot.text(2).setText(in);
    save();

    log.info("Added [part=" + onMessagePart + ", name=Unnamed]");

    return onMessagePart;
  }
コード例 #2
0
 public void appendActivity(SWTBotGefEditPart toPart, String activity, String name) {
   setFocus(toPart);
   gEditor.clickContextMenu("Add").clickContextMenu(activity);
   propsView.selectTab(0);
   SWTBot propsBot = propsView.bot();
   propsBot.text(0).setText(name);
 }
 @Test
 public void testInlineEditing() throws Exception {
   openDialog();
   mBot.button("Add New Property").click();
   new NewPropertyInputDialogTestFixture("key2", "value2").inputData();
   // use index 1 since first tree is property page navigation tree
   CustomTree tree = new CustomTree(mBot.tree(1).widget);
   tree.click(0, 1);
   mBot.sleep(500);
   mBot.text("value2").setText("value3");
   mBot.button("OK").click();
   Thread.sleep(WAIT_TIME);
   AbstractUIRunner.syncRun(
       new ThrowableRunnable() {
         @Override
         public void run() throws Throwable {
           assertDeployedStrategy(
               mStrategy,
               mEngine,
               StrategyState.STOPPED,
               "Strategy1",
               "Claz",
               "Lang",
               "c:\\path",
               true,
               ImmutableMap.of("key2", "value3"));
         }
       });
 }
コード例 #4
0
 // DONE !
 public SWTBotGefEditPart addReceive(
     SWTBotGefEditPart toPart, String name, String var, String[] operationInfo) {
   appendActivity(toPart, "Receive", name);
   SWTBot propsBot = propsView.bot();
   propsView.selectTab(1);
   propsBot.tree().expandNode(operationInfo).select();
   propsBot.text(2).setText(var);
   save();
   SWTBotGefEditPart added = getEditPart(toPart, name);
   //		log.info("Added [part=" + added + ", name=" + name + "]");
   return added;
 }
コード例 #5
0
 // DONE !
 public SWTBotGefEditPart addInvoke(
     SWTBotGefEditPart toPart, String name, String in, String out, String[] operationInfo) {
   appendActivity(toPart, "Invoke", name);
   SWTBot propsBot = propsView.bot();
   propsView.selectTab(1);
   propsBot.tree().expandNode(operationInfo).select();
   propsBot.text(2).setText(in);
   propsBot.text(3).setText(out);
   // Save changes to update process model
   save();
   SWTBotGefEditPart added = getEditPart(toPart, name);
   //		log.info("Added [part=" + added + ", name=" + name + "]");
   return added;
 }
コード例 #6
0
  public SWTBotGefEditPart copyFixedToExpression(
      SWTBotGefEditPart assignPart, String from, String to) {
    setFocus(assignPart);
    propsView.selectTab(1);
    SWTBot propsBot = propsView.bot();
    propsBot.button("New").click();
    propsBot.comboBox(0).setSelection("Fixed Value");
    propsBot.comboBox(1).setSelection("Expression");

    propsBot.text().setText(from);
    propsBot.styledText().setText(to);
    save();

    return assignPart;
  }
コード例 #7
0
 public SWTBotGefEditPart copyFixedToVar(SWTBotGefEditPart assignPart, String exp, String[] to) {
   setFocus(assignPart);
   propsView.selectTab(1);
   SWTBot propsBot = propsView.bot();
   propsBot.button("New").click();
   propsBot.comboBox(0).setSelection("Fixed Value");
   propsBot.text().setText(exp);
   propsBot.tree().expandNode(to).select();
   save();
   // Initializer
   try {
     log.info("Initializer view was opend ... clicking YES.");
     bot.shell("Initializer").bot().button("Yes").click();
   } catch (Exception e) {
     log.warn(e.getMessage());
     log.info("Initializer view was not opened.");
   }
   return assignPart;
 }
コード例 #8
0
 public String getRightOperand() {
   return localBot.text(1).getText();
 }
コード例 #9
0
 public String getLeftOperand() {
   return localBot.text(0).getText();
 }