Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 353524

Summary: EGLDoc syntax
Product: z_Archived Reporter: Matt Heitz <mheitz>
Component: EDTAssignee: Project Inbox <edt.tools-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: chenzhh, margolis, smythew, svihovec, tww
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Matt Heitz CLA 2011-08-01 16:08:37 EDT
We need something like Javadoc for EGL.  This isn't a complete proposal but it's something to get the ball rolling.

I suggest we use /** comments just like Javadoc.  Many of Javadoc's tags can be used with EGL too.  See http://en.wikipedia.org/wiki/Javadoc

There may be some open-source code for Javadoc that we can adapt for EGL.

One new tag that I've come up with is the Operation tag.  It's intended for functions which have the @Operation annotation.  When @Operation is used on a function, the parameters and return type don't have to be individually documented in the EGLDoc comments since their purposes are obvious.

The Operation tag has a "parameter" like Javadoc's Link tag.  It's the operator being implemented by the function.  Here is an example.

/**
 * {@Operation +} Adds two numbers.
 */
static function $Plus(lvalue EglInt in, rvalue EglInt in) returns (EglInt) {@Operation{"+"}};
Comment 1 Matt Heitz CLA 2011-08-04 12:40:19 EDT
Perhaps we shouldn't use the @ character on our egldoc tags, since people may use it when writing about annotations and that might confuse our egldoc parser.
Comment 2 Will Smythe CLA 2011-08-28 13:57:33 EDT
For consistency with Java, I think we should use the @ within EGLDoc comments to indicate special bits of info like author, param, version, etc.
Comment 3 Tony Chen CLA 2011-12-30 03:06:47 EST
created another bug to track the IDE support
Bug 367640 - EGLDoc IDE support