Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Add jpath to VirtualFile (for pc) #23203

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 3 commits into from
May 30, 2025
Merged

Add jpath to VirtualFile (for pc) #23203

merged 3 commits into from
May 30, 2025

Conversation

kasiaMarek
Copy link
Member

@kasiaMarek kasiaMarek changed the title Metals i7460 Add jpath to VirtualFile (for pc) May 20, 2025
@kasiaMarek kasiaMarek requested a review from tgodzik May 21, 2025 09:53
* @return the created virtual file
*/
def this(path: JPath, content: Array[Byte]) = {
this(path.toString.replace(java.io.File.separatorChar, '/'), content)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
this(path.toString.replace(java.io.File.separatorChar, '/'), content)
this(jpath.getFileName().toString(), path)
this.content = content

wouldn't make sense? I think / is only used to get the last element

@kasiaMarek kasiaMarek marked this pull request as ready for review May 29, 2025 15:13
@kasiaMarek kasiaMarek requested a review from tgodzik May 29, 2025 15:13
Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

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

LGTM!

@tgodzik tgodzik merged commit 7c3ddc3 into scala:main May 30, 2025
29 checks passed
@tgodzik tgodzik added the area:presentation-compiler Related to the presentation compiler module used by Metals and possibly other tools label May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:presentation-compiler Related to the presentation compiler module used by Metals and possibly other tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants