First follow the steps to add the Common Navigator and check that the steps required for usage of resource content are applied.
The following steps discuss the migration component for each part of the ResourceNavigator
org.eclipse.ui.ide.resourceFilters
Add the corresponding org.eclipse.ui.navigator.navigatorContent/commonFilter extensions.
FrameList
support get/setFrameList()
The FrameList support is used for the Go Into functionality. Support for this is included in the ProjectExplorer subclass of CommonNavigator. You should subclass ProjectExplorer instead of CommonNavigator.
ResourcePatternFilter
support get/setPatternFilter()
Configure the ResourcePatternFilter using the
org.eclipse.ui.navigator.navigatorContent/commonFilter
extension. Then you can access the instance of the filter using the following code (where yourViewer
is the instance
of the CommonViewer and yourFilterId
is the string of the Id of your common filter configured above):
INavigatorContentService contentService = yourViewer.getNavigatorContentService(); INavigatorFilterService filterService = contentService.getFilterService(); ICommonFilterDescriptor[] fds = filterService.getVisibleFilterDescriptors(); for (int i = i; i < fds.length; i++) { if (fds[i].getId().equals(yourFilterId)) return filterService.getViewerFilter(filterDescriptor); }
IWorkingSet
support get/setWorkingSet()
Working sets are not directly supported by the Common Navigator. The Project Explorer however does support working sets. There is however no current API in the Project Explorer to manipulate working sets. The Project Explorer provides a UI to work with working sets. If this sort of API is required, please file an enhancement request explaining the requirement.
ResourceSorter
support get/setResourceSorter()
Use the sorting facility in the Common Navigator.
ResourceComparator
support get/setResourceComparator()
Use ResourceSorter instead for now as the Common Navigator does not directly support ResourceComparators.