Community
Participate
Working Groups
Found through code review associated with bug 174942. The requested change should not be committed for M5 but for M6. I don't like the signature of method protected ISystemViewElementAdapter getAdapter(Object o) at all. When reading code, getAdapter(x) is so easily confused with getAdapter(IAdaptable x). It would be much better to rename this method to protected ISystemViewElementAdapter getViewAdapter(Object o) I did a text search for ISystemViewElementAdapter getAdapter(Object o) and found 13 occurrences. There may be more with different space usage. I think that all of these should be renamed to getViewAdapter(), which should be a simple and safe refactoring. It also looks to me like the all 13 classes in which these occurrences are should be in internal packages.
Affected classes: CombineForm ExtractToForm SaveAsForm SystemAbstractAPIProvider SystemAdapterHelpers SystemBaseAction SystemConnectionSubSystemsPropertyPage SystemDeleteDialog SystemDeleteTableRow SystemKillDialog SystemKillTableRow SystemRemoteElementResourceSet SystemRenameSingleDialog SystemResourceSelectionForm SystemScratchpadView SystemSearchViewContentProvider SystemSearchViewLabelProvider SystemSearchViewPart SystemSelectRemoteObjectAPIProviderImpl SystemTableTreeView SystemViewLabelAndContentProvider
Most of these just delegate to SystemAdapterHelpers.getAdapter(o) so the corresponding protected implementations could probably be removed (or would it make sense for extenders to override them?)
I've changed the listed classes to use getViewAdapter(Object) instead of getAdapter(Object).
[target cleanup] 2.0 M6 was the original target milestone for this bug