Package com._1c.g5.v8.dt.import_
Class StatusLimiter
- java.lang.Object
-
- com._1c.g5.v8.dt.import_.StatusLimiter
-
public final class StatusLimiter extends Object
Utility methods to limit import multi-status contents.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.eclipse.core.runtime.IStatus
limitChildren(org.eclipse.core.runtime.IStatus status)
Converts provided multi status to short and simple to read result.static org.eclipse.core.runtime.IStatus
limitChildren(org.eclipse.core.runtime.IStatus status, int warningsLimit, int errorsLimit)
Converts provided multi status to short and simple to read result.
-
-
-
Method Detail
-
limitChildren
public static org.eclipse.core.runtime.IStatus limitChildren(org.eclipse.core.runtime.IStatus status)
Converts provided multi status to short and simple to read result. Status children will be limited with default limits. If providedstatus
is not multi, it will be returned without any change.Clients may use this method on result status from
IImportService.work(org.eclipse.core.resources.IProject, java.nio.file.Path, org.eclipse.core.runtime.IProgressMonitor)
before display it to user or write in UI log.Example of usage:
SomePlugin.getDefault().getLog().log(StatusLimiter.limitChildren(importStatus));
- Parameters:
status
- the status to convert and limit children, cannot benull
- Returns:
- converted limited status, never
null
-
limitChildren
public static org.eclipse.core.runtime.IStatus limitChildren(org.eclipse.core.runtime.IStatus status, int warningsLimit, int errorsLimit)
Converts provided multi status to short and simple to read result. Status children will be limited with provided limits. If providedstatus
is not multi, it will be returned without any change.Clients may use this method on result status from
IImportService.work(org.eclipse.core.resources.IProject, java.nio.file.Path, org.eclipse.core.runtime.IProgressMonitor)
before display it to user or write in UI log.Example of usage:
SomePlugin.getDefault().getLog().log(StatusLimiter.limitChildren(importStatus));
- Parameters:
status
- the status to convert and limit children, cannot benull
warningsLimit
- the limit for warnings or-1
if warning limit is not requirederrorsLimit
- the limit for errors or-1
if warning limit is not required- Returns:
- converted limited status, never
null
-
-