org.eclipse.jface.text.contentassist.ICompletionProposalExtension3 Java Examples
The following examples show how to use
org.eclipse.jface.text.contentassist.ICompletionProposalExtension3.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AdditionalInfoController.java From APICloud-Studio with GNU General Public License v3.0 | 6 votes |
protected void computeInformation() { if (fProposal instanceof ICompletionProposalExtension3) { setCustomInformationControlCreator(((ICompletionProposalExtension3) fProposal) .getInformationControlCreator()); } else { setCustomInformationControlCreator(null); } // compute subject area Point size = fProposalTable.getShell().getSize(); // set information & subject area setInformation(fInformation, new Rectangle(0, 0, size.x, size.y)); }
Example #2
Source File: CompletionProposalPopup.java From APICloud-Studio with GNU General Public License v3.0 | 6 votes |
/** * Extracts the replacement string from an <code>ICompletionProposal</code>. If <code>proposal</code> is a * <code>ICompletionProposalExtension3</code>, its <code>getCompletionText</code> method is called, otherwise, the * display string is used. * * @param proposal * the proposal to extract the text from * @return the proposals completion text * @since 3.1 */ private CharSequence getPrefixCompletion(ICompletionProposal proposal) { CharSequence insertion = null; if (proposal instanceof ICompletionProposalExtension3) { insertion = ((ICompletionProposalExtension3) proposal).getPrefixCompletionText( fContentAssistSubjectControlAdapter.getDocument(), fFilterOffset); } if (insertion == null) { insertion = proposal.getDisplayString(); } return insertion; }
Example #3
Source File: JsniCompletionProposal.java From gwt-eclipse-plugin with Eclipse Public License 1.0 | 4 votes |
public IInformationControlCreator getInformationControlCreator() { return ((ICompletionProposalExtension3) jdtProposal).getInformationControlCreator(); }
Example #4
Source File: CompletionProposalPopup.java From APICloud-Studio with GNU General Public License v3.0 | 3 votes |
/** * Extracts the completion offset of an <code>ICompletionProposal</code>. If <code>proposal</code> is a * <code>ICompletionProposalExtension3</code>, its <code>getCompletionOffset</code> method is called, otherwise, the * invocation offset of this popup is shown. * * @param proposal * the proposal to extract the offset from * @return the proposals completion offset, or <code>fInvocationOffset</code> * @since 3.1 */ private int getPrefixCompletionOffset(ICompletionProposal proposal) { if (proposal instanceof ICompletionProposalExtension3) { return ((ICompletionProposalExtension3) proposal).getPrefixCompletionStart( fContentAssistSubjectControlAdapter.getDocument(), fFilterOffset); } return fInvocationOffset; }