--- a/tool/run/plugins/spdx/create.java
+++ b/tool/run/plugins/spdx/create.java
@@ -186,8 +186,31 @@
setTitle("Creating SPDX from source folder");
+ // start the SPDX class
+ final DocumentCreate newSPDX = new DocumentCreate();
+
+ // launch a small thread to keep the progress updated
+ Thread thread = new Thread(){
+ @Override
+ public void run(){
+ // wait a little bit for things to start
+ utils.time.wait(4);
+ // keep repearing while things are being processed
+ while(newSPDX.isProcessing){
+ utils.time.wait(4);
+ setStatus("%1 files processed out of %1",
+ "" + newSPDX.filesProcessed,
+ "" + newSPDX.files.size());
+ }
+ }
+ };
+ thread.start();
+
+
+
+
// third step, create the SPDX document from the extracted files
- String result = createDocument(source, this);
+ String result = createDocument(source, this, newSPDX);
// all done here, explain where the SPDX document can be found
nextStep =
@@ -204,7 +227,6 @@
};
task.launch();
-
//request.setAnswer("Process launched as " + task.getUID());
request.setAnswer(utils.html.redirect("/basic/status"
+ "?ID=" + task.getUID(), 0, ""));
@@ -270,8 +292,11 @@
return;
}
+
+ final DocumentCreate newSPDX = new DocumentCreate();
+
// third step, create the SPDX document from the extracted files
- String result = createDocument(extractedFolder, this);
+ String result = createDocument(extractedFolder, this, newSPDX);
}
};
@@ -289,10 +314,11 @@
* @param extractedFolder The folder where source code files are located
* @param task the running task that will hold the status update
*/
- private String createDocument(File extractedFolder, RunningTask task){
+ private String createDocument(File extractedFolder, RunningTask task,
+ DocumentCreate newSPDX){
task.setStatus("Creating the SPDX document");
- // start the SPDX class
- DocumentCreate newSPDX = new DocumentCreate();
+
+
// do all the heavy work
String result = newSPDX.create(extractedFolder);
// count the time it took to run this task