コード例 #1
0
 @Override
 protected boolean canHandleShellCloseEvent() {
   if (FileActionDialog.getDisablePopup()) {
     return true;
   }
   if (MessageDialog.openQuestion(
       getShell(), Messages.handleShellCloseEventTitle, Messages.handleShellCloseEventMessage)) {
     return super.canHandleShellCloseEvent();
   }
   return false;
 }
コード例 #2
0
  public void removeConnectorDefinition(final String name, final String version) {
    SWTBotConnectorTestUtil.activateConnectorDefEditionShell(bot);
    bot.tree().setFocus();
    bot.waitUntil(
        new ICondition() {

          public boolean test() throws Exception {
            bot.tree()
                .select("Uncategorized")
                .expandNode("Uncategorized")
                .select(name + " (" + version + ")");
            return bot.tree().selectionCount() > 0;
          }

          public void init(SWTBot bot) {}

          public String getFailureMessage() {
            return "Cannot select tree item";
          }
        },
        10000,
        1000);

    assertNotNull(
        "could not find" + name + " (" + version + ")",
        bot.tree()
            .select("Uncategorized")
            .expandNode("Uncategorized")
            .getNode(name + " (" + version + ")"));
    bot.tree()
        .select("Uncategorized")
        .expandNode("Uncategorized")
        .select(name + " (" + version + ")");
    bot.button("Delete").click();
    if (!FileActionDialog.getDisablePopup()) {
      bot.waitUntil(Conditions.shellIsActive("Delete?"));
      bot.button(IDialogConstants.YES_LABEL).click();
    }
    bot.button(IDialogConstants.CANCEL_LABEL).click();
  }
コード例 #3
0
 @BeforeClass
 public static void setUpBeforeClass() {
   disablePopup = FileActionDialog.getDisablePopup();
   FileActionDialog.setDisablePopup(true);
 }