INavigatorPipelineService pipelineService = this.getNavigatorContentService().getPipelineService();
if (element instanceof IAdaptable) {
IAdaptable adaptable = (IAdaptable) element;
IFile file = (IFile) adaptable.getAdapter(IFile.class);
if (file != null) {
HashSet<Object> files = new ContributorTrackingSet(
(NavigatorContentService) this.getNavigatorContentService());
files.add(file);
pipelineService.interceptAdd(new PipelinedShapeModification(file.getParent(), files));
if (files.size() > 0) {
element = files.iterator().next();
}
}
}
return element;
}