Summary: | OpenJ2EEResourceAction updateSelection not checking for none existent file | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [WebTools] WTP Java EE Tools | Reporter: | Ian Tewksbury <tewksbur> | ||||||
Component: | jst.j2ee | Assignee: | Ian Tewksbury <tewksbur> | ||||||
Status: | RESOLVED FIXED | QA Contact: | Chuck Bridgham <cbridgha> | ||||||
Severity: | major | ||||||||
Priority: | P2 | CC: | ccc, jsholl | ||||||
Version: | 3.0 | Keywords: | contributed | ||||||
Target Milestone: | 3.0.1 | Flags: | cbridgha:
review+
|
||||||
Hardware: | PC | ||||||||
OS: | Windows XP | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
Ian Tewksbury
2008-06-02 16:29:47 EDT
Created attachment 103200 [details]
Path
This patch adds the necessary 'file.exists()' check to the updateSelection method.
In the case were the file does not exist currentDescriptor is set to null and the method returns false.
Without this fix, many exception were being thrown, and the wrong editor was being selected if the underlying IResource doesn't exist. looks good - waiting for patch stream Created attachment 105174 [details]
Updated Patch
With the original patch if an EJB3 had no DD but had a bean, if you tried to open the bean the option to open was not listed. This is because the 'WorkbenchResourceHelper' returns the DD file as the associated file for any Bean nested under it.
The new patch first checks to see if the EObject is actually a DD and if it is does the check to be sure it exists, otherwise if the EObject is not a DD then the code executes as it originally did allowing the an associated Bean to open.
approved earlier... Committed to R3_0_maintenance Also committed to HEAD |