/** * Takes the selected proposal and applies it. * * @param stateMask the state mask * @return <code>true</code> iff a proposal has been inserted * @since 2.1 */ private boolean selectProposalWithMask(int stateMask) { if (fInvocationCounter != fInvocationProcessedCounter) if (!doFilterProposals()) return false; ICompletionProposal p= getSelectedProposal(); hide(); if (p != null) { insertProposal(p, (char) 0, stateMask, fViewer.getSelectedRange().x); return true; } return false; }
/** * Takes the selected proposal and applies it. * * @param stateMask the state mask * @return <code>true</code> iff a proposal has been inserted * @since 2.1 */ private boolean selectProposalWithMask(int stateMask) { if (fInvocationCounter != fInvocationProcessedCounter) if (!doFilterProposals()) return false; ICompletionProposal p= getSelectedProposal(); hide(); if (p != null) { insertProposal(p, (char) 0, stateMask, fViewer.getSelectedRange().x); return true; } return false; }
/** * Selects the entry with the given index in the proposal selector and feeds * the selection to the additional info controller. * * @param index the index in the list * @param smartToggle <code>true</code> if the smart toogle key has been pressed * @since 2.1 */ private void selectProposal(int index, boolean smartToggle) { ICompletionProposal oldProposal= getSelectedProposal(); if (oldProposal instanceof ICompletionProposalExtension2) ((ICompletionProposalExtension2) oldProposal).unselected(fViewer); ICompletionProposal proposal= fFilteredProposals[index]; if (proposal instanceof ICompletionProposalExtension2) ((ICompletionProposalExtension2) proposal).selected(fViewer, smartToggle); fLastProposal= proposal; fProposalTable.setSelection(index); fProposalTable.showSelection(); if (fAdditionalInfoController != null) fAdditionalInfoController.handleTableSelectionChanged(); }
/** * Selects the entry with the given index in the proposal selector and feeds * the selection to the additional info controller. * * @param index the index in the list * @param smartToggle <code>true</code> if the smart toogle key has been pressed * @since 2.1 */ private void selectProposal(int index, boolean smartToggle) { ICompletionProposal oldProposal= getSelectedProposal(); if (oldProposal instanceof ICompletionProposalExtension2) ((ICompletionProposalExtension2) oldProposal).unselected(fViewer); ICompletionProposal proposal= fFilteredProposals[index]; if (proposal instanceof ICompletionProposalExtension2) ((ICompletionProposalExtension2) proposal).selected(fViewer, smartToggle); fLastProposal= proposal; fProposalTable.setSelection(index); fProposalTable.showSelection(); if (fAdditionalInfoController != null) fAdditionalInfoController.handleTableSelectionChanged(); }
ICompletionProposal p= getSelectedProposal(); if (p instanceof ICompletionProposalExtension) { ICompletionProposalExtension t= (ICompletionProposalExtension) p;
ICompletionProposal p= getSelectedProposal(); if (p instanceof ICompletionProposalExtension) { ICompletionProposalExtension t= (ICompletionProposalExtension) p;
if (Helper2.okToUse(fProposalTable)) { ICompletionProposal oldProposal= getSelectedProposal(); if (oldProposal instanceof ICompletionProposalExtension2) ((ICompletionProposalExtension2) oldProposal).unselected(fViewer);
if (Helper2.okToUse(fProposalTable)) { ICompletionProposal oldProposal= getSelectedProposal(); if (oldProposal instanceof ICompletionProposalExtension2) ((ICompletionProposalExtension2) oldProposal).unselected(fViewer);