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

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

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

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

/**
 * Returns whether we automatically complete the method with a semicolon.
 * 
 * @return <code>true</code> if the return type of the method is void, <code>false</code>
 *         otherwise
 * @since 3.9
 */
protected final boolean canAutomaticallyAppendSemicolon() {
  return !fProposal.isConstructor() && CharOperation.equals(new char[] { Signature.C_VOID }, Signature.getReturnType(fProposal.getSignature()));
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

/**
 * Returns whether we automatically complete the method with a semicolon.
 * 
 * @return <code>true</code> if the return type of the method is void, <code>false</code>
 *         otherwise
 * @since 3.9
 */
protected final boolean canAutomaticallyAppendSemicolon() {
  return !fProposal.isConstructor() && CharOperation.equals(new char[] { Signature.C_VOID }, Signature.getReturnType(fProposal.getSignature()));
}
origin: eclipse/eclipse.jdt.ls

private final boolean canAutomaticallyAppendSemicolon(CompletionProposal proposal) {
  return !proposal.isConstructor() && CharOperation.equals(new char[] { Signature.C_VOID }, Signature.getReturnType(proposal.getSignature()));
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

@Override
public void apply(IDocument document, char trigger, int offset) {
  if (trigger == ' ' || trigger == '(')
    trigger= '\0';
  super.apply(document, trigger, offset);
  if (needsLinkedMode()) {
    setUpLinkedMode(document, ')');
  } else if (!fProposal.isConstructor() && getReplacementString().endsWith(";")) { //$NON-NLS-1$
    setUpLinkedMode(document, ';');
  }
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

@Override
public void apply(IDocument document, char trigger, int offset) {
  if (trigger == ' ' || trigger == '(')
    trigger= '\0';
  super.apply(document, trigger, offset);
  if (needsLinkedMode()) {
    setUpLinkedMode(document, ')');
  } else if (!fProposal.isConstructor() && getReplacementString().endsWith(";")) { //$NON-NLS-1$
    setUpLinkedMode(document, ';');
  }
}
origin: eclipse/eclipse.jdt.ls

if (!proposal.isConstructor()) {
origin: org.eclipse/org.eclipse.jdt.ui

if (!methodProposal.isConstructor()) {
origin: org.eclipse.jdt/org.eclipse.jdt.ui

/**
 * Resolves the member described by the receiver and returns it if found.
 * Returns <code>null</code> if no corresponding member can be found.
 *
 * @return the resolved member or <code>null</code> if none is found
 * @throws JavaModelException if accessing the java model fails
 */
@Override
protected IMember resolveMember() throws JavaModelException {
  char[] declarationSignature= fProposal.getDeclarationSignature();
  String typeName= SignatureUtil.stripSignatureToFQN(String.valueOf(declarationSignature));
  IType type= fJavaProject.findType(typeName);
  if (type != null) {
    String name= String.valueOf(fProposal.getName());
    String[] parameters= Signature.getParameterTypes(String.valueOf(SignatureUtil.fix83600(fProposal.getSignature())));
    for (int i= 0; i < parameters.length; i++) {
      parameters[i]= SignatureUtil.getLowerBound(parameters[i]);
    }
    boolean isConstructor= fProposal.isConstructor();
    return findMethod(name, parameters, isConstructor, type);
  }
  return null;
}
origin: org.eclipse/org.eclipse.jdt.ui

/**
 * Resolves the member described by the receiver and returns it if found.
 * Returns <code>null</code> if no corresponding member can be found.
 *
 * @return the resolved member or <code>null</code> if none is found
 * @throws JavaModelException if accessing the java model fails
 */
protected IMember resolveMember() throws JavaModelException {
  char[] declarationSignature= fProposal.getDeclarationSignature();
  String typeName= SignatureUtil.stripSignatureToFQN(String.valueOf(declarationSignature));
  IType type= fJavaProject.findType(typeName);
  if (type != null) {
    String name= String.valueOf(fProposal.getName());
    String[] parameters= Signature.getParameterTypes(String.valueOf(SignatureUtil.fix83600(fProposal.getSignature())));
    for (int i= 0; i < parameters.length; i++) {
      parameters[i]= SignatureUtil.getLowerBound(parameters[i]);
    }
    boolean isConstructor= fProposal.isConstructor();
    return findMethod(name, parameters, isConstructor, type);
  }
  return null;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

/**
 * Resolves the member described by the receiver and returns it if found.
 * Returns <code>null</code> if no corresponding member can be found.
 *
 * @return the resolved member or <code>null</code> if none is found
 * @throws JavaModelException if accessing the java model fails
 */
@Override
protected IMember resolveMember() throws JavaModelException {
  char[] declarationSignature= fProposal.getDeclarationSignature();
  String typeName= SignatureUtil.stripSignatureToFQN(String.valueOf(declarationSignature));
  IType type= fJavaProject.findType(typeName);
  if (type != null) {
    String name= String.valueOf(fProposal.getName());
    String[] parameters= Signature.getParameterTypes(String.valueOf(SignatureUtil.fix83600(fProposal.getSignature())));
    for (int i= 0; i < parameters.length; i++) {
      parameters[i]= SignatureUtil.getLowerBound(parameters[i]);
    }
    boolean isConstructor= fProposal.isConstructor();
    return findMethod(name, parameters, isConstructor, type);
  }
  return null;
}
origin: eclipse/eclipse.jdt.ls

IMethod method = JavaModelUtil.findMethod(String.valueOf(proposal.getName()), parameters, proposal.isConstructor(), type);
origin: org.eclipse.jdt/org.eclipse.jdt.ui

if (!methodProposal.isConstructor()) {
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

if (!methodProposal.isConstructor()) {
org.eclipse.jdt.coreCompletionProposalisConstructor

Javadoc

Returns whether this proposal is a constructor.

This field is available for the following kinds of completion proposals:

  • METHOD_REF - return true if the referenced method is a constructor
  • METHOD_DECLARATION - return true if the declared method is a constructor
For kinds of completion proposals, this method returns false.

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
  • getSharedPreferences (Context)
  • onCreateOptionsMenu (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Path (java.nio.file)
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • JPanel (javax.swing)
  • JTable (javax.swing)
  • Best IntelliJ plugins
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