Community
Participate
Working Groups
Start a build on a project and then hit cancel. Now try and use project->build, it just pops up a dialog for a fraction of a second and that dialog is dismissed without the classes being compiled. The build command should display a dialog stating the reason or at least notifing the user that the build didn't execute. I know that it didn't execute because I went to the classes directory and deleted one of the class files, then pressing ctrl-b the class file was not resurrected.
Refreshing and then trying a build works.
Deleting the class file from disk without a refresh inside Eclipse will not trigger a build. Eclipse does not search for changes made outside the environment until you tell it to... As far as the original problem, I was unable to reproduce it. How many source file changes were involved in the first build? Was it a full build or an incremental that only affected 1-2 files? If it was an incremental build, then I suspect the build finished before the cancel was detected... so there were no more changes to apply during the forced project build.
It was an incremental build. I'll try to get a better set of repro steps. The dialog was dismissed just like it thought there was nothing to build. Here is a question though, if eclipse knows there is nothing to build why bring up the dialog at all? Seems pretty pointless to pop-up something for a micro second if all it is going to do is be flashed. I suppose it does indicate that eclipse received the command and I am not sure I wouldn't want anything to happen.
Are you sure you can't repro? Happens pretty much anytime I cancel a build. I can see in my source file markers along the side which when I hover say "InputStreamReader can not be resolved or is not a type" but when I build, the build dialog is just dismissed like eclipse believe it doesn't need to build. And there are no tasks listed.
What errors do you have on your project itself? To see only these errors, select the project & the change the filter settings on the Task list to the 'On selected resource only'.
Is it still happening? Do you have more info?
Doesn't seem to. Now if I hit cancel in the middle of a build and then refresh and try to build again I get the following message. The message only goes away if I then choose to rebuild project. The project was not built due to "Problems encountered while deleting resources.". Fix the problem, then try refreshing this project and rebuilding it since it may be inconsistent.
That message is most often generated when we cannot delete resources because another application outside of eclipse is holding onto them. What else are you running? Is anything else accessing files inside your workspace?
When it first generates the message there might have been but I closed all apps and then tried refresh and build but it refuses unless I say rebuild project. If Rebuild is able to do and not generate this error shouldn't build be able to do it?
'Build' detects deltas & performs a build as long as the deltas for the project are not empty. A 'rebuild' will always wipe the output folder and recompile as much as it can. I've tried getting my project into a failed build state (which is what happened when some of your files couldn't be deleted), then fix/refresh the project & perform a 'build', not a 'rebuild'... but the 'build' works fine for me. Reopen this PR if you can provide a reproduceable set of steps.