<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Angelo,<br>
      <br>
      Yes, CordovaJS plug-in certainly could and should be improved.<br>
      <br>
      cordova.addXXXEventHandler('xxx') methods don't return an event
      object. These methods take an event name as an argument, then
      create, register and return back a handler (which is a function
      "fn()" - probably the only arguments could be specified here, but
      I don't know how i can specify them in a return value). But they
      don't return an Event object.<br>
      <br>
      There is such an object (Event) but looks like it comes from
      document, so it looks like CordovaJS plug-in should depend on some
      ecma5 or browser support plug-in or library. Also, I don't see a
      place when the Event object is used directly in publicly declared
      functions (as an argument or a return value). The pair of
      arguments used: 'event' (actually a name of event) and handler
      function for that event.<br>
      <br>
      So, I should investigate it a bit more in order to support it
      correctly.<br>
      <br>
      Thanks in advance,<br>
      Victor<br>
      <br>
      On 03/24/2014 05:22 PM, Angelo zerr wrote:<br>
    </div>
    <blockquote
cite="mid:CAKLdLg9ZLYWt8XRH0_OgSmF2-HvOcuFz2kcJrxLGvqSPs8EF+w@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi Victor,
        <div><br>
        </div>
        <div>Thank's for your work.</div>
        <div><br>
        </div>
        <div>I don't know&nbsp;<span
            style="font-family:arial,sans-serif;font-size:13px">CordovaJS,
            but&nbsp;</span>I think you could improve this plugin by managing
          type like event.</div>
        <div><br>
        </div>
        <div>For instance :&nbsp;</div>
        <div><br>
        </div>
        <div>------------------------------------------------------------------------------------------------------------------------------------------------------<br>
        </div>
        <div>
          <div>var event = cordova.addDocumentEventHandler('xxx')
            //&lt;-Ctrl+Space shows cordova object's members:</div>
          <div>event. &lt;= Ctrl+Click open events methods.</div>
        </div>
        <div>------------------------------------------------------------------------------------------------------------------------------------------------------<br>
        </div>
        <div><br>
        </div>
        <div>jquery and browser tern plugin do that.</div>
        <div class="gmail_extra"><br>
        </div>
        <div class="gmail_extra">Regards Angelo<br>
          <br>
          <div class="gmail_quote">2014-03-21 17:11 GMT+01:00 Victor
            Rubezhny <span dir="ltr">&lt;<a moz-do-not-send="true"
                href="mailto:vrubezhny@exadel.com" target="_blank">vrubezhny@exadel.com</a>&gt;</span>:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div bgcolor="#FFFFFF" text="#000000">
                <div>We've pushed CordovaJS plug-in into Angelo's
                  repository.<br>
                  <br>
                  Wiki page:
                  <a moz-do-not-send="true"
href="https://github.com/angelozerr/tern.java/wiki/Tern-&amp;-CordovaJS-support"
                    target="_blank">https://github.com/angelozerr/tern.java/wiki/Tern-&amp;-CordovaJS-support</a><br>
                  <br>
                  You can play a little demo on cordova object (as well
                  as some other variables and functions) content assist
                  provided by cordovajs.js Tern plug-in with Code Mirror
                  here:
                  <a moz-do-not-send="true"
href="http://codemirror-java.opensagres.eu.cloudbees.net/codemirror-javascript/demo/cordovajs.html"
                    target="_blank">http://codemirror-java.opensagres.eu.cloudbees.net/codemirror-javascript/demo/cordovajs.html</a><br>
                  <br>
                  Regards,<br>
                  Victor
                  <div>
                    <div class="h5"><br>
                      <br>
                      On 03/18/2014 07:30 PM, Victor Rubezhny wrote:<br>
                    </div>
                  </div>
                </div>
                <div>
                  <div class="h5">
                    <blockquote type="cite">
                      <div>I've updated the cordovajs plugin for
                        Tern/Node.js:<br>
                        <br>
                        - all global vars from cordova.js and require.js
                        (the Cordova's one) are listed in Content Assist<br>
                        - status constants defined in cordova.js are
                        listed in Content Assist<br>
                        - some global object's vars that are defined in
                        cordova.js/require.js are listed in Content
                        Assist<br>
                        <br>
                        Guys (and especially Denis and Gorkem), I'd like
                        you to review the plugin. <br>
                        <br>
                        It's in my branch on GitHub: <a
                          moz-do-not-send="true"
                          href="https://github.com/vrubezhny/tern.java/tree/cordovajs"
                          target="_blank">https://github.com/vrubezhny/tern.java/tree/cordovajs</a>
                        (currently it's rebased over agelozerr's today's
                        master)<br>
                        <br>
                        Have fun at EC,<br>
                        Victor<br>
                        <br>
                        <br>
                        On 03/13/2014 06:19 PM, Victor Rubezhny wrote:<br>
                      </div>
                      <blockquote type="cite"> Hi, guys!<br>
                        <br>
                        While playing with Tern I was able to make a
                        very simple plugin that allows to show 'cordova'
                        object and some of its members in Content
                        Assist.<br>
                        <br>
                        <img alt=""
                          src="cid:part5.07020203.05070005@exadel.com"
                          height="585" width="1102"><br>
                        <br>
                        This is a very first and simple script that
                        shows 'cordova' object and its members in
                        content assistant without requiring to have any
                        kind of cordova.js included to a project.<br>
                        But it requires:<br>
                        - to have Tern.java (updated with cordovajs.js
                        plugin)<br>
                        - to have Tern nature enabled on your project<br>
                        - to have cordovajs plug-in enabled in project's
                        Turn preferences.<br>
                        <br>
                        You can look at the code changes in my branch on
                        GitHub: <a moz-do-not-send="true"
                          href="https://github.com/vrubezhny/tern.java/tree/cordovajs"
                          target="_blank">https://github.com/vrubezhny/tern.java/tree/cordovajs</a>
                        (currently it's rebased over agelozerr's master)<br>
                        There are no any special inference done due to
                        get some objects/values from the modules that
                        are loaded by require/define functionality. <br>
                        This probably will require more sophisticated
                        coding to be done.<br>
                        <br>
                        /Victor<br>
                        <br>
                        <br>
                        <fieldset></fieldset>
                        <br>
                        <pre>_______________________________________________
jbosstools-dev mailing list
<a moz-do-not-send="true" href="mailto:jbosstools-dev@lists.jboss.org" target="_blank">jbosstools-dev@lists.jboss.org</a>
<a moz-do-not-send="true" href="https://lists.jboss.org/mailman/listinfo/jbosstools-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/jbosstools-dev</a></pre>
                      </blockquote>
                      <br>
                      <br>
                      <fieldset></fieldset>
                      <br>
                      <pre>_______________________________________________
jbosstools-dev mailing list
<a moz-do-not-send="true" href="mailto:jbosstools-dev@lists.jboss.org" target="_blank">jbosstools-dev@lists.jboss.org</a>
<a moz-do-not-send="true" href="https://lists.jboss.org/mailman/listinfo/jbosstools-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/jbosstools-dev</a></pre>
                    </blockquote>
                    <br>
                  </div>
                </div>
              </div>
              <br>
              _______________________________________________<br>
              jbosstools-dev mailing list<br>
              <a moz-do-not-send="true"
                href="mailto:jbosstools-dev@lists.jboss.org">jbosstools-dev@lists.jboss.org</a><br>
              <a moz-do-not-send="true"
                href="https://lists.jboss.org/mailman/listinfo/jbosstools-dev"
                target="_blank">https://lists.jboss.org/mailman/listinfo/jbosstools-dev</a><br>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>