Any chance you have the fast re-run option enabled and your project folder is a network disk? This could cause the Modeler not being able to pick up changes from your disk, thus thinking it could re-run without having to perform many steps. But in that case it should show that the server is not entirely restarting.
Note you can also actually start your project from Eclipse (under debug/run configurations)
Try cleaning your deployment directory. If for some reason the modeller would not compile your java actions this will tjrow away any compiled actions.
Have you tried F4 Synchronize Project Directory?
Just to double-check, you are editing your java source in the javasource folder and not in the deployment folder right?
if you cleaned your java directory by deleting the javasource then this is very bad idea especially when you have written a custom java action. It means that you have deleted your custom actions. Mendix will regenerate your files but without the implementation you deleted.
If it is a team server project then you can get the source from one of your revisions.
However if you have not deleted anything from the javasource directory, just press f6 to regenerate the javasource to be used in eclipse.
I did enable the fast re-run. After a couple of reboots it works now. So maybe it was indeed the cache in the deployment dir. If it happens again, I will do F4 and clean the deployment.