Skip to content
This repository has been archived by the owner on Jan 5, 2021. It is now read-only.

Commit

Permalink
Merge pull request #833 from Yakindu/issue_832
Browse files Browse the repository at this point in the history
#832: Fixed NPE for update case. Added icons to build.properties.
  • Loading branch information
tkutz authored Jul 14, 2016
2 parents 62555a3 + 356b35b commit 60f80e4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion plugins/org.yakindu.sct.examples.wizard/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml
plugin.xml,\
icons/
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public EclipseGitProgressTransformer(final IProgressMonitor eclipseMonitor) {

@Override
public void start(final int totalTasks) {
// the number of sub tasks is 5 in case of a download operation, but we are always called with totalTasks=2
mainTask = SubMonitor.convert(root, 5);
}

Expand All @@ -40,7 +41,13 @@ public void beginTask(final String name, final int total) {
lastWorked = 0;
totalWork = total;

SubMonitor sub = mainTask.newChild(1);
SubMonitor sub;
if (mainTask != null) {
// fork a new child from main task to have accumulated progress bar update
sub = mainTask.newChild(1);
} else {
sub = SubMonitor.convert(root);
}

if (totalWork == UNKNOWN) {
subTask = SubMonitor.convert(sub, IProgressMonitor.UNKNOWN);
Expand Down

0 comments on commit 60f80e4

Please sign in to comment.