-
Notifications
You must be signed in to change notification settings - Fork 867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for relative paths in the source file launcher's paths; automatic expanding of modular paths. #7382
Support for relative paths in the source file launcher's paths; automatic expanding of modular paths. #7382
Conversation
FWIW, see: |
feel free to ignore the failing macos fs test. It tests things which the file system impl doesn't guarantee - we have to fix this at some point / clean up the fs tests in general, since the macos test isn't even platform specific. |
...le.launcher/src/org/netbeans/modules/java/file/launcher/queries/MultiSourceRootProvider.java
Outdated
Show resolved
Hide resolved
Looking forward to test-drive this feature! 🤓 |
ba4a0c7
to
9fb7ba2
Compare
Unless there are objections, I'll integrate once/if tests will pass. |
I saw this exception twice in CI logs of this PR: I don't remember this being a common failure. (CV tests on linux typically don't need retries) @lahodaj do you think this relates to the changes made here?
|
Hmm, I think there's surely a latent bug in Let's see how that goes. |
…atic expanding of modular paths; support for @argfiles.
3e47c08
to
3eae6ef
Compare
this seems to be causing an exceptions when the code formatting options are opened (e.g via options dialog or project properties window):
|
filled #7508 so that we don't forget about this |
…kspace with no client workspace folders in order to obtain the configured options Issue: ------ When a single-source file is opened in a workspace with no workspace folders, the global workspace options need to be made available to the operations done on that file. - In apache#7382, SingleFileOptionsQueryImpl introduced search for a single source file's parent in open workspaces' folders. - However, when setConfiguration() is invoked with null workDirectory, the options for the workspace are not made available to single-source files which are outside any workspace folders. Fix: ---- 1. Fixed SingleFileOptionsQueryImpl.optionsFor(): - to: associate a single-source file's parent with a workspace having no client workspace folders, - when: it has no associated workspace folder. 2. Updated the associated unit tests in SingleFileOptionsQueryImplTest.
…kspace with no client workspace folders in order to obtain the configured options Issue: ------ When a single-source file is opened in a workspace with no workspace folders, the global workspace options need to be made available to the operations done on that file. - In apache#7382, SingleFileOptionsQueryImpl introduced search for a single source file's parent in open workspaces' folders. - However, when setConfiguration() is invoked with null workDirectory, the options for the workspace are not made available to single-source files which are outside any workspace folders. Fix: ---- 1. Fixed SingleFileOptionsQueryImpl.optionsFor(): - to: associate a single-source file's parent with a workspace having no client workspace folders, - when: it has no associated workspace folder. 2. Updated the associated unit tests in SingleFileOptionsQueryImplTest. Signed-off-by: Siddharth Srinivasan <siddharth.srinivasan@oracle.com>
…kspace with no client workspace folders in order to obtain the configured options Issue: ------ When a single-source file is opened in a workspace with no workspace folders, the global workspace options need to be made available to the operations done on that file. - In apache#7382, SingleFileOptionsQueryImpl introduced search for a single source file's parent in open workspaces' folders. - However, when setConfiguration() is invoked with null workDirectory, the options for the workspace are not made available to single-source files which are outside any workspace folders. Fix: ---- 1. Fixed SingleFileOptionsQueryImpl.optionsFor(): - to: associate a single-source file's parent with a workspace that is the only open workspace, - when: it has no associated workspace folder. 2. Updated the associated unit tests in SingleFileOptionsQueryImplTest. 3. Added checks for null and ConcurrentModificationException when iterating over the workspace2Settings Map (which is a WeakHashMap). 4. Incorporated the review suggestion to perform a workspaces set copy in the synchronized block of SingleFileOptionsQueryImpl.optionsFor(); - in place of a try-catch of ConcurrentModificationException. Signed-off-by: Siddharth Srinivasan <siddharth.srinivasan@oracle.com>
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:
-classpath
could contain relative paths, but NB will not resolve them--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 directoryThis patch:
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