bracco23
bracco23

Reputation: 2211

Eclipse does not refresh .project information

I have an Ecplise project shared on a Git repository with other people in a team.

It often happens that we have to add some linked resources in this project, effectively modifying the .project content, which is later committed and pushed to the repo.

Now, when another user pulls the modifications and opens its own Ecplise instance, if they have already imported the project before the configuration changes, Eclipse doesn't see the changes and still uses the old metadata, showing mistakes during the compilation of the project. the only way I have found to fix the situation is to delete the .metadata folder and reimport the project. Is there an easier way?

EDIT:

Eclipse version is 4.6.0.v20160606-1342, Build id: I20160606-1100. I am not working natively on Eclipse, but on a derived IDE (CCS Studio from Texas Instrument) and updating version is out of question.

Regarding the NullPointerException I mentioned in the comments, here is the stacktrace taken from the logs.

!ENTRY org.eclipse.ltk.ui.refactoring 4 10000 2019-04-04 18:16:36.261
!MESSAGE Internal Error
!STACK 0
java.lang.NullPointerException
    at com.ti.ccstudio.project.core.internal.temp.XMoveDeleteHook.deleteFile(XMoveDeleteHook.java:83)
    at org.eclipse.team.internal.core.MoveDeleteManager.deleteFile(MoveDeleteManager.java:50)
    at org.eclipse.core.internal.resources.Resource.unprotectedDelete(Resource.java:1827)
    at org.eclipse.core.internal.resources.Resource.delete(Resource.java:782)
    at org.eclipse.ltk.core.refactoring.resource.DeleteResourceChange.perform(DeleteResourceChange.java:163)
    at org.eclipse.ltk.core.refactoring.CompositeChange.perform(CompositeChange.java:280)
    at org.eclipse.ltk.core.refactoring.CompositeChange.perform(CompositeChange.java:280)
    at org.eclipse.ltk.core.refactoring.PerformChangeOperation$1.run(PerformChangeOperation.java:257)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267)
    at org.eclipse.ltk.core.refactoring.PerformChangeOperation.executeChange(PerformChangeOperation.java:305)
    at org.eclipse.ltk.internal.ui.refactoring.UIPerformChangeOperation.executeChange(UIPerformChangeOperation.java:96)
    at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:221)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267)
    at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:86)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)

Upvotes: 0

Views: 922

Answers (1)

eftshift0
eftshift0

Reputation: 30164

.project (or any other IDE metadata) should not be tracked in git because you will be facing problems like this over and over again and again... and again.

Upvotes: 1

Related Questions