public ISelection getSelection() { if (fViewer != null) return fViewer.getSelection(); return super.getSelection(); }
@Override public ISelection getSelection() { if (fViewer != null) return fViewer.getSelection(); return super.getSelection(); }
/** * Returns the selected edition or <code>null</code> if no edition is selected. * The result of this method should only be considered if {@link #isEditionSelectionDialog()} * returns <code>true</code>. * @return the selected edition or <code>null</code> * @since 3.3 */ public Object getSelectedEdition() { if (fStructureInputPane != null) { ISelection selection = fStructureInputPane.getSelection(); if (selection instanceof IStructuredSelection) { IStructuredSelection ss = (IStructuredSelection) selection; if (!ss.isEmpty()) return ss.getFirstElement(); } } return null; }
/** * Return the selected edition or <code>null</code> if no edition is selected. * The result of this method should only be considered if {@link #isEditionSelectionDialog()} * returns <code>true</code>. * @return the selected edition or <code>null</code> * @since 3.3 */ public Object getSelectedEdition() { if (fStructureInputPane != null) { ISelection selection = fStructureInputPane.getSelection(); if (selection instanceof IStructuredSelection) { IStructuredSelection ss = (IStructuredSelection) selection; if (!ss.isEmpty()) return ss.getFirstElement(); } } return null; }
private void feedInput() { if (fStructureInputPane != null && (fInput instanceof ICompareInput || isCustomStructureInputPane())) { if (hasChildren(fInput) || isCustomStructureInputPane()) { // The input has multiple entries so set the input of the structure input pane fStructureInputPane.setInput(fInput); } else if (!structureCompareOnSingleClick() || isShowStructureInOutlineView()) { // We want to avoid showing the structure in the editor if we can so first // we'll set the content pane to see if we need to provide a structure internalSetContentPaneInput(fInput); // If the content viewer is unusable if (hasUnusableContentViewer() || (structureCompareOnSingleClick() && isShowStructureInOutlineView() && !hasOutlineViewer(fInput))) { fStructureInputPane.setInput(fInput); } } else { fStructureInputPane.setInput(fInput); } ISelection sel= fStructureInputPane.getSelection(); if (sel == null || sel.isEmpty()) feed1(sel); // we only feed downstream viewers if the top left pane is empty } }
private void feedInput() { if (fStructureInputPane != null && (fInput instanceof ICompareInput || isCustomStructureInputPane())) { if (hasChildren(fInput) || isCustomStructureInputPane()) { // The input has multiple entries so set the input of the structure input pane fStructureInputPane.setInput(fInput); } else if (!structureCompareOnSingleClick() || isShowStructureInOutlineView()) { // We want to avoid showing the structure in the editor if we can so first // we'll set the content pane to see if we need to provide a structure internalSetContentPaneInput(fInput); // If the content viewer is unusable if (hasUnusableContentViewer() || (structureCompareOnSingleClick() && isShowStructureInOutlineView() && !hasOutlineViewer(fInput))) { fStructureInputPane.setInput(fInput); } } else { fStructureInputPane.setInput(fInput); } ISelection sel= fStructureInputPane.getSelection(); if (sel == null || sel.isEmpty()) feed1(sel); // we only feed downstream viewers if the top left pane is empty } }