@JavaName convert
convertMonitor :: ProgressMonitor -> Integer -> <Proc> SubMonitor
newChild :: SubMonitor -> Integer -> <Proc> ProgressMonitor
+ split :: SubMonitor -> Integer -> <Proc> ProgressMonitor
+ @JavaName "worked"
+ workedSM :: SubMonitor -> Integer -> <Proc> ()
importJava "org.eclipse.core.runtime.NullProgressMonitor" where
@JavaName "<init>"
createNullProgressMonitor :: () -> <Proc> ProgressMonitor
importJava "org.simantics.scl.osgi.SCLProgressMonitor" where
+ data SCLProgressMonitor
@JavaName "<init>"
sclProgressMonitor :: (String -> Float -> <Proc> ()) -> (() -> <Proc> ()) -> (() -> <Proc> Boolean) -> (Boolean -> <Proc> ()) -> (String -> <Proc> ()) -> (String -> <Proc> ()) -> (Float -> <Proc> ()) -> <Proc> ProgressMonitor
+ @JavaName "getWork"
+ sclProgressMonitorWork :: SCLProgressMonitor -> <Proc> Float
+ @JavaName "getSubTask"
+ sclProgressMonitorSubTask :: SCLProgressMonitor -> <Proc> String
+
\ No newline at end of file
public class SCLProgressMonitor implements IProgressMonitor {
+ int recordedWork = 0;
+ String currentSubtask = "";
+
private final Function2<String, Float, Tuple0> beginTask;
private final Function1<Tuple0, Tuple0> done;
private final Function1<Tuple0, Boolean> isCanceled;
@Override
public void subTask(String name) {
subTask.apply(name);
+ currentSubtask = name;
}
@Override
public void worked(int work) {
worked.apply(new Float(work));
+ recordedWork += work;
+ }
+
+ public float getWork() {
+ return recordedWork;
+ }
+
+ public String getSubTask() {
+ return currentSubtask;
}
}