@Override public boolean hasContents() { return fTreeViewer != null && fTreeViewer.getInput() != null; }
/** * {@inheritDoc} */ public boolean hasContents() { return fTreeViewer != null && fTreeViewer.getInput() != null; }
@Override public boolean hasContents() { if (treeViewer == null || treeViewer.getInput() == null) { return false; } return true; }
@Override public boolean hasContents() { if ((fTreeViewer == null) || (fTreeViewer.getInput() == null)) { return false; } return true; }
/** * Returns the input of the refactoring history control. * * @return the input, or <code>null</code> */ public final RefactoringHistory getInput() { return (RefactoringHistory) fHistoryViewer.getInput(); }
/** * Is input set for this sub view. * * @return True is input is not null or if it is not empty. Otherwise false. */ @SuppressWarnings("unchecked") private boolean isInputSet() { List<Object> input = (List<Object>) getTreeViewer().getInput(); if ((input == null) || input.isEmpty()) { return false; } return true; }
public boolean hasContents() { if (filteredTree == null || filteredTree.getViewer().getInput() == null) { return false; } return true; }
/** * Returns the NodeActionManager to use for the given treeViewer. * <p> * Not API. May be removed in the future. * </p> * * @param treeViewer * the TreeViewer associated with this configuration * @return a node action manager for use with this tree viewer */ protected XMLNodeActionManager createNodeActionManager(TreeViewer treeViewer) { return new XMLNodeActionManager((IStructuredModel) treeViewer.getInput(), treeViewer); }
/** * @return the repository the view is showing the reflog for */ public Repository getRepository() { Object input = refLogTableTreeViewer.getInput(); if (input instanceof ReflogInput) return ((ReflogInput) input).getRepository(); return null; }
/** * */ public void showAllResults() { SearchQuery sq = (SearchQuery)resultViewer.getInput(); SearchQuery newSq = new SearchQuery(sq); newSq.setMaxResults(SearchQuery.UNLIMITED_RESULTS); search(newSq, false); }
private void markDirty() { setDirty(true); ((GitConfig) tv.getInput()).refresh(); tv.refresh(); }
public void add(Object object) { Object parent = fContentProvider.getParent(object); if (parent == null) { add(fTreeViewer.getInput(), object); } else { refresh(parent); } }
/** * Returns the <code>IShowInSource</code> for this view. */ protected IShowInSource getShowInSource() { return () -> new ShowInContext(getViewer().getInput(), getViewer() .getSelection()); }
@Override public ShowInContext getShowInContext() { return new ShowInContext( getTreeViewer().getInput(), getTreeViewer().getSelection()); } };
@Override public void run() { BusyIndicator.showWhile(fTreeViewer.getTree().getDisplay(), () -> refresh(fTreeViewer.getInput())); } };
@Override public ShowInContext getShowInContext() { return new ShowInContext( getTreeViewer().getInput(), getTreeViewer().getSelection()); } };
public ShowInContext getShowInContext() { return new ShowInContext( getTreeViewer().getInput(), getTreeViewer().getSelection()); } };
protected void selectFirstMatch() { Object[] rootElements = contentProvider.getElements(treeViewer.getInput()); Object matchingElement = findMatchingElement(rootElements); ISelection selection = StructuredSelection.EMPTY; if (matchingElement != null) { selection = new StructuredSelection(matchingElement); } treeViewer.setSelection(selection); }
private void refreshSearch() { InstaSearchPlugin.getInstaSearch().updateIndex(); SearchQuery input = (SearchQuery) resultViewer.getInput(); if( input == null ) return; resultViewer.setInput(null); // clear cached search results searchJob.cancel(); searchJob.schedule(input, false, typingSearchDelay); }
protected void selectInTreeView(ISelection selection) { if (selection instanceof ITextSelection && !treeViewer.getTree().isDisposed()) { ITextSelection textSelection = (ITextSelection) selection; ITextRegion selectedTextRegion = new TextRegion(textSelection.getOffset(), textSelection.getLength()); Object input = treeViewer.getInput(); if (input instanceof IOutlineNode) { IOutlineNode nodeToBeSelected = findBestNode((IOutlineNode) input, selectedTextRegion); if (nodeToBeSelected != null) treeViewer.setSelection(new StructuredSelection(nodeToBeSelected)); } } }