Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 09:11 Go to next message
Antoine  is currently offline Antoine Friend
Messages: 22
Registered: February 2011
Location: Toulouse, France
Junior Member
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 09:38 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
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 11:47 Go to previous message
Antoine  is currently offline Antoine Friend
Messages: 22
Registered: February 2011
Location: Toulouse, France
Junior Member
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: Fri Mar 29 10:08:36 GMT 2024

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

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

Back to the top