Foreign policy in the cold war times was driven by ideology but now it's driven by economy so saying that today's Sri Lanka engages in "anti-Indian" activities is stupid.
You can't color everything with Cold War ideology and hope to get away with it!
For me, the biggest mistake Sri Lanka made, was taking a side in a
regional conflict between India and Pakistan. Many other countries at that time,
wisely, stayed out of the conflict and let both India and Pakistan diss it out on each other!
Particularly during 1971 war, Sri Lanka facilitated the slaughter of millions of East Pakistanis by giving berthing/refueling rights to PN/PAF!
If that is not a DIRECT hostile intent against India, then what is?
Even today, ISI continues to use Sri Lankan territory for subversive activities against India.
Obviously, India is justified in believing that Sri Lanka lets her territory be used for anti-India activities. But ironically, Sri Lankans complain only about India's intervention in the island nation!
The reason why India is nervous about China is because China has been the largest investor in Sri Lanka but at the same time, there is also enough for India to invest but Indians don't have enough resources to invest. Some of the projects Indian companies undertook were later abandoned. Even for Port City India was invited first to develop it but it was out of reach for Indian companies. Then China came and filled the void. Can you blame Sri Lanka or China for that?
I don't think India can raise objections to Chinese legitimate investments that don't threaten India. What irks India though are dual purpose investments that can pose severe security threats to India.
Already China has put India at an eternal disadvantage by clandestinely facilitating Pakistan with Nuclear weapons and their delivery mechanisms. When China was doing that, she had absolutely no illusions as to who those Nuclear weapons will be targeted against. Even today, China regularly blocks UN resolutions against Pakistan based terrorist organizations targeting India. So
China is no saint when it comes to this region, or any other region for that matter!
Of course, India will continue to protest and act
unilaterally on anything that threatens her territorial integrity - no matter how strongly Sri Lanka feels about it.
It it leads to blocking some of genuine-sounding investments too, that is the price Sri Lanka will have to pay for her past indiscretions against India!