Menu

#166 Implement block highlighting

v1.1.x
closed
None
v1.1.0
New Functionality
2017-05-04
2017-03-03
Erik Hänel
No

If one clicks on a block control element (like for or endwhile), their corresponding closing or opening partner should be highlighted.

Analysis:
This can be achieved by adding two custom functions only active for NPRC and NSCR: MakeBlockCheck() and getMatchingBlock(). In addition, another indicator is needed, which shall be cleared, when the brace and the occurence highlighter are cleared.

Implementation:
Functionality was implemented as proposed by the analysis mit the exception that a third function was implemented

vector<int> BlockMatch(int)

which is doing more or less the whole matching work and can be used in other functions as well. It returns a vector<int> to allow highlighting the intermediary flow tokens else and elseif as well.

Documentation:
Not needed. Functionality is self-describing.

Tests:
Block highlighting works as expected. No deviations detected. Functionality implemented successfully.

Discussion

  • Erik Hänel

    Erik Hänel - 2017-03-03
    • status: open --> accepted
     
  • Erik Hänel

    Erik Hänel - 2017-03-04
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,9 @@
     If one clicks on a block control element (like `for` or `endwhile`), their corresponding closing or opening partner should be highlighted.
    +
    +**Analysis:**
    +
    +**Implementation:**
    +
    +**Documentation:**
    +
    +**Tests:**
    
    • status: accepted --> analyzing
     
  • Erik Hänel

    Erik Hänel - 2017-03-05
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,6 +1,7 @@
     If one clicks on a block control element (like `for` or `endwhile`), their corresponding closing or opening partner should be highlighted.
    
     **Analysis:**
    +This can be achieved by adding two custom functions only active for NPRC and NSCR: `MakeBlockCheck()` and `getMatchingBlock()`. In addition, another indicator is needed, which shall be cleared, when the brace and the occurence highlighter are cleared.
    
     **Implementation:**
    
    • status: analyzing --> implementing
     
  • Erik Hänel

    Erik Hänel - 2017-03-05
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -4,7 +4,13 @@
     This can be achieved by adding two custom functions only active for NPRC and NSCR: `MakeBlockCheck()` and `getMatchingBlock()`. In addition, another indicator is needed, which shall be cleared, when the brace and the occurence highlighter are cleared.
    
     **Implementation:**
    +Functionality was implemented as proposed by the analysis mit the exception that a third function was implemented 
    +~~~C
    +vector<int> BlockMatch(int)
    +~~~
    +which is doing more or less the whole matching work and can be used in other functions as well. It returns a `vector<int>` to allow highlighting the intermediary flow tokens `else` and `elseif` as well.
    
     **Documentation:**
    +Not needed. Functionality is self-describing.
    
     **Tests:**
    
    • status: implementing --> testing
     
  • Erik Hänel

    Erik Hänel - 2017-05-04
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -14,3 +14,4 @@
     Not needed. Functionality is self-describing.
    
     **Tests:**
    +Block highlighting works as expected. No deviations detected. Functionality implemented successfully.
    
    • status: testing --> closed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB