I am a junior PhD student in electrical engineering and I need ideas about how to handle my mentor. Whenever I go to her with an idea she rejects it saying it is wrong or not interesting. But after a few months she comes back with a slightly modified version of my earlier idea and takes credit for the full idea. She asks me to do experiments with her version of my idea. Then when we have results, she publishes them in a conference (includes me as an author), but she gives the talk at the conference saying she came up with the idea and I only did experiments.
I don't want to stop working with her because I have been working with her for two years and leaving will set me back by at least one and a half years. Can you suggest how to avoid this?