Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Eclipse, the changes of my source code have no effect

Tags:

I have a strange problem in Eclipse Helios. When I alter my source code, my changes have no effect. Even if I alter the code in a way that looks uncompilable, it still can be run.

It seems that Eclipse keeps its state somewhere in the background while I edit and save my sources and commit them to svn.

I don't know what setting to look up or what else to do. I'd be glad to receive any help.

like image 281
dajood Avatar asked Mar 01 '12 01:03

dajood


People also ask

Why errors are not showing in Eclipse?

You need to open the eclipse Markers view ( Window->Show View->Markers ), it will show all errors about your project, if you correct all the errors, your problem will most likely be solved.

How do you see the code change in Eclipse?

Right-click on the file > Team > Show annotation . A brown tape will appear on the left-side of the code (it represents commited lines), and the modified lines will be shown in white .

How do you update references in Eclipse?

Right-click on almost anything and choose Refactor > Rename. Type in a new name for whatever it is, and make sure that the Update References checkbox is checked. This will ensure that all references in all of your code will be updated.

How can I see local changes in Eclipse?

Right Click on the file and select "Compare With" > "Local History" . It will list the file history by date. Click on any date will display the history of the file content with current version.


2 Answers

Note : Please try this only if you have run out of other options in this thread.

So Just in case the other options like clean/rebuild listen in the other answers, do not address the problem do the following,

Close eclipse Go to the project folder on the hard drive. Delete the .metadata file and restart eclipse and revisit the workspace. The class path and libraries will be re validated and the project fresh built.

like image 79
2 revs Avatar answered Oct 20 '22 19:10

2 revs


In the Project menu, verify that Build Automatically is checked.

like image 23
RMorrisey Avatar answered Oct 20 '22 18:10

RMorrisey