private void invokeProposal(ICompletionProposal proposal, int offset) { if (proposal instanceof ICompletionProposalExtension2) { ITextViewer viewer= fEditor.getViewer(); if (viewer != null) { ((ICompletionProposalExtension2) proposal).apply(viewer, (char) 0, 0, offset); return; } } else if (proposal instanceof ICompletionProposalExtension) { IDocument document= getDocument(); if (document != null) { ((ICompletionProposalExtension) proposal).apply(document, (char) 0, offset); return; } } IDocument document= getDocument(); if (document != null) { proposal.apply(document); } }
private boolean validateProposal(IDocument document, ICompletionProposal p, int offset, DocumentEvent event) { // detect selected if (p instanceof ICompletionProposalExtension2) { ICompletionProposalExtension2 e= (ICompletionProposalExtension2) p; if (e.validate(document, offset, event)) return true; } else if (p instanceof ICompletionProposalExtension) { ICompletionProposalExtension e= (ICompletionProposalExtension) p; if (e.isValidFor(document, offset)) return true; } return false; }
} else if (p instanceof ICompletionProposalExtension) { ICompletionProposalExtension e= (ICompletionProposalExtension) p; e.apply(document, trigger, offset); } else { p.apply(document); if (p instanceof ICompletionProposalExtension) { ICompletionProposalExtension e= (ICompletionProposalExtension) p; position= e.getContextInformationPosition(); } else { if (selection == null)
if (p instanceof ICompletionProposalExtension) { ICompletionProposalExtension t= (ICompletionProposalExtension) p; char[] triggers= t.getTriggerCharacters(); if (contains(triggers, key)) { e.doit= false;
} else if (p instanceof ICompletionProposalExtension) { ICompletionProposalExtension e= (ICompletionProposalExtension) p; e.apply(document, trigger, offset); } else { p.apply(document); if (p instanceof ICompletionProposalExtension) { ICompletionProposalExtension e= (ICompletionProposalExtension) p; position= e.getContextInformationPosition(); } else { if (selection == null)
if (p instanceof ICompletionProposalExtension) { ICompletionProposalExtension t= (ICompletionProposalExtension) p; char[] triggers= t.getTriggerCharacters(); if (contains(triggers, key)) { e.doit= false;
private void invokeProposal(ICompletionProposal proposal, int offset) { if (proposal instanceof ICompletionProposalExtension2) { ITextViewer viewer= fEditor.getViewer(); if (viewer != null) { ((ICompletionProposalExtension2) proposal).apply(viewer, (char) 0, 0, offset); return; } } else if (proposal instanceof ICompletionProposalExtension) { IDocument document= getDocument(); if (document != null) { ((ICompletionProposalExtension) proposal).apply(document, (char) 0, offset); return; } } IDocument document= getDocument(); if (document != null) { proposal.apply(document); } }
} else if (p instanceof ICompletionProposalExtension) { ICompletionProposalExtension e= (ICompletionProposalExtension) p; e.apply(document, trigger, offset); } else { p.apply(document); if (p instanceof ICompletionProposalExtension) { ICompletionProposalExtension e= (ICompletionProposalExtension) p; contextInformationOffset= e.getContextInformationPosition(); } else { if (selection == null)
private boolean validateProposal(IDocument document, ICompletionProposal p, int offset, DocumentEvent event) { // detect selected if (p instanceof ICompletionProposalExtension2) { ICompletionProposalExtension2 e= (ICompletionProposalExtension2) p; if (e.validate(document, offset, event)) return true; } else if (p instanceof ICompletionProposalExtension) { ICompletionProposalExtension e= (ICompletionProposalExtension) p; if (e.isValidFor(document, offset)) return true; } return false; }
if (p instanceof ICompletionProposalExtension) { ICompletionProposalExtension t= (ICompletionProposalExtension) p; char[] triggers= t.getTriggerCharacters(); if (contains(triggers, key)) { hide();
private void invokeProposal(ICompletionProposal proposal, int offset) { if (proposal instanceof ICompletionProposalExtension2) { ITextViewer viewer= fEditor.getViewer(); if (viewer != null) { ((ICompletionProposalExtension2) proposal).apply(viewer, (char) 0, 0, offset); return; } } else if (proposal instanceof ICompletionProposalExtension) { IDocument document= getDocument(); if (document != null) { ((ICompletionProposalExtension) proposal).apply(document, (char) 0, offset); return; } } IDocument document= getDocument(); if (document != null) { proposal.apply(document); } }
} else if (p instanceof ICompletionProposalExtension) { ICompletionProposalExtension e= (ICompletionProposalExtension) p; e.apply(document, trigger, offset); } else { p.apply(document); if (p instanceof ICompletionProposalExtension) { ICompletionProposalExtension e= (ICompletionProposalExtension) p; contextInformationOffset= e.getContextInformationPosition(); } else { if (selection == null)
if (p.isValidFor(document, offset)) filtered.add(p);
if (p instanceof ICompletionProposalExtension) { ICompletionProposalExtension t= (ICompletionProposalExtension) p; char[] triggers= t.getTriggerCharacters(); if (contains(triggers, key)) { hide();
protected ContentAssistProcessorTestBuilder appendAndApplyProposal(ICompletionProposal proposal, ISourceViewer sourceViewer, String model, int position) throws Exception { IDocument document = sourceViewer.getDocument(); int offset = position; if (model != null) { document.set(getModel() + model); offset += model.length(); } if (proposal instanceof ICompletionProposalExtension2) { ICompletionProposalExtension2 proposalExtension2 = (ICompletionProposalExtension2) proposal; proposalExtension2.apply(sourceViewer, (char) 0, SWT.NONE, offset); } else if (proposal instanceof ICompletionProposalExtension) { ICompletionProposalExtension proposalExtension = (ICompletionProposalExtension) proposal; proposalExtension.apply(document, (char) 0, offset); } else { proposal.apply(document); } return reset().append(document.get()); }
if (p.isValidFor(document, offset)) filtered.add(p);
} else if (p instanceof ICompletionProposalExtension) { ICompletionProposalExtension e= (ICompletionProposalExtension) p; e.apply(document, (char) 0, offset); } else { p.apply(document);
if (p.isValidFor(document, offset)) filtered.add(p); } catch (RuntimeException e) {
} else if (p instanceof ICompletionProposalExtension) { ICompletionProposalExtension e= (ICompletionProposalExtension) p; e.apply(document, (char) 0, offset); } else { p.apply(document);
if (p.isValidFor(document, offset)) filtered.add(proposal); } catch (RuntimeException e) {