Codota Logo
TextInvocationContext.<init>
Code IndexAdd Codota to your IDE (free)

How to use
org.eclipse.jface.text.source.TextInvocationContext
constructor

Best Java code snippets using org.eclipse.jface.text.source.TextInvocationContext.<init> (Showing top 13 results out of 315)

  • Common ways to obtain TextInvocationContext
private void myMethod () {
TextInvocationContext t =
  • Codota IconISourceViewer sourceViewer;new TextInvocationContext(sourceViewer, offset, length)
  • Smart code suggestions by Codota
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

@Override
public IQuickAssistInvocationContext getQuickAssistInvocationContext() {
  Point selection= getSelectedRange();
  return new TextInvocationContext(this, selection.x, selection.y);
}
origin: org.eclipse.platform/org.eclipse.jface.text

@Override
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
  // panic code - should not happen
  if (!(viewer instanceof ISourceViewer))
    return null;
  return fQuickAssistProcessor.computeQuickAssistProposals(new TextInvocationContext((ISourceViewer)viewer, offset, -1));
}
origin: org.eclipse.platform/org.eclipse.jface.text

@Override
public IQuickAssistInvocationContext getQuickAssistInvocationContext() {
  Point selection= getSelectedRange();
  return new TextInvocationContext(this, selection.x, selection.y);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

@Override
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
  // panic code - should not happen
  if (!(viewer instanceof ISourceViewer))
    return null;
  return fQuickAssistProcessor.computeQuickAssistProposals(new TextInvocationContext((ISourceViewer)viewer, offset, -1));
}
origin: org.eclipse/org.eclipse.ui.workbench.texteditor

public ICompletionProposal[] computeQuickAssistProposals(IQuickAssistInvocationContext quickAssistContext) {
  ISourceViewer viewer= quickAssistContext.getSourceViewer();
  int documentOffset= quickAssistContext.getOffset();
  int length= viewer != null ? viewer.getSelectedRange().y : 0;
  TextInvocationContext context= new TextInvocationContext(viewer, documentOffset, length);
  IAnnotationModel model= viewer.getAnnotationModel();
  if (model == null)
    return fgNoSuggestionsProposal;
  List proposals= computeProposals(context, model);
  if (proposals.isEmpty())
    return fgNoSuggestionsProposal;
  return (ICompletionProposal[]) proposals.toArray(new ICompletionProposal[proposals.size()]);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.workbench.texteditor

@Override
public ICompletionProposal[] computeQuickAssistProposals(IQuickAssistInvocationContext quickAssistContext) {
  ISourceViewer viewer= quickAssistContext.getSourceViewer();
  int documentOffset= quickAssistContext.getOffset();
  int length= viewer != null ? viewer.getSelectedRange().y : -1;
  TextInvocationContext context= new TextInvocationContext(viewer, documentOffset, length);
  IAnnotationModel model= viewer.getAnnotationModel();
  if (model == null)
    return fgNoSuggestionsProposal;
  List<ICompletionProposal> proposals= computeProposals(context, model);
  if (proposals.isEmpty())
    return fgNoSuggestionsProposal;
  return proposals.toArray(new ICompletionProposal[proposals.size()]);
}
origin: org.eclipse.platform/org.eclipse.ui.workbench.texteditor

@Override
public ICompletionProposal[] computeQuickAssistProposals(IQuickAssistInvocationContext quickAssistContext) {
  ISourceViewer viewer= quickAssistContext.getSourceViewer();
  int documentOffset= quickAssistContext.getOffset();
  int length= viewer != null ? viewer.getSelectedRange().y : -1;
  TextInvocationContext context= new TextInvocationContext(viewer, documentOffset, length);
  IAnnotationModel model= viewer.getAnnotationModel();
  if (model == null)
    return fgNoSuggestionsProposal;
  List<ICompletionProposal> proposals= computeProposals(context, model);
  if (proposals.isEmpty())
    return fgNoSuggestionsProposal;
  return proposals.toArray(new ICompletionProposal[proposals.size()]);
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

TextInvocationContext context= new TextInvocationContext(viewer, quickAssistContext.getOffset(), length);
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

TextInvocationContext context= new TextInvocationContext(viewer, quickAssistContext.getOffset(), length);
origin: org.eclipse.jdt/org.eclipse.jdt.ui

if (invocationContext instanceof IQuickAssistInvocationContext)
  sourceViewer= ((IQuickAssistInvocationContext)invocationContext).getSourceViewer();
IQuickAssistInvocationContext context= new TextInvocationContext(sourceViewer, location.getOffset(), location.getLength());
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

if (invocationContext instanceof IQuickAssistInvocationContext)
  sourceViewer= ((IQuickAssistInvocationContext)invocationContext).getSourceViewer();
IQuickAssistInvocationContext context= new TextInvocationContext(sourceViewer, location.getOffset(), location.getLength());
origin: org.eclipse.jdt/org.eclipse.jdt.ui

  context= new TextInvocationContext(null, getOffset(), getLength());
else
  context= new TextInvocationContext(context.getSourceViewer(), getOffset(), getLength());
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

  context= new TextInvocationContext(null, getOffset(), getLength());
else
  context= new TextInvocationContext(context.getSourceViewer(), getOffset(), getLength());
org.eclipse.jface.text.sourceTextInvocationContext<init>

Popular methods of TextInvocationContext

    Popular in Java

    • Reading from database using SQL prepared statement
    • setRequestProperty (URLConnection)
    • getResourceAsStream (ClassLoader)
      Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
    • getContentResolver (Context)
    • URLEncoder (java.net)
      This class is used to encode a string using the format required by application/x-www-form-urlencoded
    • DataSource (javax.sql)
      A factory for connections to the physical data source that this DataSource object represents. An alt
    • JTextField (javax.swing)
    • Response (javax.ws.rs.core)
      Defines the contract between a returned instance and the runtime when an application needs to provid
    • Loader (org.hibernate.loader)
      Abstract superclass of object loading (and querying) strategies. This class implements useful common
    • Table (org.hibernate.mapping)
      A relational table
    Codota Logo
    • Products

      Search for Java codeSearch for JavaScript codeEnterprise
    • IDE Plugins

      IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Codota for your IDE now