Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » fileContentsToString ?
fileContentsToString ? [message #846654] Mon, 16 April 2012 14:22 Go to next message
Cristiano Gavião is currently offline Cristiano GaviãoFriend
Messages: 279
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 15:25 Go to previous messageGo to next message
Cristiano Gavião is currently offline Cristiano GaviãoFriend
Messages: 279
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 17:48 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13489
Registered: July 2009
Senior Member
Hi,

which doc are you talking about. cannot find it.

~Christian


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: fileContentsToString ? [message #846688 is a reply to message #846687] Mon, 16 April 2012 17:51 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13489
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


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: fileContentsToString ? [message #846764 is a reply to message #846687] Mon, 16 April 2012 18:41 Go to previous message
Cristiano Gavião is currently offline Cristiano GaviãoFriend
Messages: 279
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: Wed Jul 08 04:35:29 GMT 2020

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

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

Back to the top