You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2021/05/05 12:48:25 UTC

[GitHub] [netbeans] JaroslavTulach opened a new pull request #2938: Run/Debug single .java files outside of project in VSCode.

JaroslavTulach opened a new pull request #2938:
URL: https://github.com/apache/netbeans/pull/2938


   Single `.java` files without a project that contain main method should be executable/debuggable when one clicks on _Run main_ or _Debug main_. Steps to reproduce:
   
   * start `code` with an empty directory as a folder
   * Create a Java file in there with a `main` method.
   * Click _Run main_ and check if it is executed
   * Place breakpoint into the `main` method and check it is hit
   
   The functionality is currently available only on JDK11+.


-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] JaroslavTulach commented on a change in pull request #2938: Run/Debug single .java files outside of project in VSCode.

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] JaroslavTulach merged pull request #2938: Run/Debug single .java files outside of project in VSCode.

Posted by GitBox <gi...@apache.org>.
JaroslavTulach merged pull request #2938:
URL: https://github.com/apache/netbeans/pull/2938


   


-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] JaroslavTulach commented on a change in pull request #2938: Run/Debug single .java files outside of project in VSCode.

Posted by GitBox <gi...@apache.org>.
JaroslavTulach commented on a change in pull request #2938:
URL: https://github.com/apache/netbeans/pull/2938#discussion_r631069858



##########
File path: ide/extexecution/apichanges.xml
##########
@@ -92,6 +92,19 @@ is the proper place.
 
     <changes>
 
+        <change>
+            <api name="extexecution_api"/>
+            <summary>postExecution callback with exit code value</summary>
+            <version major="1" minor="61"/>
+            <date day="10" month="5" year="2020"/>

Review comment:
       ;-) Fixed 80dd766




-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] JaroslavTulach commented on pull request #2938: Run/Debug single .java files outside of project in VSCode.

Posted by GitBox <gi...@apache.org>.
JaroslavTulach commented on pull request #2938:
URL: https://github.com/apache/netbeans/pull/2938#issuecomment-839809211


   Merging, assuming the most recent change of `apichanges.xml` isn't going to break the build.


-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] JaroslavTulach commented on a change in pull request #2938: Run/Debug single .java files outside of project in VSCode.

Posted by GitBox <gi...@apache.org>.
JaroslavTulach commented on a change in pull request #2938:
URL: https://github.com/apache/netbeans/pull/2938#discussion_r631070834



##########
File path: java/java.api.common/src/org/netbeans/modules/java/api/common/singlesourcefile/DebugProcess.java
##########
@@ -23,25 +23,44 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
+import java.util.concurrent.Callable;
 import java.util.logging.Level;
-import java.util.logging.Logger;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import org.netbeans.api.java.platform.JavaPlatformManager;
 import org.openide.filesystems.FileObject;
 import org.openide.filesystems.FileUtil;
 
-/**
- *
- * @author Arunava Sinha
- */
-class DebugProcess {
+final class DebugProcess implements Callable<Process> {

Review comment:
       done in  4f9aedf 




-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] sdedic commented on a change in pull request #2938: Run/Debug single .java files outside of project in VSCode.

Posted by GitBox <gi...@apache.org>.
sdedic commented on a change in pull request #2938:
URL: https://github.com/apache/netbeans/pull/2938#discussion_r630747599



##########
File path: java/java.api.common/src/org/netbeans/modules/java/api/common/singlesourcefile/DebugProcess.java
##########
@@ -23,25 +23,44 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
+import java.util.concurrent.Callable;
 import java.util.logging.Level;
-import java.util.logging.Logger;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import org.netbeans.api.java.platform.JavaPlatformManager;
 import org.openide.filesystems.FileObject;
 import org.openide.filesystems.FileUtil;
 
-/**
- *
- * @author Arunava Sinha
- */
-class DebugProcess {
+final class DebugProcess implements Callable<Process> {

Review comment:
       Nitpick: `LaunchProcess` could be more appropriate as it does debug / run.




-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] entlicher commented on a change in pull request #2938: Run/Debug single .java files outside of project in VSCode.

Posted by GitBox <gi...@apache.org>.
entlicher commented on a change in pull request #2938:
URL: https://github.com/apache/netbeans/pull/2938#discussion_r630799343



##########
File path: ide/extexecution/apichanges.xml
##########
@@ -92,6 +92,19 @@ is the proper place.
 
     <changes>
 
+        <change>
+            <api name="extexecution_api"/>
+            <summary>postExecution callback with exit code value</summary>
+            <version major="1" minor="61"/>
+            <date day="10" month="5" year="2020"/>

Review comment:
       It's 2021 now.




-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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