/** * Create a visibility assistant for the given viewer descriptor. * * @param aViewerDescriptor * A non-nullviewer descriptor. * @param anActivationService * The activation service associated with the content service. */ public VisibilityAssistant(INavigatorViewerDescriptor aViewerDescriptor, INavigatorActivationService anActivationService) { Assert.isNotNull(aViewerDescriptor); viewerDescriptor = aViewerDescriptor; activationService = anActivationService; activationService.addExtensionActivationListener(this); }
/** * @param aViewerId * The viewer id for this content service; normally from the * <b>org.eclipse.ui.views</b> extension. */ public NavigatorContentService(String aViewerId) { super(); aViewerId = aViewerId != null ? aViewerId : ""; //$NON-NLS-1$ viewerDescriptor = VIEWER_DESCRIPTOR_REGISTRY .getNavigatorViewerDescriptor(aViewerId); assistant = new VisibilityAssistant(viewerDescriptor, getActivationService()); getActivationService().addExtensionActivationListener(this); }
public void init(ICommonActionExtensionSite site) { fExtensionSite= site; fStateModel= fExtensionSite.getExtensionStateModel(); fLayoutActionGroup= new CommonLayoutActionGroup(fExtensionSite.getStructuredViewer(), fStateModel); INavigatorActivationService activationService= fExtensionSite.getContentService().getActivationService(); activationService.addExtensionActivationListener(fMenuUpdater); fExtensionId= fExtensionSite.getExtensionId(); fEnabled= true; }
@Override public void init(ICommonActionExtensionSite site) { fExtensionSite= site; fStateModel= fExtensionSite.getExtensionStateModel(); fLayoutActionGroup= new CommonLayoutActionGroup(fExtensionSite.getStructuredViewer(), fStateModel); fShowLibrariesNodeActionGroup = new ShowLibrariesNodeActionGroup(fExtensionSite.getStructuredViewer(), fStateModel); INavigatorActivationService activationService= fExtensionSite.getContentService().getActivationService(); activationService.addExtensionActivationListener(fMenuUpdater); fExtensionId= fExtensionSite.getExtensionId(); fEnabled= true; }
@Override public void init(ICommonActionExtensionSite site) { fExtensionSite= site; fStateModel= fExtensionSite.getExtensionStateModel(); fLayoutActionGroup= new CommonLayoutActionGroup(fExtensionSite.getStructuredViewer(), fStateModel); fShowLibrariesNodeActionGroup = new ShowLibrariesNodeActionGroup(fExtensionSite.getStructuredViewer(), fStateModel); INavigatorActivationService activationService= fExtensionSite.getContentService().getActivationService(); activationService.addExtensionActivationListener(fMenuUpdater); fExtensionId= fExtensionSite.getExtensionId(); fEnabled= true; }
@Override public void init(ICommonActionExtensionSite aSite) { viewer = (CommonViewer) aSite.getStructuredViewer(); contentService = aSite.getContentService(); filterService = (NavigatorFilterService) contentService.getFilterService(); extensionStateModel = contentService.findStateModel(WorkingSetsContentProvider.EXTENSION_ID); workingSetActionGroup = new WorkingSetFilterActionGroup(aSite.getViewSite().getShell(), filterChangeListener); workingSetRootModeActionGroup = new WorkingSetRootModeActionGroup(viewer, extensionStateModel); topLevelModeListener = event -> { setWorkingSet(workingSet); viewer.getFrameList().reset(); }; if (contentService.isActive(WorkingSetsContentProvider.EXTENSION_ID)) { managerChangeListener.listen(); extensionStateModel.addPropertyChangeListener(topLevelModeListener); } contentService.getActivationService().addExtensionActivationListener(activationListener); }