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

Get Package Of a String Containing Java Code #981

Closed
msteinbeck opened this issue Nov 17, 2016 · 2 comments · Fixed by #982
Closed

Get Package Of a String Containing Java Code #981

msteinbeck opened this issue Nov 17, 2016 · 2 comments · Fixed by #982

Comments

@msteinbeck
Copy link
Contributor

I would like to create a compilation unit from a string containing Java code and retrieve its package in order to get its (relative) file system path. I know that I could parse the file by my own, search for package keyword (if any) and translate the package declaration to a path but maybe Spoon provides such a features already.

@monperrus
Copy link
Collaborator

very easy, see #982. WDYT?

@msteinbeck
Copy link
Contributor Author

Thanks, didn't know the class VirtualFile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants