Index: codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java =================================================================== RCS file: /home/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java,v retrieving revision 1.245 diff -u -r1.245 CompletionEngine.java --- codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 2 Jun 2005 17:21:25 -0000 1.245 +++ codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 8 Jun 2005 10:14:17 -0000 @@ -1894,6 +1894,7 @@ //proposal.setPackageName(null); //proposal.setTypeName(null); proposal.setName(name); + proposal.setIsContructor(true); proposal.setCompletion(completion); proposal.setFlags(constructor.modifiers); proposal.setReplaceRange(this.startPosition - this.offset, this.endPosition - this.offset); @@ -2001,6 +2002,7 @@ //proposal.setPackageName(null); //proposal.setTypeName(null); proposal.setName(currentType.sourceName()); + proposal.setIsContructor(true); proposal.setCompletion(completion); proposal.setFlags(constructor.modifiers); proposal.setReplaceRange(this.endPosition - this.offset, this.endPosition - this.offset); Index: codeassist/org/eclipse/jdt/internal/codeassist/InternalCompletionProposal.java =================================================================== RCS file: /home/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/InternalCompletionProposal.java,v retrieving revision 1.4 diff -u -r1.4 InternalCompletionProposal.java --- codeassist/org/eclipse/jdt/internal/codeassist/InternalCompletionProposal.java 22 Mar 2005 16:16:21 -0000 1.4 +++ codeassist/org/eclipse/jdt/internal/codeassist/InternalCompletionProposal.java 8 Jun 2005 10:14:17 -0000 @@ -48,6 +48,8 @@ protected int accessibility = IAccessRule.K_ACCESSIBLE; + protected boolean isConstructor = false; + protected char[][] findMethodParameterNames(char[] signatureType, char[] selector, char[][] paramTypeNames){ if(signatureType == null) return null; @@ -253,4 +255,8 @@ protected void setAccessibility(int kind) { this.accessibility = kind; } + + protected void setIsContructor(boolean isConstructor) { + this.isConstructor = isConstructor; + } } Index: model/org/eclipse/jdt/core/CompletionProposal.java =================================================================== RCS file: /home/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/core/CompletionProposal.java,v retrieving revision 1.24 diff -u -r1.24 CompletionProposal.java --- model/org/eclipse/jdt/core/CompletionProposal.java 26 Mar 2005 23:39:49 -0000 1.24 +++ model/org/eclipse/jdt/core/CompletionProposal.java 8 Jun 2005 10:14:19 -0000 @@ -928,8 +928,10 @@ *
  • KEYWORD - the keyword
  • *
  • LABEL_REF - the name of the label
  • *
  • LOCAL_VARIABLE_REF - the name of the local variable
  • - *
  • METHOD_REF - the name of the method
  • - *
  • METHOD_DECLARATION - the name of the method
  • + *
  • METHOD_REF - the name of the method. + * If the method is a constructor then the type's simple name is returned.
  • + *
  • METHOD_DECLARATION - the name of the method. + * If the method is a constructor then the type's simple name is returned.
  • *
  • VARIABLE_DECLARATION - the name of the variable
  • *
  • POTENTIAL_METHOD_DECLARATION - the name of the method
  • * @@ -1438,4 +1440,26 @@ public int getAccessibility() { return this.accessibility; } + + /** + * Returns whether this proposal is a constructor. + *

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

    + * For kinds of completion proposals, this method returns + * false. + *

    + * + * @return return true if the proposal is a constructor. + * @since 3.1 + */ + public boolean isConstructor() { + return this.isConstructor; + } }