Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-ui-dev] Extending the Java Formatter

Hi,

     I'm working on an Eclipse plugin called Googlipse for the (GWT)
Google Web Toolkit. GWT has a feature where we can write Javascript
code inside Java classes
(http://code.google.com/webtoolkit/documentation/com.google.gwt.doc.DeveloperGuide.JavaScriptNativeInterface.html)

    The idea is to have Javascript code inside the multiline comment
of a native method's signature.

As given in the example, it will be:

public static native void alert(String msg) /*-{
   $wnd.alert(msg);
}-*/;

I thought of extending the Java Formatter to format this comment (at
least indent the JavaScript code) I went thru the JDT code and
couldn't find any ways to do it. Is it really possible to do?

- Prakash


Back to the top