JavaScript Formatter not applying rules in MyEclipse 2017 CI7

This topic contains 6 replies, has 3 voices, and was last updated by Profile photo of Brian Fernandes Brian Fernandes 3 weeks ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #531056 Reply
    Profile photo of Thomas Legault
    Thomas Legault
    Participant

    The JavaScript formatter doesn’t apply the rules properly since I upgraded to 2017 CS. I am now running CI7 see config details attached.

    Applying the uploaded formatter rules to the JS snippet below in Eclipse Mars/Neon results in the original code staying the same.

    Here is the original code:

    Here is the formatted code. Note that it
    1) Took out spaces after opening ( and before closing ) of arguments
    2) It has removed new line before { of second function definition added to a prototype.
    3) Took out the space between the method call with () no arguments
    4) Took out the space between the function arguments with () no arguments

    i.e. here is the same formatted code with the mistakes identified

    Attachments:
    You must be logged in to view attached files.
    #531063 Reply
    Profile photo of Thomas Legault
    Thomas Legault
    Participant

    Re-attaching the formatter xml that can be imported in eclipse as a text file as the original XMl file was rejected for security reasons.

    Attachments:
    You must be logged in to view attached files.
    #531198 Reply
    Profile photo of support-swapna
    support-swapna
    Moderator

    Thomas,

    Sorry that you are seeing this issue. Thank you for the details. With the code snippet you shared I see the formatter does not work if I select the code block and format. The formatter works if I do a Ctrl+A on the JS file and then format.

    While we investigate further, can you please give us some more details?

    1. Can you please clarify how you are formatting the code? Are you selecting the code block and invoking Ctrl+Shift+F?

    2. Can you please check if selecting all the contents of the JS file in the editor using Ctrl+A and then invoking Format works?

    3. Please share with us the .log file located at workspace dir/.metadata/.log for further investigation. Also share with us the version details of your previous MyEclipse installation.

    Apologies for inconvenience caused.

    –Swapna
    MyEclipse Support

    #531200 Reply
    Profile photo of Thomas Legault
    Thomas Legault
    Participant

    Hello,

    1. I just hit Ctrl+Shift+F. I also have the formatting to be automatically applied when the file is saved.

    2. I tried the CTRL-A and the formatting is still incorrect.

    3. The log file is attached (myeclipse-2017.log). I closed MyEclipse, deleted the log file, opened myeclipse, formatted a JS file and saved it to produce a clean log. Config from MyEclipse 2015 is attached.

    Attachments:
    You must be logged in to view attached files.
    #531309 Reply
    Profile photo of support-swapna
    support-swapna
    Moderator

    Thomas,

    Thank you for the details and the log file. We could replicate the problem with formatting at our end.
    I have filed a bug for the dev team to work on it. We will keep you posted when the fix is out.

    Apologies for inconvenience caused. Thank you for reporting it.

    –Swapna
    MyEclipse Support

    #535204 Reply
    Profile photo of Thomas Legault
    Thomas Legault
    Participant

    Hello Swapna,

    Can I get a bug # to track this issue? Do you know when it will be fixed?

    Thanks
    Thomas

    #535260 Reply
    Profile photo of Brian Fernandes
    Brian Fernandes
    Moderator

    Thomas,

    We do not have a public tracker, so unfortunately I cannot provide a link.

    As far as getting a fix is concerned, we are in the end-game stages for the upcoming CI 8 release, so we’re not going to be able to get the fix into this release.

    I will prioritize the investigation and hopefully the fix as well for the CI 9 release, which should be a little over a month away.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: JavaScript Formatter not applying rules in MyEclipse 2017 CI7