[ https://issues.apache.org/jira/browse/NETBEANS-206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16288916#comment-16288916 ]
Christian Lenz commented on NETBEANS-206: ----------------------------------------- So this is better to read and write: {code} @JavaScriptBody(args = { "name", "value" }, javacall = true) private static native void exposeModel(String name, NbScratchFileViewModel value) /*-{ window[name] = { setExt: function(ext, languageName) { value.@org.chrisle.netbeans.plugins.nbscratchfile.NbScratchFileViewModel::setExt(Ljava/lang/String;Ljava/lang/String;)(ext, languageName); }, getColor: function(colorString, brighter) { return value.@org.chrisle.netbeans.plugins.nbscratchfile.NbScratchFileViewModel::getColor(Ljava/lang/String;Ljava/lang/Boolean;)(colorString, brighter); } }; }-*/ {code} than this: {code} @JavaScriptBody(args = { "name", "value" }, javacall = true, body = "\n" + "window[name] = {" + "setExt : function(ext, languageName) {\n" + " value.@org.chrisle.netbeans.plugins.nbscratchfile.NbScratchFileViewModel::setExt(Ljava/lang/String;Ljava/lang/String;)(ext, languageName);\n" + "},\n" + "getColor : function(colorString, brighter) {\n" + " return value.@org.chrisle.netbeans.plugins.nbscratchfile.NbScratchFileViewModel::getColor(Ljava/lang/String;Ljava/lang/Boolean;)(colorString, brighter);\n" + "}\n" + "};" ) private static native void exposeModel(String name, NbScratchFileViewModel value); {code} > Please add support for JSNI > --------------------------- > > Key: NETBEANS-206 > URL: https://issues.apache.org/jira/browse/NETBEANS-206 > Project: NetBeans > Issue Type: New Feature > Components: java - Editor > Affects Versions: Next > Reporter: Christian Lenz > > I figured out that you will add support for Mixed development support between > C/C++ and Java in netbeans 8.1: > http://wiki.netbeans.org/NewAndNoteworthyNB81. I really like that for JNI and > JNA but what about mixed development support for Java and Javascript like GWT > and the JSNI functions? I have to use GWT in our company and it is really > hard to find out errors when you only see commented methods like: > {code} > public static native void alert(String msg) /*-{ > $wnd.alert(msg); > }-*/; > {code} > I know there is a plugin called GWT4NB but for now, I don't see any benefits > to use this. Here is a description for JSNI: > http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsJSNI.html > This would be a big enhancement to have syntax highlighting, navigation to JS > files like with C/C++ and Java, have code completion, and so on. > Regards > Chris -- This message was sent by Atlassian JIRA (v6.4.14#64029)