Bug 27105 - JavaElementAdapterFactory.getResource should probably not call getCorresponding resource
Summary: JavaElementAdapterFactory.getResource should probably not call getCorrespondi...
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M4   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2002-11-25 12:04 EST by Adam Kiezun CLA
Modified: 2002-12-09 08:56 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Kiezun CLA 2002-11-25 12:04:39 EST
getResource should be probably used instead
it should be faster too
Comment 1 Dirk Baeumer CLA 2002-11-25 13:51:36 EST
GetResource maps to getUnderlyingResource which has a different semantic then 
getCorrespondingResource.

Adam, why do you suggest to change this.
Comment 2 Adam Kiezun CLA 2002-11-26 04:51:02 EST
let me investigate further a bit to give good reasons or close as 'invalid'
Comment 3 Martin Aeschlimann CLA 2002-11-28 03:45:07 EST
The reason why to change to 'getResource' is that getUnderlyingResource does 
a 'exists()' test which is not needed in this context. (See in the code: the 
not exist exception is caught and getResource is returned)
Comment 4 Erich Gamma CLA 2002-12-04 08:12:59 EST
but the semantic difference still existing.
In the case of a Java element from a JAR you would get the JAR file, currently 
you get null.

This change is subtle and unless we hare real performance data we should not 
change this.
Comment 5 Adam Kiezun CLA 2002-12-09 08:56:42 EST
no proof that this is a performance problem
if we find one we will ask jcore for a fster implementation of 
getCorrespondingResource