Skip to main content



      Home
Home » Modeling » TMF (Xtext) » fileContentsToString ?
fileContentsToString ? [message #846654] Mon, 16 April 2012 10:22 Go to next message
Eclipse UserFriend
Hi,

at the Xtext docs I could see an example of xtend that uses this:
val data = try {
  fileContentsToString('data.txt')
} catch (IOException e) {
  'dummy data'
}


I've tried to use it in one xtend class but I'm getting error "Couldn't resolve reference to JvmIdentifiableElement 'fileContentsToString'."

This fileContentsToString exists ? if yes, could someone point the right import that I must use?

regards,

Cristiano

Re: fileContentsToString ? [message #846671 is a reply to message #846654] Mon, 16 April 2012 11:25 Go to previous messageGo to next message
Eclipse UserFriend
The method seems do no exist. At least I've searched it in all dependencies in xbase, xtext and xtend projects.

But I've found this: Files::readFileIntoString('data.txt') that is contained by org.eclipse.xtext.util bundle.

regards,

Cristiano
Re: fileContentsToString ? [message #846687 is a reply to message #846671] Mon, 16 April 2012 13:48 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

which doc are you talking about. cannot find it.

~Christian
Re: fileContentsToString ? [message #846688 is a reply to message #846687] Mon, 16 April 2012 13:51 Go to previous messageGo to next message
Eclipse UserFriend
Ahh,

i see http://www.eclipse.org/xtend/documentation/index.html
its the Xtend Docs.
i guess it is just an example that does not exist in the real world

~Christian
Re: fileContentsToString ? [message #846764 is a reply to message #846687] Mon, 16 April 2012 14:41 Go to previous message
Eclipse UserFriend
Hi,

here: http://www.eclipse.org/xtend/documentation/index.html

Previous Topic:Polymorphism based filtering JVM types proposal
Next Topic:persistent cache for cross-references
Goto Forum:
  


Current Time: Mon Jul 07 10:44:14 EDT 2025

Powered by FUDForum. Page generated in 0.18748 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top