@Override public void init(ICommonActionExtensionSite anActionSite) { gotoAction = new GotoResourceAction(anActionSite.getViewSite().getShell(), (CommonViewer)anActionSite.getStructuredViewer()); }
@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 aConfig) { if (aConfig.getViewSite() instanceof ICommonViewerWorkbenchSite) { viewSite = (ICommonViewerWorkbenchSite) aConfig.getViewSite(); openFileAction = new OpenFileAction(viewSite.getPage()); contribute = 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); }
@Override public void init(ICommonActionExtensionSite anExtensionSite) { if (anExtensionSite.getViewSite() instanceof ICommonViewerWorkbenchSite) { IWorkbenchWindow window = ((ICommonViewerWorkbenchSite) anExtensionSite.getViewSite()).getWorkbenchWindow(); showDlgAction = ActionFactory.NEW.create(window); newProjectAction = new NewProjectAction(window); newExampleAction = new NewExampleAction(window); newWizardActionGroup = new WizardActionGroup(window, PlatformUI.getWorkbench().getNewWizardRegistry(), WizardActionGroup.TYPE_NEW, anExtensionSite.getContentService()); contribute = true; } }
@Override public void init(ICommonActionExtensionSite aSite) { viewer = (CommonViewer) aSite.getStructuredViewer(); }
/** * Return the extension state model for the content provider associated with * action provider. * @return the extension state model for the content provider associated with * action provider */ protected final IExtensionStateModel getExtensionStateModel() { return getActionSite().getExtensionStateModel(); }
public void dispose() { super.dispose(); fExtensionSite.getContentService().getActivationService().removeExtensionActivationListener(fMenuUpdater); }
private boolean isMyViewer(String viewerId) { String myViewerId= fExtensionSite.getViewSite().getId(); return myViewerId != null && myViewerId.equals(viewerId); }
@Override public void init(ICommonActionExtensionSite anExtensionSite) { Assert.isTrue(!disposed); if (anExtensionSite.getViewSite() instanceof ICommonViewerWorkbenchSite) { IWorkbenchWindow window = ((ICommonViewerWorkbenchSite) anExtensionSite .getViewSite()).getWorkbenchWindow(); importAction = new ImportResourcesAction(window); exportAction = new ExportResourcesAction(window); importWizardActionGroup = new WizardActionGroup(window, PlatformUI .getWorkbench().getImportWizardRegistry(), WizardActionGroup.TYPE_IMPORT, anExtensionSite.getContentService()); exportWizardActionGroup = new WizardActionGroup(window, PlatformUI .getWorkbench().getExportWizardRegistry(), WizardActionGroup.TYPE_EXPORT, anExtensionSite.getContentService()); contribute = true; } }
public void init(ICommonActionExtensionSite aConfig) { this.aViewer = aConfig.getStructuredViewer(); makeActions(); }
/** * Return the extension state model for the content provider associated with * action provider. * @return the extension state model for the content provider associated with * action provider */ protected final IExtensionStateModel getExtensionStateModel() { return getActionSite().getExtensionStateModel(); }
@Override public void dispose() { fShowLibrariesNodeActionGroup.dispose(); fLayoutActionGroup.dispose(); fExtensionSite.getContentService().getActivationService().removeExtensionActivationListener(fMenuUpdater); super.dispose(); }
@Override public void init(ICommonActionExtensionSite anActionSite) { anActionSite.getViewSite().getShell(); CommonViewer viewer = (CommonViewer) anActionSite.getStructuredViewer(); goIntoAction = new GoIntoAction(viewer.getFrameList()); }
private boolean isMyViewer(String viewerId) { String myViewerId= fExtensionSite.getViewSite().getId(); return myViewerId != null && myViewerId.equals(viewerId); }
@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; }
public void run() { IStructuredSelection selection = (IStructuredSelection) getContext().getSelection(); Object selectedResource = null; if (selection.size() == 1) { selectedResource = (Object) selection.getFirstElement(); //If you don't want the node expanded, comment the following line ((TreeViewer) _site.getStructuredViewer()).setExpandedState(selectedResource,true); } init(); initSQLObject(this, selectedResource); initConnectionProfile(); super.run(); } };
@Override public void dispose() { fShowLibrariesNodeActionGroup.dispose(); fLayoutActionGroup.dispose(); fExtensionSite.getContentService().getActivationService().removeExtensionActivationListener(fMenuUpdater); super.dispose(); }
public void init(ICommonActionExtensionSite aSite) { super.init(aSite); this.selectionProvider = aSite.getViewSite().getSelectionProvider(); this.viewer = (CommonViewer) aSite.getStructuredViewer(); initActionContributionItem(); }
@Override public Shell getShell() { return aSite.getViewSite().getShell(); } },delegateSelectionProvider);