当前位置: 首页>>代码示例>>Java>>正文


Java WarnOnDeletion.isWarnWhenDeleteItems方法代码示例

本文整理汇总了Java中com.intellij.openapi.diff.impl.dir.actions.popup.WarnOnDeletion.isWarnWhenDeleteItems方法的典型用法代码示例。如果您正苦于以下问题:Java WarnOnDeletion.isWarnWhenDeleteItems方法的具体用法?Java WarnOnDeletion.isWarnWhenDeleteItems怎么用?Java WarnOnDeletion.isWarnWhenDeleteItems使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.diff.impl.dir.actions.popup.WarnOnDeletion的用法示例。


在下文中一共展示了WarnOnDeletion.isWarnWhenDeleteItems方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: checkCanDelete

import com.intellij.openapi.diff.impl.dir.actions.popup.WarnOnDeletion; //导入方法依赖的package包/类
private boolean checkCanDelete(List<DirDiffElementImpl> elements) {
  if (WarnOnDeletion.isWarnWhenDeleteItems()) {
    int count = 0;
    for (DirDiffElementImpl element : elements) {
      if (element.getOperation() == DirDiffOperation.DELETE) {
        count++;
      }
    }
    if (count > 0) {
      if (!confirmDeletion(count)) {
        return false;
      }
    }
  }
  return true;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:DirDiffTableModel.java

示例2: checkCanDelete

import com.intellij.openapi.diff.impl.dir.actions.popup.WarnOnDeletion; //导入方法依赖的package包/类
private boolean checkCanDelete() {
  if (WarnOnDeletion.isWarnWhenDeleteItems()) {
    int count = 0;
    for (DirDiffElementImpl element : myElements) {
      if (element.getOperation() == DirDiffOperation.DELETE) {
        count++;
      }
    }
    if (count > 0) {
      if (!confirmDeletion(count)) {
        return false;
      }
    }
  }
  return true;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:17,代码来源:DirDiffTableModel.java

示例3: confirmDeletion

import com.intellij.openapi.diff.impl.dir.actions.popup.WarnOnDeletion; //导入方法依赖的package包/类
private static boolean confirmDeletion(int count) {
  DialogWrapper.DoNotAskOption option = new DialogWrapper.DoNotAskOption() {
    @Override
    public boolean isToBeShown() {
      return WarnOnDeletion.isWarnWhenDeleteItems();
    }

    @Override
    public void setToBeShown(boolean value, int exitCode) {
      WarnOnDeletion.setWarnWhenDeleteItems(value);
    }

    @Override
    public boolean canBeHidden() {
      return true;
    }

    @Override
    public boolean shouldSaveOptionsOnCancel() {
      return true;
    }

    @Override
    public String getDoNotShowMessage() {
      return "Do not ask me again";
    }
  };

  return DialogWrapper.OK_EXIT_CODE == Messages.showYesNoDialog("Delete " + count + " items?", "Confirm Delete",
                                                                "Delete",
                                                                CommonBundle.message("button.cancel"),
                                                                Messages.getQuestionIcon(),
                                                                option);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:35,代码来源:DirDiffTableModel.java


注:本文中的com.intellij.openapi.diff.impl.dir.actions.popup.WarnOnDeletion.isWarnWhenDeleteItems方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。