Skip to content

[JAVAVSCODE #196] Run Configuration section is unavailable in the Explorer panel for non-workspace opened Java files #210

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

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

sid-srini
Copy link
Member

Fixed runConfiguration.ts: initializeRunConfiguration() to search for java files in open editors when no workspace is open.

  1. Checked for non-workspace opened files by testing the validity of vscode.workspace.name AND vscode.workspace.workspaceFile.
  2. Searched for java extension file names in vscode.workspace.textDocuments when no workspace is open.
  3. Fixed RunConfigurationNode.setValue() to invoke WorkspaceConfiguration.update() with configurationTarget =
    • true: when no workspace is open i.e. user global target;
    • null: otherwise i.e. workspace target.

Fixes #196

…he Explorer panel for non-workspace opened Java files

Fixed runConfiguration.ts: `initializeRunConfiguration()` to search for java files in open editors when no workspace is open.

1. Checked for non-workspace opened files by testing the validity of `vscode.workspace.name` AND `vscode.workspace.workspaceFile`.
2. Searched for java extension file names in `vscode.workspace.textDocuments` when no workspace is open.
3. Fixed `RunConfigurationNode.setValue()` to invoke `WorkspaceConfiguration.update()` with `configurationTarget =` :
    - `true`: when no workspace is open i.e. user global target;
    - `null`: otherwise i.e. workspace target.

Fixes oracle#196

Signed-off-by: Siddharth Srinivasan <[email protected]>
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jul 25, 2024
@sid-srini sid-srini requested a review from lahodaj July 25, 2024 05:54
@sid-srini sid-srini assigned sid-srini and unassigned sid-srini Jul 25, 2024
Copy link
Member

@lahodaj lahodaj left a comment

Choose a reason for hiding this comment

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

Looks OK to me.

@Achal1607 Achal1607 merged commit 865bca3 into oracle:main Aug 7, 2024
3 checks passed
@sid-srini sid-srini added this to the JVSC 22.1.2 milestone Aug 14, 2024
@sid-srini sid-srini deleted the vsc196-show-runConfig-workspace branch September 18, 2024 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run Configuration section is unavailable in the Explorer panel for non-workspace opened Java files
3 participants