Skip to content
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 to specify source paths for unmanaged folder #1799

Merged
merged 4 commits into from
Mar 9, 2021

Conversation

jdneo
Copy link
Collaborator

@jdneo jdneo commented Feb 8, 2021

Resolve #1798

Related with eclipse-jdtls/eclipse.jdt.ls#1658

Signed-off-by: Sheng Chen [email protected]

@@ -23,6 +24,9 @@ export function registerCommands(context: ExtensionContext) {
context.subscriptions.push(commands.registerCommand(Commands.ADD_TO_SOURCEPATH, async (uri: Uri) => {
const result = await <any>commands.executeCommand(Commands.EXECUTE_WORKSPACE_COMMAND, Commands.ADD_TO_SOURCEPATH, uri.toString());
if (result.status) {
if (result.sourcePaths) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason for this added patch is that I hope the vscode setting can also be updated if the user changes the source paths from the explorer.

While the side effect is that the setting change event will be synced to the server side and update the classpath again.

@jdneo
Copy link
Collaborator Author

jdneo commented Mar 8, 2021

👋 @testforstephen @rgrunber Have time to take a look at this PR 😃 ?

"default": "",
"scope": "window"
},
"java.project.sourcePaths": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update New settings to README as well.

README.md Outdated
@@ -155,6 +155,8 @@ The following settings are supported:
* `java.codeGeneration.toString.limitElements`: Limit number of items in arrays/collections/maps to list, if 0 then list all. Defaults to `0`.
* `java.selectionRange.enabled`: Enable/disable Smart Selection support for Java. Disabling this option will not affect the VS Code built-in word-based and bracket-based smart selection.
* `java.showBuildStatusOnStart.enabled`: Automatically show build status on startup. Defaults to `false`.
* `java.project.sourcePaths`: Relative paths to the workspace where stores the source files. `Only` effective in the `WORKSPACE` scope. The setting will `NOT` affect Maven or Gradle project.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refer to https:/redhat-developer/vscode-java/pull/1773/files, usually we put new settings in "New in 0.77.0" first.

Copy link
Collaborator

@testforstephen testforstephen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@testforstephen
Copy link
Collaborator

@jdneo could you resolve the conflicts?

@testforstephen testforstephen merged commit 3224e91 into redhat-developer:master Mar 9, 2021
@jdneo jdneo deleted the cs/sources-path branch March 9, 2021 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Expose source paths setting in VS Code for unmanaged folders
2 participants