congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
CompletionProposal.setCompletion
Code IndexAdd Tabnine to your IDE (free)

How to use
setCompletion
method
in
org.eclipse.jdt.core.CompletionProposal

Best Java code snippets using org.eclipse.jdt.core.CompletionProposal.setCompletion (Showing top 16 results out of 315)

origin: eclipse/eclipse.jdt.ls

proposal.setReplaceRange(offset, offset + prefix.length());
proposal.setSignature(signature.toCharArray());
proposal.setCompletion(getterName.toCharArray());
proposal.setDeclarationSignature(curr.getTypeSignature().toCharArray());
result.add(proposal);
  proposal.setSignature(signature.toCharArray());
  proposal.setParameterNames(new char[][] { curr.getElementName().toCharArray() });
  proposal.setCompletion(getterName.toCharArray());
  proposal.setDeclarationSignature(curr.getTypeSignature().toCharArray());
  result.add(proposal);
origin: org.eclipse/org.eclipse.jdt.ui

private IJavaCompletionProposal createTypeProposal(int relevance, String fullyQualifiedType, JavaContentAssistInvocationContext context) throws JavaModelException {
  IType type= context.getCompilationUnit().getJavaProject().findType(fullyQualifiedType);
  if (type == null)
    return null;
  
  CompletionProposal proposal= CompletionProposal.create(CompletionProposal.TYPE_REF, context.getInvocationOffset());
  proposal.setCompletion(fullyQualifiedType.toCharArray());
  proposal.setDeclarationSignature(type.getPackageFragment().getElementName().toCharArray());
  proposal.setFlags(type.getFlags());
  proposal.setRelevance(relevance);
  proposal.setReplaceRange(context.getInvocationOffset(), context.getInvocationOffset());
  proposal.setSignature(Signature.createTypeSignature(fullyQualifiedType, true).toCharArray());
  if (shouldProposeGenerics(context.getProject()))
    return new LazyGenericTypeProposal(proposal, context);
  else
    return new LazyJavaTypeCompletionProposal(proposal, context);
}

origin: org.eclipse.jdt/org.eclipse.jdt.ui

private IJavaCompletionProposal createTypeProposal(int relevance, String fullyQualifiedType, JavaContentAssistInvocationContext context) throws JavaModelException {
  IType type= context.getCompilationUnit().getJavaProject().findType(fullyQualifiedType);
  if (type == null)
    return null;
  CompletionProposal proposal= CompletionProposal.create(CompletionProposal.TYPE_REF, context.getInvocationOffset());
  proposal.setCompletion(fullyQualifiedType.toCharArray());
  proposal.setDeclarationSignature(type.getPackageFragment().getElementName().toCharArray());
  proposal.setFlags(type.getFlags());
  proposal.setRelevance(relevance);
  proposal.setReplaceRange(context.getInvocationOffset(), context.getInvocationOffset());
  proposal.setSignature(Signature.createTypeSignature(fullyQualifiedType, true).toCharArray());
  if (shouldProposeGenerics(context.getProject()))
    return new LazyGenericTypeProposal(proposal, context);
  else
    return new LazyJavaTypeCompletionProposal(proposal, context);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

private IJavaCompletionProposal createTypeProposal(int relevance, String fullyQualifiedType, JavaContentAssistInvocationContext context) throws JavaModelException {
  IType type= context.getCompilationUnit().getJavaProject().findType(fullyQualifiedType);
  if (type == null)
    return null;
  CompletionProposal proposal= CompletionProposal.create(CompletionProposal.TYPE_REF, context.getInvocationOffset());
  proposal.setCompletion(fullyQualifiedType.toCharArray());
  proposal.setDeclarationSignature(type.getPackageFragment().getElementName().toCharArray());
  proposal.setFlags(type.getFlags());
  proposal.setRelevance(relevance);
  proposal.setReplaceRange(context.getInvocationOffset(), context.getInvocationOffset());
  proposal.setSignature(Signature.createTypeSignature(fullyQualifiedType, true).toCharArray());
  if (shouldProposeGenerics(context.getProject()))
    return new LazyGenericTypeProposal(proposal, context);
  else
    return new LazyJavaTypeCompletionProposal(proposal, context);
}
origin: org.eclipse.tycho/org.eclipse.jdt.core

proposal.setSignature(getSignature(method.returnType));
proposal.setName(method.selector);
proposal.setCompletion(method.selector);
proposal.setFlags(method.modifiers);
proposal.setReplaceRange(this.startPosition - this.offset, this.endPosition - this.offset);
origin: org.eclipse.jdt/org.eclipse.jdt.core

proposal.setSignature(getSignature(method.returnType));
proposal.setName(method.selector);
proposal.setCompletion(method.selector);
proposal.setFlags(method.modifiers);
proposal.setReplaceRange(this.startPosition - this.offset, this.endPosition - this.offset);
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

proposal.setSignature(getSignature(method.returnType));
proposal.setName(method.selector);
proposal.setCompletion(method.selector);
proposal.setFlags(method.modifiers);
proposal.setReplaceRange(this.startPosition - this.offset, this.endPosition - this.offset);
origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

proposal.setSignature(getSignature(method.returnType));
proposal.setName(method.selector);
proposal.setCompletion(method.selector);
proposal.setFlags(method.modifiers);
proposal.setReplaceRange(this.startPosition - this.offset, this.endPosition - this.offset);
origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

proposal.setSignature(getSignature(method.returnType));
proposal.setName(method.selector);
proposal.setCompletion(method.selector);
proposal.setFlags(method.modifiers);
proposal.setReplaceRange(this.startPosition - this.offset, this.endPosition - this.offset);
origin: trylimits/Eclipse-Postfix-Code-Completion

proposal.setSignature(getSignature(method.returnType));
proposal.setName(method.selector);
proposal.setCompletion(method.selector);
proposal.setFlags(method.modifiers);
proposal.setReplaceRange(this.startPosition - this.offset, this.endPosition - this.offset);
origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

CompletionProposal proposal = createProposal(CompletionProposal.KEYWORD, this.actualCompletionPosition);
proposal.setName(Keywords.INTERFACE);
proposal.setCompletion(Keywords.INTERFACE);
proposal.setReplaceRange(this.startPosition - this.offset, this.endPosition - this.offset);
proposal.setTokenRange(this.tokenStart - this.offset, this.tokenEnd - this.offset);
origin: org.eclipse.jdt/org.eclipse.jdt.core

CompletionProposal proposal = createProposal(CompletionProposal.KEYWORD, this.actualCompletionPosition);
proposal.setName(Keywords.INTERFACE);
proposal.setCompletion(Keywords.INTERFACE);
proposal.setReplaceRange(this.startPosition - this.offset, this.endPosition - this.offset);
proposal.setTokenRange(this.tokenStart - this.offset, this.tokenEnd - this.offset);
origin: org.eclipse.tycho/org.eclipse.jdt.core

CompletionProposal proposal = createProposal(CompletionProposal.KEYWORD, this.actualCompletionPosition);
proposal.setName(Keywords.INTERFACE);
proposal.setCompletion(Keywords.INTERFACE);
proposal.setReplaceRange(this.startPosition - this.offset, this.endPosition - this.offset);
proposal.setTokenRange(this.tokenStart - this.offset, this.tokenEnd - this.offset);
origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

CompletionProposal proposal = createProposal(CompletionProposal.KEYWORD, this.actualCompletionPosition);
proposal.setName(Keywords.INTERFACE);
proposal.setCompletion(Keywords.INTERFACE);
proposal.setReplaceRange(this.startPosition - this.offset, this.endPosition - this.offset);
proposal.setTokenRange(this.tokenStart - this.offset, this.tokenEnd - this.offset);
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

CompletionProposal proposal = createProposal(CompletionProposal.KEYWORD, this.actualCompletionPosition);
proposal.setName(Keywords.INTERFACE);
proposal.setCompletion(Keywords.INTERFACE);
proposal.setReplaceRange(this.startPosition - this.offset, this.endPosition - this.offset);
proposal.setTokenRange(this.tokenStart - this.offset, this.tokenEnd - this.offset);
origin: trylimits/Eclipse-Postfix-Code-Completion

CompletionProposal proposal = createProposal(CompletionProposal.KEYWORD, this.actualCompletionPosition);
proposal.setName(Keywords.INTERFACE);
proposal.setCompletion(Keywords.INTERFACE);
proposal.setReplaceRange(this.startPosition - this.offset, this.endPosition - this.offset);
proposal.setTokenRange(this.tokenStart - this.offset, this.tokenEnd - this.offset);
org.eclipse.jdt.coreCompletionProposalsetCompletion

Javadoc

Sets the proposed sequence of characters to insert into the source file buffer, replacing the characters at the specified source range. The string can be arbitrary; for example, it might include not only the name of a method but a set of parentheses.

If not set, defaults to an empty character array.

The completion engine creates instances of this class and sets its properties; this method is not intended to be used by other clients.

Popular methods of CompletionProposal

  • getKind
    Returns the kind of completion being proposed. The set of different kinds of completion proposals is
  • getName
    Returns the simple name of the method, field, member, or variable relevant in the context, ornull if
  • getSignature
    Returns the signature of the method or type relevant in the context, or null if none. This field is
  • findParameterNames
    Finds the method parameter names. This information is relevant to method reference (and method decla
  • getCompletion
    Returns the proposed sequence of characters to insert into the source file buffer, replacing the cha
  • getDeclarationSignature
    Returns the type signature or package name of the relevant declaration in the context, or null if no
  • getReplaceStart
    Returns the character index of the start of the subrange in the source file buffer to be replaced by
  • create
    Creates a basic completion proposal. All instance field have plausible default values unless otherwi
  • getDeclarationKey
    Returns the key of the relevant declaration in the context, or null if none. This field is availabl
  • getRelevance
    Returns the relative relevance rating of this proposal.
  • getReplaceEnd
    Returns the character index of the end of the subrange in the source file buffer to be replaced by t
  • getCompletionLocation
    Returns the character index in the source file buffer where source completion was requested (theoffs
  • getReplaceEnd,
  • getCompletionLocation,
  • getFlags,
  • getRequiredProposals,
  • setDeclarationSignature,
  • setRelevance,
  • setReplaceRange,
  • setSignature,
  • setFlags

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (ScheduledExecutorService)
  • compareTo (BigDecimal)
  • setRequestProperty (URLConnection)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now