Menu

#512 Control flow blocks in install sections are sometimes folded wrong

v1.1.x
fixed
None
v1.1.1
Bug Fix
2020-03-31
2020-01-24
Erik Hänel
No

Control flow blocks in sections are sometimes folded wrong, because the keyword for and if are quite common in English language and therefore appear often in comments. The Lexer does not distinguish between comments and usual code, therefore for and if are used as folding heads, if they are used in comments.

Analysis:

This fix requires changing the lexer. The lexer shall now "ignore" the install section first and detect all syntax elements as before (with the small exception that it shall not detect regular commands but procedure commands). After the lexer reaches the <endinstall> keyword, the styling of the whole section shall be changed with the exception of the procedure keywords. Those can be used afterwards to apply the folding and indentation logic.

Implementation:

  • Implementation: The fix was implemented as proposed by the analysis.
  • Revision: [r683]
  • Implementation test: Install scripts were modified and the highlighting updated correspondingly, so that folding could be applied correctly.

Documentation:

  • [x] ChangesLog updated
  • [x] Code changes commented
  • Documentation articles:
    • [ ] corresponding documentation articles updated
    • [ ] new documentation articles created
    • [x] not needed
  • Language files:
    • [x] corresponding language files updated
    • [ ] not needed

Tests:

This fix was tested manually. No deviations detected. Bug fix implemented successfully.

Related

Commit: [r683]

Discussion

  • Erik Hänel

    Erik Hänel - 2020-01-24
    • status: open --> accepted
     
  • Erik Hänel

    Erik Hänel - 2020-01-27
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,23 @@
     Control flow blocks in sections are sometimes folded wrong, because the keyword `for` and `if` are quite common in English language and therefore appear often in comments. The Lexer does not distinguish between comments and usual code, therefore `for` and `if` are used as folding heads, if they are used in comments.
    +
    +###Analysis:
    +(*Describe, what&#39;s the issue and which changes have to be made*)
    +
    +###Implementation:
    +* Implementation: (*Describe, what you&#39;ve changed*) 
    +* Revision: [rXXX]
    +* Implementation test: (*Describe the type of test, which you performed, and if it was successful*)
    +
    +###Documentation:
    +* [ ] ChangesLog updated
    +* [ ] Code changes commented
    +* **Documentation articles:**
    
    +    * [ ] corresponding documentation articles updated
    +    * [ ] new documentation articles created
    +    * [ ] not needed
    +* **Language files:**
    +    * [ ] corresponding language files updated
    +    * [ ] not needed
    +
    +###Tests:
    +(*Describe, which tests you performed and their outcome*)
    
    • status: accepted --> analyzing
     
  • Erik Hänel

    Erik Hänel - 2020-01-27
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,7 +1,7 @@
     Control flow blocks in sections are sometimes folded wrong, because the keyword `for` and `if` are quite common in English language and therefore appear often in comments. The Lexer does not distinguish between comments and usual code, therefore `for` and `if` are used as folding heads, if they are used in comments.
    
     ###Analysis:
    -(*Describe, what&#39;s the issue and which changes have to be made*)
    +This fix requires changing the lexer. The lexer shall now &#34;ignore&#34; the install section first and detect all syntax elements as before (with the small exception that it shall not detect regular commands but procedure commands). After the lexer reaches the `&lt;endinstall&gt;` keyword, the styling of the whole section shall be changed with the exception of the procedure keywords. Those can be used afterwards to apply the folding and indentation logic.
    
     ###Implementation:
    
     * Implementation: (*Describe, what you&#39;ve changed*) 
    
    • status: analyzing --> implementing
     
  • Erik Hänel

    Erik Hänel - 2020-01-28
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -4,19 +4,19 @@
     This fix requires changing the lexer. The lexer shall now &#34;ignore&#34; the install section first and detect all syntax elements as before (with the small exception that it shall not detect regular commands but procedure commands). After the lexer reaches the `&lt;endinstall&gt;` keyword, the styling of the whole section shall be changed with the exception of the procedure keywords. Those can be used afterwards to apply the folding and indentation logic.
    
     ###Implementation:
    -* Implementation: (*Describe, what you&#39;ve changed*) 
    -* Revision: [rXXX]
    -* Implementation test: (*Describe the type of test, which you performed, and if it was successful*)
    +* Implementation: The fix was implemented as proposed by the analysis.
    +* Revision: [r683]
    +* Implementation test: Install scripts were modified and the highlighting updated correspondingly, so that folding could be applied correctly.
    
     ###Documentation:
    -* [ ] ChangesLog updated
    -* [ ] Code changes commented
    +* [x] ChangesLog updated
    +* [x] Code changes commented
    
     * **Documentation articles:**
         * [ ] corresponding documentation articles updated
         * [ ] new documentation articles created
    -    * [ ] not needed
    +    * [x] not needed
     * **Language files:**
    -    * [ ] corresponding language files updated
    +    * [x] corresponding language files updated
         * [ ] not needed
    
     ###Tests:
    
    • status: implementing --> testing
     

    Related

    Commit: [r683]

  • Erik Hänel

    Erik Hänel - 2020-03-31
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -20,4 +20,4 @@
    
         * [ ] not needed
    
     ###Tests:
    -(*Describe, which tests you performed and their outcome*)
    +This fix was tested manually. No deviations detected. Bug fix implemented successfully.
    
    • status: testing --> fixed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB