JaroslavTulach commented on a change in pull request #2938:
URL: https://github.com/apache/netbeans/pull/2938#discussion_r635969684



##########
File path: 
ide/extexecution/src/org/netbeans/api/extexecution/ExecutionDescriptor.java
##########
@@ -622,11 +623,34 @@ Runnable getPreExecution() {
     @NonNull
     @CheckReturnValue
     public ExecutionDescriptor postExecution(@NullAllowed Runnable 
postExecution) {
+        return postExecution((__) -> {
+            postExecution.run();
+        });
+    }
+
+    /**
+     * Returns a descriptor with configured post execution runnable. This
+     * runnable is executed <i>after</i> the external execution itself
+     * (when invoked by {@link ExecutionService#run()}).
+     * <p>
+     * The default (not configured) value is <code>null</code>.
+     * <p>
+     * All other properties of the returned descriptor are inherited from
+     * <code>this</code>.
+     *
+     * @param postExecution post execution callback that receives exit code of 
the
+     *    execution, <code>null</code> allowed
+     * @return new descriptor with configured post execution callback
+     * @since 1.61
+     */
+    @NonNull
+    @CheckReturnValue
+    public ExecutionDescriptor postExecution(@NullAllowed Consumer<Integer> 
postExecution) {

Review comment:
       Get exit code when the execution is over.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to