lahodaj opened a new pull request, #7382:
URL: https://github.com/apache/netbeans/pull/7382

   The VS Code extension supports the (multi-)source file launcher using the 
RUN CONFIGURATION explorer tab. One can specify the command line options, which 
are then used when starting a file in the workspace.
   
   There are a few problems with that:
   - options like `-classpath` could contain relative paths, but NB will not 
resolve them
   - the default working directory is weird - it is the directory in which the 
file-to-run resides. That made sense for single-source launcher, but not 
anymore. And while runtime will resolve relative paths, it will resolve them to 
this weird working directory
   - for `--module-path`, the elements specified may be modules, or a 
directory, which contains the modules. But NB will only see module path which 
contains modules, and will not resolve modules inside the specified directory
   
   This patch:
   - when needed, computes "relevant" default working directory for files - it 
is a) the workspace folder that encloses the given file (which should be the 
common case), or, if that fails to find a workspace folder b) the workspace 
folder that is enclosed by the file's source root (for the case where the user 
opens just a part of the source root)
   - this relevant default working directory is then used as the working 
directory, unless overridden by the user
   - the working directory (either computed as above, or explicit) is used the 
base to resolve relative paths
   - when a module path contains a directory which does not contain 
`module-info.class`, it is interpreted as a directory consisting of a 
collection of modules, and will expand the module path to include these 
modules. This includes listening on the directory content, and updates to the 
module path when the content changes
   


-- 
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.

To unsubscribe, e-mail: [email protected]

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