Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Where is toString method of good old oAW 4
Where is toString method of good old oAW 4 [message #647248] Wed, 05 January 2011 11:08 Go to next message
Ingo Meyer is currently offline Ingo MeyerFriend
Messages: 162
Registered: July 2009
Senior Member
Hello all and a happy new year,

I'm currently migrating from good old oAW 4.3 to TMF 1.0.1.
What I'm really missing is the old xTend toString method for my model elements with the nice attribute output.

Is there any helper method for that or can I let xText (AntLR) let generate toString methods for my elements?

Thanks in advance,
Ingo
Re: Where is toString method of good old oAW 4 [message #647258 is a reply to message #647248] Wed, 05 January 2011 12:49 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14716
Registered: July 2009
Senior Member
Hi,

org.eclipse.xtend.typesystem.emf.EObjectType.toString(EObjec t)

is still there. Just write an Java Extension to call it.

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Where is toString method of good old oAW 4 [message #647341 is a reply to message #647258] Wed, 05 January 2011 17:09 Go to previous messageGo to next message
Eclipse User is currently offline Eclipse UserFriend
Messages: 14
Registered: January 2011
Junior Member
<<Incorrectly posted to this message thread, please disregard>>

[Updated on: Wed, 05 January 2011 18:10]

Report message to a moderator

Re: Where is toString method of good old oAW 4 [message #647417 is a reply to message #647258] Thu, 06 January 2011 08:09 Go to previous message
Ingo Meyer is currently offline Ingo MeyerFriend
Messages: 162
Registered: July 2009
Senior Member
Thank you Christian,

this was exactly what I was looking for.
Here is my code in case somebody needs it too:

public static final String toString(
		final Object x )
{
	if (x instanceof EObject)
		return EObjectType.toString( (EObject) x ).toString();
	return x.toString();
}
Previous Topic:Cross Reference to a file name
Next Topic:Padding values in the formatter
Goto Forum:
  


Current Time: Mon Sep 23 18:05:38 GMT 2024

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

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

Back to the top