Unless dependencies force the IDE to do so, it should not restart from the beginning, if you press the correct button (blue gear, labelled "build").
If you are positive that you press the correct button, you have to check for inter-project dependencies.