org.eclipse.ui.internal.navigator.NavigatorContentService Java Examples
The following examples show how to use
org.eclipse.ui.internal.navigator.NavigatorContentService.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PydevPackageExplorer.java From Pydev with Eclipse Public License 1.0 | 6 votes |
/** * @param element the element that should be gotten as an element from the pydev model * @return a pydev element or the same element passed as a parameter. */ private Object getPythonModelElement(Object element) { if (element instanceof IWrappedResource) { return element; } INavigatorPipelineService pipelineService = this.getNavigatorContentService().getPipelineService(); if (element instanceof IAdaptable) { IAdaptable adaptable = (IAdaptable) element; IFile file = 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; }
Example #2
Source File: WorkingSetsContentProvider.java From translationstudio8 with GNU General Public License v2.0 | 5 votes |
public void init(ICommonContentExtensionSite aConfig) { NavigatorContentService cs = (NavigatorContentService) aConfig.getService(); viewer = (CommonViewer) cs.getViewer(); projectExplorer = viewer.getCommonNavigator(); extensionStateModel = aConfig.getExtensionStateModel(); extensionStateModel.addPropertyChangeListener(rootModeListener); updateRootMode(); }
Example #3
Source File: WorkingSetsContentProvider.java From tmxeditor8 with GNU General Public License v2.0 | 5 votes |
public void init(ICommonContentExtensionSite aConfig) { NavigatorContentService cs = (NavigatorContentService) aConfig.getService(); viewer = (CommonViewer) cs.getViewer(); projectExplorer = viewer.getCommonNavigator(); extensionStateModel = aConfig.getExtensionStateModel(); extensionStateModel.addPropertyChangeListener(rootModeListener); updateRootMode(); }