本文整理匯總了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);
}
示例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();
}
}