Lines 69-75
Link Here
|
69 |
*/ |
69 |
*/ |
70 |
public class LastTargetExecuted implements BuildExecutionSupport.ActionItem { |
70 |
public class LastTargetExecuted implements BuildExecutionSupport.ActionItem { |
71 |
|
71 |
|
72 |
private LastTargetExecuted() {} |
72 |
private LastTargetExecuted() { |
|
|
73 |
} |
73 |
|
74 |
|
74 |
private File buildScript; |
75 |
private File buildScript; |
75 |
//private static int verbosity; |
76 |
//private static int verbosity; |
Lines 81-86
Link Here
|
81 |
private Boolean shouldSaveAllDocs; |
82 |
private Boolean shouldSaveAllDocs; |
82 |
private Predicate<String> canReplace; |
83 |
private Predicate<String> canReplace; |
83 |
private Predicate<String> canBeReplaced; |
84 |
private Predicate<String> canBeReplaced; |
|
|
85 |
private boolean wasRegistered; |
84 |
|
86 |
|
85 |
/** Called from {@link TargetExecutor}. */ |
87 |
/** Called from {@link TargetExecutor}. */ |
86 |
static LastTargetExecuted record( |
88 |
static LastTargetExecuted record( |
Lines 92-98
Link Here
|
92 |
@NullAllowed final Boolean shouldSaveAllDocs, |
94 |
@NullAllowed final Boolean shouldSaveAllDocs, |
93 |
@NonNull final Predicate<String> canReplace, |
95 |
@NonNull final Predicate<String> canReplace, |
94 |
@NonNull final Predicate<String> canBeReplaced, |
96 |
@NonNull final Predicate<String> canBeReplaced, |
95 |
Thread thread) { |
97 |
Thread thread, |
|
|
98 |
final boolean shouldRegister) { |
96 |
LastTargetExecuted rec = new LastTargetExecuted(); |
99 |
LastTargetExecuted rec = new LastTargetExecuted(); |
97 |
rec.buildScript = buildScript; |
100 |
rec.buildScript = buildScript; |
98 |
//LastTargetExecuted.verbosity = verbosity; |
101 |
//LastTargetExecuted.verbosity = verbosity; |
Lines 104-117
Link Here
|
104 |
rec.shouldSaveAllDocs = shouldSaveAllDocs; |
107 |
rec.shouldSaveAllDocs = shouldSaveAllDocs; |
105 |
rec.canReplace = canReplace; |
108 |
rec.canReplace = canReplace; |
106 |
rec.canBeReplaced = canBeReplaced; |
109 |
rec.canBeReplaced = canBeReplaced; |
107 |
BuildExecutionSupport.registerRunningItem(rec); |
110 |
if (shouldRegister) { |
|
|
111 |
BuildExecutionSupport.registerRunningItem(rec); |
112 |
} |
113 |
rec.wasRegistered = shouldRegister; |
108 |
return rec; |
114 |
return rec; |
109 |
} |
115 |
} |
110 |
|
116 |
|
111 |
static void finish(LastTargetExecuted exc) { |
117 |
static void finish(LastTargetExecuted exc) { |
112 |
BuildExecutionSupport.registerFinishedItem(exc); |
118 |
if (exc.wasRegistered) { |
|
|
119 |
BuildExecutionSupport.registerFinishedItem(exc); |
120 |
} |
113 |
} |
121 |
} |
114 |
|
122 |
|
115 |
/** |
123 |
/** |
116 |
* Get the last build script to be run. |
124 |
* Get the last build script to be run. |
117 |
* @return the last-run build script, or null if nothing has been run yet (or the build script disappeared etc.) |
125 |
* @return the last-run build script, or null if nothing has been run yet (or the build script disappeared etc.) |