Skip to main content



      Home
Home » Archived » M2M (model-to-model transformation) » [ATL] String.split() method does not run(The method String.split(String regex) is documented but not supported...)
[ATL] String.split() method does not run [message #663179] Mon, 04 April 2011 05:11 Go to next message
Eclipse UserFriend
Hi everybody !

I just want to use the split method from a String object to get a Sequence of String. I write this code :

for (sSplitted in s.split('\|')){
	anotherStringSet <- anotherStringSet->including(sSplitted );
}


When I save my file (when Eclipse analyze errors), I've got this one :
org.eclipse.m2m.atl.engine.emfvm.VMException: Operation not found: OclUndefined.+(java.lang.String)
	at process#396(ATLCompiler.atl[112:4-112:10])
		local variables: self=IN!myTrans
	at main#37(ATLCompiler.atl)
		local variables: self=ATLCompiler : ASMModule, WriteTo='C:/***/myTrans.asm'


So if I run this transformation, I've got the same error. Nevertheless, when I see the documentation ( http://download.nus.edu.sg/mirror/eclipse/modeling/m2m/atl/j avadoc/3.0.0/), this method is referenced in an ASMString object.

Can I use this method or is she not supported yet?

Thanks for your answers!

Antoine
Re: [ATL] String.split() method does not run [message #663192 is a reply to message #663179] Mon, 04 April 2011 05:38 Go to previous messageGo to next message
Eclipse UserFriend
You have to use two backslashes to unspecialize a character.

Btw I don't think you have to unspecialize |.
Re: [ATL] String.split() method does not run [message #663222 is a reply to message #663179] Mon, 04 April 2011 07:47 Go to previous message
Eclipse UserFriend
Oh you've right !

I didn't think to an error in my regex... But that was it, we must unspecialized | with \\ or else he considers | as an OR and he separates each character one by one !

Merci Sylvain Wink
Previous Topic:[Xtend] Cannot create instance of abstract class
Next Topic:[ATL] Applying UML profile
Goto Forum:
  


Current Time: Tue Jul 22 20:22:41 EDT 2025

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

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

Back to the top