@Override public ISelectionProvider getSelectionProvider() { return site.getSelectionProvider(); }
@Override public ISelectionProvider getSelectionProvider() { return site.getSelectionProvider(); }
public ISelectionProvider getSelectionProvider() { return site.getSelectionProvider(); }
public ISelectionProvider getSelectionProvider() { return pageSite.getSelectionProvider(); }
public ISelectionProvider getSelectionProvider() { return site.getSelectionProvider(); }
@Override public ISelection getSelection() { if (casViewPage != null && casViewPage.getSite().getSelectionProvider() != null) { return casViewPage.getSite().getSelectionProvider().getSelection(); } else { return StructuredSelection.EMPTY; } }
@Override public void setSelection(ISelection selection) { if (casViewPage != null && casViewPage.getSite().getSelectionProvider() != null) { casViewPage.getSite().getSelectionProvider().setSelection(selection); } }
/** * Creates a new <code>GenerateActionGroup</code>. The group * requires that the selection provided by the page's selection provider * is of type <code>org.eclipse.jface.viewers.IStructuredSelection</code>. * * @param page the page that owns this action group */ public GenerateBuildPathActionGroup(Page page) { this(page.getSite(), page.getSite().getSelectionProvider()); }
/** * Creates a new <code>GenerateActionGroup</code>. The group * requires that the selection provided by the page's selection provider * is of type <code>org.eclipse.jface.viewers.IStructuredSelection</code>. * * @param page the page that owns this action group */ public GenerateBuildPathActionGroup(Page page) { this(page.getSite(), page.getSite().getSelectionProvider()); }
@Override public ShowInContext getShowInContext() { return new ShowInContext( null, getSite().getSelectionProvider().getSelection()); } };
@Override public ShowInContext getShowInContext() { return new ShowInContext( null, getSite().getSelectionProvider().getSelection()); } };
/** * The <code>ContentOutline</code> implementation of this <code>PageBookView</code> method * extends the behavior of its parent to use the current page as a selection provider. * * @param pageRec the page record containing the page to show */ protected void showPageRec(PageRec pageRec) { IPageSite pageSite = getPageSite(pageRec.page); ISelectionProvider provider = pageSite.getSelectionProvider(); if (provider == null && (pageRec.page instanceof IContentOutlinePage)) { // This means that the page did not set a provider during its initialization // so for backward compatibility we will set the page itself as the provider. pageSite.setSelectionProvider((IContentOutlinePage) pageRec.page); } super.showPageRec(pageRec); } }
/** * The <code>ContentOutline</code> implementation of this <code>PageBookView</code> method * extends the behavior of its parent to use the current page as a selection provider. * * @param pageRec the page record containing the page to show */ @Override protected void showPageRec(PageRec pageRec) { IPageSite pageSite = getPageSite(pageRec.page); ISelectionProvider provider = pageSite.getSelectionProvider(); if (provider == null && (pageRec.page instanceof IContentOutlinePage)) { // This means that the page did not set a provider during its initialization // so for backward compatibility we will set the page itself as the provider. pageSite.setSelectionProvider((IContentOutlinePage) pageRec.page); } super.showPageRec(pageRec); } }
/** * The <code>ContentOutline</code> implementation of this <code>PageBookView</code> method * extends the behavior of its parent to use the current page as a selection provider. * * @param pageRec the page record containing the page to show */ @Override protected void showPageRec(PageRec pageRec) { IPageSite pageSite = getPageSite(pageRec.page); ISelectionProvider provider = pageSite.getSelectionProvider(); if (provider == null && (pageRec.page instanceof IContentOutlinePage)) { // This means that the page did not set a provider during its initialization // so for backward compatibility we will set the page itself as the provider. pageSite.setSelectionProvider((IContentOutlinePage) pageRec.page); } super.showPageRec(pageRec); } }
/** * Sets global action handlers for: delete select all. * * @param actionBars the new action bars */ @Override public void setActionBars(IActionBars actionBars) { actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(), mDeleteAction); getSite().getSelectionProvider().addSelectionChangedListener(mDeleteAction); actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(), mSelectAllAction); super.setActionBars(actionBars); }
protected void fillContextMenu(IMenuManager mgr) { super.fillContextMenu(mgr); addSortActions(mgr); fActionGroup.setContext(new ActionContext(getSite().getSelectionProvider().getSelection())); fActionGroup.fillContextMenu(mgr); // FileSearchQuery query= (FileSearchQuery) getInput().getQuery(); }
@Override protected void fillContextMenu(IMenuManager mgr) { super.fillContextMenu(mgr); addSortActions(mgr); mgr.appendToGroup(IContextMenuConstants.GROUP_EDIT, getCopyQualifiedNameAction()); fActionGroup.setContext(new ActionContext(getSite().getSelectionProvider().getSelection())); fActionGroup.fillContextMenu(mgr); }
@Override protected void fillContextMenu(IMenuManager mgr) { super.fillContextMenu(mgr); addSortActions(mgr); mgr.appendToGroup(IContextMenuConstants.GROUP_EDIT, getCopyQualifiedNameAction()); fActionGroup.setContext(new ActionContext(getSite().getSelectionProvider().getSelection())); fActionGroup.fillContextMenu(mgr); }
protected void fillContextMenu(IMenuManager mgr) { super.fillContextMenu(mgr); addSortActions(mgr); mgr.appendToGroup(IContextMenuConstants.GROUP_EDIT, getCopyQualifiedNameAction()); fActionGroup.setContext(new ActionContext(getSite().getSelectionProvider().getSelection())); fActionGroup.fillContextMenu(mgr); }
protected void fillContextMenu(IMenuManager mgr) { super.fillContextMenu(mgr); addSortActions(mgr); fActionGroup.setContext(new ActionContext(getSite().getSelectionProvider().getSelection())); fActionGroup.fillContextMenu(mgr); FileSearchQuery query= (FileSearchQuery) getInput().getQuery(); if (!"".equals(query.getSearchString())) { //$NON-NLS-1$ ReplaceAction2 replaceAction= new ReplaceAction2(this, (IStructuredSelection) getViewer().getSelection()); if (replaceAction.isEnabled()) mgr.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, replaceAction); ReplaceAction2 replaceAll= new ReplaceAction2(this); if (replaceAll.isEnabled()) mgr.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, replaceAll); } }