Hello,
I tried to narrow the reason why the code is not being colored, and it seems that it is the if statement that is causing this.
If i remove the if statement the statements under it are shown as colored.
Even if I separate the if statement into two parts, one which detects whether the condition of the "if" is true and sets a flag
and the other which acts upon the flag it still ends up as not being coloured (as shown below).
It seems to only be recording the false cases and not accumulating the true cases.
However I am not sure how to reproduce this with a minimal working example.
I simplified the example as follows:
- class 1:
- for ( Input input : inputs )
- {
- .........
- if( !Errors)
- input.combine();
- .........
- }
- class 2
- private static boolean combine = false;
- public void combine( ) {
- if ( myArrayList.size( )> 0 )
- {
- for ( MyElement element : elements ) {
- if(element.myEnumElement.hasCombine()) {
- combined = true; <-- this never gets coloured, whereas it should
- }
- }
- }
- Enum class
- COMBINATION {
- Attribute.COMBINE
- };
- private enum Attribute
- {
- COMBINE
- }
-
- public boolean hasCombine( )
- {
- return attributes.contains( Attribute.COMBINE ); <-- this does get executed and would return true and false, in the test case that I have
- }