facebook

MyEclipse JSP Editor Formatter Error

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #308954 Reply

    Matthew
    Member

    It appears that in MyEclipse 8.5 there is an error when formatting JSP pages.

    Here is the error message:

    “Format” did not complete normally. Please see the log for more information.
    offset or length outside of string. offset: 6261, length: 104, string size: 6359

    It appears, at this time, that the error is caused by having a <%= %> in a <script> block.
    For example the whole page formats fine when the block below is removed:

    function editUser(userId) {
            //This will add OR update a user with the permissions specified for the sharing
            document.mainForm.<%=AseBean.ACTION%>.value="shareEditUser";
            document.mainForm.UserId.value = userId;
            document.mainForm.submit();
        }

    Thanks for any help!

    #308958

    matthewcat,
    I could replicate this at my end. I have raised a PR with the dev team.
    Thank you for bringing this up.

    #309207

    Matthew
    Member

    I am also getting a weird result (without an error message) when formatting JavaScript within a JSP.
    Code before running a “Ctrl +I” of the selection:

    <script type="text/javascript">     
             function upload() {
                mainForm.submit();
                
                document.body.innerHTML = "<div id='datasetUploadProgress'></div>";
                
                
                new Ajax.PeriodicalUpdater('datasetUploadProgress', 'DatasetUploadServlet',
                          {
                            method: 'post',
                            frequency: 1,
                            decay: 1,
                            parameters: { action: "datasetUploadProgress" }
                          });
                
                
                
                }         
    </script>

    Code after the formatter:

    <script type="text/javascript">
        function upload() {
            mainForm.submit();
    
            document.body.innerHTML = "__tag_23$39_</div>";
    
            new Ajax.PeriodicalUpdater('datasetUploadProgress',
                    'DatasetUploadServlet', {
                        method : 'post',
                        frequency : 1,
                        decay : 1,
                        parameters : {
                            action : "datasetUploadProgress"
                        }
                    });
    
        }
    </script>

    I am referring to the seemingly random substitution (below):

    “<div id=’datasetUploadProgress’>” to “__tag_23$39_</div>”

    Thanks again for your previous quick response!

    #309220

    matthewcat,
    I have added the above details to the PR.
    Thank you again for bringing this up.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: MyEclipse JSP Editor Formatter Error

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