[jira] [Commented] (NETBEANS-4598) Indentation error for the 2nd last closing bracket in JavaScript.

2021-01-03 Thread Jira


[ 
https://issues.apache.org/jira/browse/NETBEANS-4598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17257743#comment-17257743
 ] 

Tomáš Procházka commented on NETBEANS-4598:
---

I was able to reproduce the problem in NetBeans 12.2.

> Indentation error for the 2nd last closing bracket in JavaScript.
> -
>
> Key: NETBEANS-4598
> URL: https://issues.apache.org/jira/browse/NETBEANS-4598
> Project: NetBeans
>  Issue Type: Bug
>  Components: javascript - Formatting  Indentation
>Affects Versions: 12.0, 12.2
> Environment: Windows 10
>Reporter: Nghia Nguyen
>Priority: Minor
>  Labels: Indentation
> Attachments: image-2020-07-17-13-56-16-941.png, 
> image-2020-07-17-14-09-25-087.png
>
>
> The indentation engine seems to not be placing the 2nd last bracket in the 
> right place.  Even though I use the Format feature in the IDE, the 
> indentation is not correct.  If we add for example a comment // at the end of 
> the 2nd last closing bracket of a function, it will indent correctly.
>  
> // Indentation problem:
> {{function ABC( \{param1, param2}) {}}
>  {{    for (var i = 0; i < 1; i++) {}}
>  
> {{} // This bracket should be be pushed in to match the for.}}
>  {{}}}
>  
> {{// The following code is indenting correctly:}}
> {{class Test {}}
>  {{    static DEF( \{param1, param2}) {}}
> {{    if (true) {}}
> {{    } // By putting a comment here, it allowed the IDE to indent the 
> block correctly.  If we remove it, the indentation will fail.}}
>  {{}}}
>  
>  
> !image-2020-07-17-14-09-25-087.png!
>   



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[jira] [Commented] (NETBEANS-4598) Indentation error for the 2nd last closing bracket in JavaScript.

2020-07-17 Thread Junichi Yamamoto (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-4598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17160214#comment-17160214
 ] 

Junichi Yamamoto commented on NETBEANS-4598:


Could you please add the example code, the actual result, and the expected 
result, too?

(It's good to attach the images, of course, but we can't copy & paste them...)

> Indentation error for the 2nd last closing bracket in JavaScript.
> -
>
> Key: NETBEANS-4598
> URL: https://issues.apache.org/jira/browse/NETBEANS-4598
> Project: NetBeans
>  Issue Type: Bug
>  Components: javascript - Formatting  Indentation
>Affects Versions: 12.0
> Environment: Windows 10
>Reporter: Nghia Nguyen
>Priority: Minor
>  Labels: Indentation
> Attachments: image-2020-07-17-13-56-16-941.png, 
> image-2020-07-17-14-09-25-087.png
>
>
> The indentation engine seems to not be placing the 2nd last bracket in the 
> right place.  Even though I use the Format feature in the IDE, the 
> indentation is not correct.  If we add for example a comment // at the end of 
> the 2nd last closing bracket of a function, it will indent correctly.
>  
> !image-2020-07-17-14-09-25-087.png!
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists