當前位置: 首頁>>代碼示例>>Java>>正文


Java SubProgressMonitor.SUPPRESS_SUBTASK_LABEL屬性代碼示例

本文整理匯總了Java中org.eclipse.core.runtime.SubProgressMonitor.SUPPRESS_SUBTASK_LABEL屬性的典型用法代碼示例。如果您正苦於以下問題:Java SubProgressMonitor.SUPPRESS_SUBTASK_LABEL屬性的具體用法?Java SubProgressMonitor.SUPPRESS_SUBTASK_LABEL怎麽用?Java SubProgressMonitor.SUPPRESS_SUBTASK_LABEL使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.eclipse.core.runtime.SubProgressMonitor的用法示例。


在下文中一共展示了SubProgressMonitor.SUPPRESS_SUBTASK_LABEL屬性的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: NoOverrideProgressMonitor

public NoOverrideProgressMonitor(IProgressMonitor monitor, int ticks) {
  super(monitor, ticks, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL);
}
 
開發者ID:eclipse,項目名稱:che,代碼行數:3,代碼來源:RenameTypeProcessor.java

示例2: removeIndexTree

/**
 * Removes the refactoring history index tree spanned by the specified file store.
 *
 * @param store the file store spanning the history index tree
 * @param monitor the progress monitor to use
 * @param task the task label to use
 * @throws CoreException if an error occurs while removing the index tree
 */
private static void removeIndexTree(
    final IFileStore store, final IProgressMonitor monitor, final String task)
    throws CoreException {
  try {
    monitor.beginTask(task, 16);
    final IFileInfo info =
        store.fetchInfo(
            EFS.NONE,
            new SubProgressMonitor(monitor, 1, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL));
    if (info.isDirectory()) {
      if (info.getName().equalsIgnoreCase(RefactoringHistoryService.NAME_HISTORY_FOLDER)) return;
      final IFileStore[] stores =
          store.childStores(
              EFS.NONE,
              new SubProgressMonitor(monitor, 1, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL));
      final IProgressMonitor subMonitor =
          new SubProgressMonitor(monitor, 1, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL);
      try {
        subMonitor.beginTask(
            RefactoringCoreMessages.RefactoringHistoryService_updating_history, stores.length);
        for (int index = 0; index < stores.length; index++) {
          final IFileInfo current =
              stores[index].fetchInfo(
                  EFS.NONE,
                  new SubProgressMonitor(
                      subMonitor, 1, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL));
          if (current.isDirectory()) {
            final char[] characters = stores[index].getName().toCharArray();
            for (int offset = 0; offset < characters.length; offset++) {
              if (Character.isDigit(characters[offset])) return;
              else continue;
            }
          }
        }
      } finally {
        subMonitor.done();
      }
    }
    final IFileStore parent = store.getParent();
    store.delete(
        0, new SubProgressMonitor(monitor, 1, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL));
    removeIndexTree(
        parent,
        new SubProgressMonitor(monitor, 12, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL),
        task);
  } finally {
    monitor.done();
  }
}
 
開發者ID:eclipse,項目名稱:che,代碼行數:57,代碼來源:RefactoringHistoryManager.java


注:本文中的org.eclipse.core.runtime.SubProgressMonitor.SUPPRESS_SUBTASK_LABEL屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。