Community
Participate
Working Groups
MA (28.08.2001 16:07:58) I need to know the paths of JavaElements that has been deleted. IJavaElement.getUnderlyingResource throws a JavaModelException if the underlying resource does not exist. IResources are handles, so why not return a resource, even it does not exist? Let me do the 'exists' test, if I need it. Maybe an unchecked Accessor could be added. NOTES:
PRODUCT VERSION: 128
Deferring, please reopen if it is necessary before 2.0
There is now code in our plugin that does the same thing. It works, but not very efficient, so it would be nice to have. I would also be happy with IJavaElement.getCorrespondingPath(), which might be an even better idea. I saw the code for this in jdt.core's JavaSearchScope.add(IJavaElement element) There are other API requests (incoperate JavaModelUtil into jdt.core) with are a _must_ for 2.0 (my opinion).
Will add IJavaElement.getResource() that will always succeed (even if the underlying resource doesn't exist) or return null for external jar. Will also add IJavaElement.getCorrespondingPath().
Added IJavaElement.getResource() and IJavaElement.getPath().
New Gerrit change created: https://git.eclipse.org/r/146501
Gerrit change https://git.eclipse.org/r/146501 was merged to [master]. Commit: http://git.eclipse.org/c/www.eclipse.org/org.git/commit/?id=3e52c39103ba07a4d6762ff1b0bfbbece251f88e