views:

151

answers:

4

Has anyone seen an editor/IDE that shows WYSIWYG comments inside the code? I have seen some that show the docs of an element in a separated tab/windows, but not together with code. For example, a JavaDoc comment would be much clearer and easier to edit if it had no tags and could be edited like a snippet from a normal text document.

/**
 * Writes <code>Hello world!</code> to the <b>standard output</b>.
 * @seealso showGoodbye
 */
public static void showHello() {

Could be something like this:

/*
Writes Hello world! to the standard output.
See also: showGoodbye()
*/

public static void showHello() {

but, editable, of course.

And for anyone who happens to have some knowledge/experience with open IDEs like Eclipse, Netbeans, etc.: would it be too hard to implement this?

A: 

Never seen it like that.

Most, however, have a "Hover" mode that will show you the WYSIWYG version when you hover over the class/method/variable that the javadoc refers to.

It could be a switch, but you probably would decide not to use it for the same reason web designers rarely use a WYSIWYG editor for web development.

Bill K
Yeah, I agree that for web development a WYSIWYG editor can be a bad thing. But for simple comments without <div>s, CSS, and these relatively complicated things I think this could be reasonably. Some ctrl-b here, ctrl-i there wouldn't kill anyone.
Bráulio Bezerra
A: 

There are a few fringe languages/IDEs out there that separate the programming view from the storage, but these are mostly research languages, and deal mostly with the code, not the comments. Look up extensible programming for some of the stuff out there. The general idea is to model the code as an AST in the background and provide a text-based interface to edit/display that model. That AST can then be stored as anything, such as plain text, s-expressions, XML, or even a binary representation.

It wouldn't be much of a leap at all to go from this sort of model to one that actually prettified the comments and gave you a WYSIWYG interface.

Eclipse
A: 

Emacs has preview-latex, which does this kind of visual conversion for LaTeX source files. I guess that it should be possible to do the same for your purpose.

Svante
A: 

This doesn't answer exactly what you seem to be asking. But as for efficient creation of comments you might want to checkout Textmate. Check this video demo of using and creating comments. In particular the "banner", "head" and "todo" comment modes. Also if you need the comment formatting in specific format structure you could presumably create a customized bundle that facilitates the comment formatting as you type. I would presume that you could create entry and escape sequence to enter in and out of comment mode and have the editor wrap the text block after you complete the comment. The thing that makes Textmate popular among many folks is the extensibility of its bundle system.

Gordon Potter