Tabnine Logo
CompletionProposal.canUseDiamond
Code IndexAdd Tabnine to your IDE (free)

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

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

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

@Override
protected LazyJavaCompletionProposal createRequiredTypeCompletionProposal(CompletionProposal completionProposal, JavaContentAssistInvocationContext invocationContext) {
  LazyJavaCompletionProposal requiredProposal= super.createRequiredTypeCompletionProposal(completionProposal, invocationContext);
  if (fProposal.getKind() == CompletionProposal.CONSTRUCTOR_INVOCATION && requiredProposal instanceof LazyGenericTypeProposal)
    ((LazyGenericTypeProposal) requiredProposal).canUseDiamond(fProposal.canUseDiamond(fInvocationContext.getCoreContext()));
  return requiredProposal;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

@Override
protected LazyJavaCompletionProposal createRequiredTypeCompletionProposal(CompletionProposal completionProposal, JavaContentAssistInvocationContext invocationContext) {
  LazyJavaCompletionProposal requiredProposal= super.createRequiredTypeCompletionProposal(completionProposal, invocationContext);
  if (fProposal.getKind() == CompletionProposal.CONSTRUCTOR_INVOCATION && requiredProposal instanceof LazyGenericTypeProposal)
    ((LazyGenericTypeProposal) requiredProposal).canUseDiamond(fProposal.canUseDiamond(fInvocationContext.getCoreContext()));
  return requiredProposal;
}
origin: eclipse/eclipse.jdt.ls

  break;
case CompletionProposal.TYPE_REF:
  org.eclipse.lsp4j.TextEdit edit = toRequiredTypeEdit(requiredProposal, trigger, proposal.canUseDiamond(context));
    if (proposal.getKind() == CompletionProposal.CONSTRUCTOR_INVOCATION || proposal.getKind() == CompletionProposal.ANONYMOUS_CLASS_CONSTRUCTOR_INVOCATION
        || proposal.getKind() == CompletionProposal.ANONYMOUS_CLASS_DECLARATION) {
org.eclipse.jdt.coreCompletionProposalcanUseDiamond

Javadoc

Returns whether it is safe to use the '<>' (diamond) operator in place of explicitly specifying type arguments for this proposal.

This is only relevant for source level 1.7 or greater.

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,
  • setCompletion,
  • setDeclarationSignature,
  • setRelevance,
  • setReplaceRange,
  • setSignature,
  • setFlags

Popular in Java

  • Making http requests using okhttp
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • startActivity (Activity)
  • setContentView (Activity)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Menu (java.awt)
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • JComboBox (javax.swing)
  • Top plugins for WebStorm
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