My advisor introduced a new student in my work saying that I am doing X,Y,Z and he will be doing A,B,C. I was asked to explain X and share all the data, results, reports, all related publications etc to enable the student to do A,B,C. Once I have explained him X, Y, and shared my data and future plans, he changed/abandoned his directions and submits a paper with another lab collaborator and my advisor on my key idea X without even letting me know anything. After somehow finding it, I politely asked them about it. They were apologetic and both these students agreed through email exchanges that it was not their work and that they should have credited me. They also agreed that this should not have happened after a little confrontation.
I know, my advisor is fully aware of the whole situation, and this was done deliberately. I am not able get out of this whole situation for a long time. Taking a fight with my advisor or the students is not an option. How would you all handle this situation effectively? How can you protect your ideas that are unpublished but you have been asked /instructed to share with others? Even I have experienced situation where the supervisor himself misuse and steals student work without giving credit to the student who did it. So a tough question is, how do you protect your ideas from being stolen by your advisor?