DynamoDS/Dynamo — pull request #2718 by ke-yu (2014-10-15 01:15:31+00:00)
Title: Fix warnings

This pull request continues the fix for warning related issue: [MAGN-4659 Errors are appearing on the node](http://adsk-oss.myjetbrains.com/youtrack/issue/MAGN-4659) and [MAGN-4710 Warnings are not getting clear](http://adsk-oss.myjetbrains.com/youtrack/issue/MAGN-4710).

Some issues fixed in this pull request:
* Using ``Properties.ExecutingGraphNode`` instead of ``core.ExecutingGraphNode``. The latter only is set in ``Callr()``. When the VM logs warnings, the VM save graph node's GUID (it is the guid of UI node) and AST ID to warning entry. As we were using wrong graph node, warnings sometimes appear on wrong UI node.
* Clear runtime warning. The difficulty is a code block node may contain multiple expression and each expression may be broken down into multiple AST binary expression because of SSA. So, there are two places where runtime warnings need to be cleared -
- When sending code to the live runner. When the content of a code block node is changed and get compiled, live runner will calculate the delta change set. But at this point we shouldn't clear the warning for the whole UI node because in delta execution some expression may not be re-executed again (so runtime warning won't get logged). But it is safe to clear warning for AST expression which is either deleted or explicitly modified.
- When AST expression is executed. Note an expression in code block node will be broken down into multiple AST expressions. So if the parent graph node is re-executed, we should clear its warnings. The checking shouldn't happen on single AST expression. For example, for code ``y = x.foo();`` it will be compiled to ``t1 = x.foo(); y = t1``, if we clear warning for each AST expression (which is graph node as well internally), and if ``t1 = x.foo();`` has some warning, it will be cleared when the VM execute ``y = t1``.

Warning handling is tricky because of these complexities behind the scene!

@junmendoza please help to review the change.
@riteshchandawar you may be interested in the details.