Community
Participate
Working Groups
org.eclipse.jface.preference.FileFieldEditor does not call doCheckSate() during checkState() which makes it difficult to subclass this editor to perform additional checks like it is possible with StringFieldEditor
Created attachment 112495 [details] Patch for FileFieldEditor.java Proposed fix.
There's a problem with the previously submitted patch. Re-looking into it.
Created attachment 112498 [details] Fixed patch Patch for FileFieldEditor.java. Gives precedence to the check status of FileFieldEditor. If an error is not found in the checkStatus of FileFieldEditor then doCheckStatus is invoked.
Removing 3.5 target milestone. We are in the end-game now. Please have a look and decide if this should be targeted at 3.6.
Sure, let's look it in the 3.6.
I ran into this issue as well. FileFieldEditor currently overrides checkState() and reimplements everything from its superclass StringFieldEditor (with a better implementation, I might add), *except* the call to doCheckState(). Instead, I think FileFieldEditor should *not* override checkState(), but rather give its own implementation of doCheckState(). That is exactly what doCheckState is intended for, isn't it?
Created attachment 153200 [details] Updated patch (In reply to comment #6) > Instead, I think FileFieldEditor should *not* override checkState(), but rather > give its own implementation of doCheckState(). Yes, that would be best, but this is a public non-final class so no telling how people subclassed it. I changed Mayank's patch a bit to account for a case where error message gets modified by a subclass.
Updated patch applied to CVS Head. Thank you!
Verified in I20091207-1800.