Actually he took a really brilliant action after the first incident. He took control of Kashmir from militants/separatists and managed to shut up muslim world about it. Military retaliation is for retards. In the contemporary world, it is beyond stupid to engage in a conventional war.
India through its aggressive posturing towards Pakistan has today managed to make sure that your military gets a major share in your budget, eating away your developmental budget, which in turn will ensure low growth for decades. Get this, your defence plus debt servicing (4.17 trillion) is 120% your total generated revenue (3.7 trillion). You don't have anything left for development except through borrowing. India through FATF and other actions is making sure you don't get cheap finance/investment from outside except China.
China for us is a different ball game. We'll not engage with them directly. But through posturing we'll make sure we get beneficial deals from others who would want to block China. There is already a clamor of anti-China world over and we'll show to the world that we need their support economically to contain China resulting in more investment from the anti-China allies. I am thinking may be Modi deliberately manifested this incident with China to firm up US support and silence US-India cooperation critics.