Community
Participate
Working Groups
In 'OpenJ2EEResourceAction's updateSelection if the selected element is an EOjbect it does not check to see if the file exists which is necessary because of JEE5 projects without DDs. Without the necessary check the 'open' option is listed on the context menu for the nodes that represent the 'virtual DDs' and they should not be because there is no way to open them.
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