Why does IResource.getRawLocation() return null for IProject

后端 未结 1 1316
Happy的楠姐
Happy的楠姐 2021-01-19 04:40

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

project.getRawLocation()

but this returns null (at least in my c

1条回答
  •  旧时难觅i
    2021-01-19 04:56

    The JavaDoc for getRawLocation() says

    If this resource is an existing project, the returned path will be equal to the location path in the project description.

    and the JavaDoc for the project description IProjectDescription.getLocation() says:

    null is returned if the default location should be used

    The getLocation() call will return a path.

    0 讨论(0)
提交回复
热议问题