facebook

JavaScript Editor Outline

  1. CodeMix & Angular IDE
  2.  > 
  3. Webclipse 1.x Help
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #496252 Reply

    mvilliger
    Participant

    Hi

    We are evaluating various JavaScript Plugins for Eclipse and also tried JSjet. And we really like a lot of the features!
    Unfortunately the JavaScript Outline View and jumping using Ctrl+O within the JavaScript Editor do not work. They actually are all empty.

    Here are some sample js files we work with:

    https://git.eclipse.org/c/scout/org.eclipse.scout.rt.git/plain/org.eclipse.scout.rt.ui.html/src/main/js/scout/action/Action.js?h=releases/6.1.x

    https://git.eclipse.org/c/scout/org.eclipse.scout.rt.git/plain/org.eclipse.scout.rt.ui.html/src/main/js/scout/util/strings.js?h=releases/6.1.x

    We tested JSjet 1.3.1 with a Neon Eclipse 4.6.0.

    Is there anything we can change (preferences?) so that the Outline view and Ctrl+O works with such files? Or is there anything else that we can do to make this work?

    Thank you very much for your help!

    Matthias

    #496258 Reply

    support-swapna
    Moderator

    Matthias,

    Sorry that you are seeing this issue. I could replicate the issue with the sample JS files. I have filed a bug for the dev team to investigate further. We will keep you posted about the fix.

    Apologies for inconvenience caused. Thank you once again for reporting it.

    –Swapna
    MyEclipse Support

    #496260 Reply

    mvilliger
    Participant

    Hi Swapna

    Thank you very much for the very fast response and thank you for creating the bug.

    Is there a link where I can follow the bug? Or do you report anything in this thread?

    Thanks again!

    #496273 Reply

    support-swapna
    Moderator

    Matthias,

    We will keep you posted here when the fix is out.
    Thank you for your patience.

    –Swapna
    MyEclipse Support

    #496276 Reply

    mvilliger
    Participant

    Perfect!

    Thank you very much!

    #496757 Reply

    mvilliger
    Participant

    Just an update: still the same behavior with JSjet 1.4.0

    #496765 Reply

    Brian Fernandes
    Moderator

    Matthias,

    Unfortunately it was a bit too late for us to pick up this fix for the 1.4.0 (CI 6) release – as Swapna said earlier, we certainly have replicated the bug and unfortunately there isn’t a workaround.

    Note that this only happens for certain JS files and not all of them – my team is currently investigating and we’ll keep you posted on our progress. We’ll try to release a fix ASAP.

    We’re glad you enjoy using JSjet and hope we’ll be able to correct this issue soon as well. Any other feedback or suggestions you have would be welcome too!

    Thanks!
    Brian.

    #496829 Reply

    mvilliger
    Participant

    Hi Brian

    No problem that it did not fit into 1.4.0.

    Thank you very much for looking into it! We are already looking forward to the fix. Thank you for the fast feedback and keep on the good work!

    Sure. As soon as we have more feedback we will bring it up.

    Regards
    Mat

    #496845 Reply

    Brian Fernandes
    Moderator

    Mat,

    The good news is that we have a short term workaround. If you go to the JavaScript include path property page and remove the *-module.js exclusion, you should start seeing the outlines (you may need to reopen the editors). See the attached screenshot for more details.

    We don’t believe this step should be necessary though, at least, not for the outline to function – so we’ll be putting a more appropriate fix for this into a future release and you can add the exclusion again.

    Thanks!

    Attachments:
    You must be logged in to view attached files.
    #496862 Reply

    mvilliger
    Participant

    Hi Brian

    Thank you for the workaround. Indeed this helped a lot. I will reconfigure our projects and do some more tests afterwards.
    I will comme back to you as soon as I have more feedback.
    One first finding:

    We have many functions like this:

    
    scout.Action.prototype._renderSelected = function() {
      this.$container.select(this.selected);
      this._updateTooltip();
    };
    

    Trying to rename (alt+shift+r) such a function results in the message that only variables and functions can be renamed. Is this intended?

    Thanks
    Mat

    #497360 Reply

    Brian Fernandes
    Moderator

    Mat,

    Glad that worked and sorry I missed your question on renaming.

    Yes, I’m afraid that a rename action in JavaScript can get quite complex and we don’t have method / field rename implemented yet. On a scale of 1-10, how important would a feature like this be to you and your team – what types of refactoring do you use frequently?

    #497562 Reply

    mvilliger
    Participant

    Hi Brian

    Sorry that I have not answered yet. We have been testing it with our sources. Here the Feedback from our JavaScript developers:

    1. Renaming: Importance 5. We usually rename functions and variables
    2. In the js editor: Ctrl-2,R seems not to work. Importance: 8.
    3. Shift-Alt-CursorUp/Down do not work. Importance: 9.
    4. The Outline view does not show the element of the current cursor position. Importance: 9.
    5. Ctrl+O and the Outline view are quite slow. It takes to much time to build the list. Probably we have to tweak the performance settings. Another option would be to only show the elements of the currently opened file. We tried to change the scope from “project” to “file” but then the outline and Ctrl+O list are always empty. Importance: 8.
    6. When inside a function: code completion does not recognize “this” that was bound to the function using “bind”. Importance: 6.
    7. JSHint seems to scan all files of a project. Our developers would prefer it if it could be limited to the file currently shown in the js editor. Importance: 3.

    Thank you already for looking into this. If you have any more detailed questions to one of these points don’t hesitate to ask.

    Thank you
    Mat

    #497850 Reply

    Brian Fernandes
    Moderator

    Mat,

    Thank you for sending in such a detailed list of features as well as their priorities.

    I believe #5 will automatically get fixed when we put in the final fix to the outline issue and you can go back to your previous setting with that folder excluded.

    On #7 – interesting, why would you prefer to only scan the current file? Are you experiencing a performance impact from the scanning or are you just seeing too many problem markers in the view? The latter can be controlled with the settings in the Problems/Markers view, though I’m sure you knew that already.

    #497999 Reply

    mvilliger
    Participant

    Hi Brian

    Ah ok, very nice. So we will do another test as soon as that is fixed. Thank you!

    You are right: we have too many errors (see image). And you are right, we can change these settings in the Problems/Markers view. That’s why this has very low prio.

    Attachments:
    You must be logged in to view attached files.
Viewing 14 posts - 1 through 14 (of 14 total)
Reply To: JavaScript Editor Outline

You must be logged in to post in the forum log in