Normally, when you are working in Eclipse, and you do an ‘Open Declaration’ on some Eclipse code, its source will open up automatically. However, I was working on an Eclipse RCP application we are developing and I was getting the following error when trying to view an Eclipse class file.
‘The JAR of this class file belongs to container ‘Plug-in Dependencies’ which does not allow modifications to source attachments on its entries.’
‘What the heck does that mean?’ It turns out, that we are using the Eclipse Target Platform mechanism and it didn’t include the source folders that come with the Eclipse SDK distribution itself. So the fix is easy. Just copy the appropriate source folders from your Eclipse install into the target platform and reload it. This might be obvious to any Eclipse guru, but it wasn’t apparent from searching for this error message on Google. So I hope this helps someone out.
Posted in Eclipse | No Comments



