Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » fileContentsToString ?
fileContentsToString ? [message #846654] Mon, 16 April 2012 10:22 Go to next message
Cristiano Gaviao is currently offline Cristiano Gaviao
Messages: 247
Registered: July 2009
Senior Member
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
Cristiano Gaviao is currently offline Cristiano Gaviao
Messages: 247
Registered: July 2009
Senior Member
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
Christian Dietrich is currently offline Christian Dietrich
Messages: 4426
Registered: July 2009
Senior Member
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
Christian Dietrich is currently offline Christian Dietrich
Messages: 4426
Registered: July 2009
Senior Member
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
Cristiano Gaviao is currently offline Cristiano Gaviao
Messages: 247
Registered: July 2009
Senior Member
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: Fri May 24 11:44:42 EDT 2013

Powered by FUDForum. Page generated in 0.01716 seconds