Community
Participate
Working Groups
I20030923 As an example: use FindReplace dialog on Source page of PDE's plug-in editor and observe: status is written in dialog but not in the workbench window's status line.
This is fixable with by allowing MultiPageEditorPart to delegate to an inner editor's getAdapter() call if it cannot provide an adapter itself. mvm, I'm overriding a public method on a public abstract class, but it's already API on the super class. Am I prevented from doing this? PW
I think this is ok, Boris?
Just make sure not to introduce a similar problem as reported in bug 120336.
If the MPEP is adaptable, it wins (just like now). It's only if the MPEP can't adapt to the object that we delegate to the inner editor. public Object getAdapter(Class adapter) { Object result = super.getAdapter(adapter); if (result == null && getActiveEditor() != null) { result = getActiveEditor().getAdapter(adapter); } return result; } Later, PW
Re-implementing an API method in a subclass is no problem if the contract for callers does not change (to be precise: preconditions can only be loosened, postconditions tightened), and if you follow the superclass' rules to call the super implementation when such rules exist.
Released into HEAD >20060407 PW
Verified (visually) in RC3.