Menu

#413 The autoformatting feature doesn't indent wrapped lines

v1.1.x
fixed
None
v1.1.1
Bug Fix
2019-01-24
2018-11-29
Erik Hänel
No

The autoformatting and the autoindentation feature don't indent wrapped lines (by the usage of \\).

Analysis:

This is a simple fix, because one has to transfer the logic from NumeReEditor::determineIndentationLevelMATLAB() to NumeReEditor::determineIndentationLevelNSCR(), which means to include the following two lines:

if (this->GetStyleAt(i) == wxSTC_NSCR_OPERATORS && this->GetTextRange(i, i + 2) == "\\\\")
        singleLineIndent = 1;

Implementation:

  • Implementation: The fix was processed as proposed by the analysis.
  • Revision: [r435]
  • Implementation test: Wrapped lines were indented automatically and without any deviation.

Documentation:

  • ChangesLog: updated
  • Comments: Not needed
  • Documentation articles: Not needed
  • Language files: Not needed

Tests:

This fix was tested on the example script "chargedistribution.nscr". No deviations occured. Bug fix implemented successfully.

Related

Commit: [r435]

Discussion

  • Erik Hänel

    Erik Hänel - 2018-11-29
    • status: open --> accepted
     
  • Erik Hänel

    Erik Hänel - 2018-11-29
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,18 @@
     The autoformatting and the autoindentation feature don't indent wrapped lines (by the usage of `\\`).
    +
    +###Analysis:
    +(*Describe, what's the issue and which changes have to be made*)
    +
    +###Implementation:
    +* Implementation: (*Describe, what you've changed*) 
    +* Revision: [rXXX]
    +* Implementation test: (*Describe the type of test, which you performed, and if it was successful*)
    +
    +###Documentation:
    +* ChangesLog: (*Have you updated the changes log?*)
    +* Comments: (*Have you written comments in the code, which describe your change?*)
    +* Documentation articles: (*Have you updated the documentation articles?*)
    +* Language files: (*Have you updated the language files?*)
    +
    +###Tests:
    +(*Describe, which tests you performed and their outcome*)
    
    • status: accepted --> analyzing
     
  • Erik Hänel

    Erik Hänel - 2018-11-29
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,7 +1,11 @@
     The autoformatting and the autoindentation feature don't indent wrapped lines (by the usage of `\\`).
    
     ###Analysis:
    -(*Describe, what's the issue and which changes have to be made*)
    +This is a simple fix, because one has to transfer the logic from `NumeReEditor::determineIndentationLevelMATLAB()` to `NumeReEditor::determineIndentationLevelNSCR()`, which means to include the following two lines:
    +
    
    +    :::C++
    +    if (this->GetStyleAt(i) == wxSTC_NSCR_OPERATORS && this->GetTextRange(i, i + 2) == "\\\\")
    +           singleLineIndent = 1;
    
     ###Implementation:
    
     * Implementation: (*Describe, what you've changed*) 
    
    • status: analyzing --> implementing
     
  • Erik Hänel

    Erik Hänel - 2018-11-29
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -8,15 +8,15 @@
                singleLineIndent = 1;
    
     ###Implementation:
    -* Implementation: (*Describe, what you've changed*) 
    -* Revision: [rXXX]
    -* Implementation test: (*Describe the type of test, which you performed, and if it was successful*)
    +* Implementation: The fix was processed as proposed by the analysis.
    +* Revision: [r435]
    +* Implementation test: Wrapped lines were indented automatically and without any deviation.
    
     ###Documentation:
    -* ChangesLog: (*Have you updated the changes log?*)
    -* Comments: (*Have you written comments in the code, which describe your change?*)
    -* Documentation articles: (*Have you updated the documentation articles?*)
    -* Language files: (*Have you updated the language files?*)
    +* ChangesLog: updated
    +* Comments: Not needed
    +* Documentation articles: Not needed
    +* Language files: Not needed
    
     ###Tests:
     (*Describe, which tests you performed and their outcome*)
    
    • status: implementing --> testing
     

    Related

    Commit: [r435]

  • Erik Hänel

    Erik Hänel - 2019-01-24
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -19,4 +19,4 @@
    
     * Language files: Not needed
    
     ###Tests:
    -(*Describe, which tests you performed and their outcome*)
    +This fix was tested on the example script "chargedistribution.nscr". No deviations occured. Bug fix implemented successfully.
    
    • status: testing --> fixed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB