public void run() { proposal.apply(sourceViewer.getDocument()); }
public void apply(IModificationContext context) throws Exception { proposal.apply(context.getXtextDocument()); }
protected ContentAssistProcessorTestBuilder applyProposal(ICompletionProposal proposal, IXtextDocument document) throws Exception { proposal.apply(document); return reset().append(document.get()); }
oldProposal.apply( document );
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 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 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); } }
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()); }
protected ContentAssistProcessorTestBuilder applyProposal(ICompletionProposal proposal) throws Exception { final XtextResource xtextResource = loadHelper.getResourceFor(new StringInputStream(Strings.emptyIfNull(model))); IXtextDocument document = getDocument(xtextResource, model); proposal.apply(document); ContentAssistProcessorTestBuilder reset = reset(); return reset.append(document.get()); }
e.apply(document, (char) 0, offset); } else { p.apply(document);
e.apply(document, (char) 0, offset); } else { p.apply(document);
e.apply(document, (char) 0, offset); } else { p.apply(document);
e.apply(document, trigger, offset); } else { p.apply(document);
e.apply(document, trigger, offset); } else { p.apply(document);
e.apply(document, trigger, offset); } else { p.apply(document);
e.apply(document, trigger, offset); } else { p.apply(document);