class NegativeFieldPropertyNode

Public Instance Methods

apply_function(operand) click to toggle source
# File lib/ast_node.rb, line 373
  def apply_function(operand)
    # We have to mark the other node as negative (note that for this to work we have to compile twice
    node = self.root_node.targets.find { |i| i.properties[:field_name] == @value }
    if node
      node.properties[:is_negative] = true 
      # We also use the same color
#      config.log.info("Begin getting metrics negative (node : #{node.index} with : #{parent.index} parent Color = root_node.graph_properties[:colorList][parent.index] ")

      root_node.graph_properties[:colorList][node.index] = root_node.graph_properties[:colorList][parent.index] if root_node.graph_properties[:colorList][parent.index]
    end
    return operand
  end