Why does IResource.getRawLocation() return null for IProject

Viewed 621

I need the absolute location of a project folder, so I tried

project.getRawLocation()

but this returns null (at least in my case in which I have imported the project manually using Import ... Existing projects into workspace and I have checked the Copy projects into workspace checkbox).

The thing is that

project.getParent().getRawLocation() 

returns /work/Projekte/runtime-MyProduct.product which is correct

and

project.members()[0].getRawLocation()

returns /work/Projekte/runtime-MyProduct.product/Test/.cproject which is correct as well.

Consequently, I'd expect that

project.getRawLocation() 

would return /work/Projekte/runtime-MyProduct.product/Test, but it returns null.

Can anyone explain and/or show me where I'm wrong?

1 Answers
Related