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

Rascal edit method documentation not correct #1018

Closed
savahu opened this issue Dec 21, 2016 · 1 comment
Closed

Rascal edit method documentation not correct #1018

savahu opened this issue Dec 21, 2016 · 1 comment

Comments

@savahu
Copy link

savahu commented Dec 21, 2016

http://tutor.rascal-mpl.org/Rascal/Libraries/util/Editors/edit/edit.html

Calling edit(|http://www.google.nl|); or edit with any other LOC that I tried, results in the error message

"|plugin://rascal_eclipse/src/org/rascalmpl/eclipse/library/util/Editors.rsc|(1289,4,<41,5>,<41,9>): ? >not supported on loc and loc
Advice: |http://tutor.rascal->mpl.org/Errors/Static/UnsupportedOperation/UnsupportedOperation.html|"

While it's stated in the documentation that edit(loc) should work.

Also, should the edit function be able to open an existing sourcefile, or is it only to open new empty files?

Thanks

@jurgenvinju
Copy link
Member

This line in the standard library of the version of Rascal you use contains a bug indeed. Nick Lodewijks found a workaround: copy the edit function from the standard library and remove the use of the ? operator. That should give a working function for your context. In the mean time the bug was solved on the master. Thanks for reporting!

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

No branches or pull requests

2 participants