Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » EGL Development Tools » @JSONName annotation(What are annotations?)
@JSONName annotation [message #1004061] Tue, 22 January 2013 14:08 Go to next message
Richard Moulton is currently offline Richard MoultonFriend
Messages: 92
Registered: August 2011
Location: Devon, UK
Member
I've just converted some of my projects from EDT 0.8.1 over to EDT 0.8.2 and on the whole this was a pretty painless exercise on my small scale projects; mostly a case of changing class to cssClass (on my widgets) and then selecting the Organise Imports option within the source editor.

There was one additional step that I needed to perform on one of my record declarations and that was because of a change to the JSONName annotation implementation.

In EDT 0.8.1 I had ...
OpenPrice float {JSONName = "Open"};

For EDT 0.8.2 I had to change the line to this ...
OpenPrice float { @JSONName { "Open" } };


This got me thinking (a rare occurrence these days) ... what are annotations? how should I use them and can I create my own?

They look like a method of assigning additional properties to parts but does anyone know of any documentation that will give me an overview of the topic.

Richard
Re: @JSONName annotation [message #1004222 is a reply to message #1004061] Tue, 22 January 2013 20:41 Go to previous messageGo to next message
Brian Svihovec is currently offline Brian SvihovecFriend
Messages: 55
Registered: July 2009
Member
Richard,

You can find more information on annotations here - http://wiki.eclipse.org/EDT:Language_Overview02

As you discovered, we have removed a short hand notation for specifying an annotation in .8.2, as indicated here - http://wiki.eclipse.org/EDT:The_Differences_between_EDT_0.8.2_and_EDT_0.8.1

You can define your own annotations, but they will only be useful if you extend the compiler and the generator to use the annotation in some way.

-Brian
Re: @JSONName annotation [message #1004588 is a reply to message #1004222] Wed, 23 January 2013 14:01 Go to previous message
Richard Moulton is currently offline Richard MoultonFriend
Messages: 92
Registered: August 2011
Location: Devon, UK
Member
Brian,

Many thanks for the annotations link, that was really helpful.

Richard
Previous Topic:Changed resource binding in 0.8.2 compared to 0.8.1 ?
Next Topic:Error Using sysLib.wait(2);
Goto Forum:
  


Current Time: Fri Apr 19 12:15:38 GMT 2024

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

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

Back to the top