Lines 930-936
Link Here
|
930 |
// } |
930 |
// } |
931 |
// } |
931 |
// } |
932 |
if (this.assistNodeInJavadoc == 0 && |
932 |
if (this.assistNodeInJavadoc == 0 && |
933 |
this.requestor.isAllowingRequiredProposals(CompletionProposal.TYPE_REF)) { |
933 |
(this.requestor.isAllowingRequiredProposals(CompletionProposal.FIELD_REF, CompletionProposal.TYPE_REF) || |
|
|
934 |
this.requestor.isAllowingRequiredProposals(CompletionProposal.METHOD_REF, CompletionProposal.TYPE_REF))) { |
934 |
if(ref.tokens.length == 1) { |
935 |
if(ref.tokens.length == 1) { |
935 |
findFieldsAndMethodsFromMissingFieldType(ref.tokens[0], scope, ref, insideTypeAnnotation); |
936 |
findFieldsAndMethodsFromMissingFieldType(ref.tokens[0], scope, ref, insideTypeAnnotation); |
936 |
} |
937 |
} |
Lines 941-947
Link Here
|
941 |
if (receiverType != null) { |
942 |
if (receiverType != null) { |
942 |
findFieldsAndMethods(this.completionToken, receiverType.capture(scope, ref.sourceEnd), scope, ref, scope,false,false, null, null, null); |
943 |
findFieldsAndMethods(this.completionToken, receiverType.capture(scope, ref.sourceEnd), scope, ref, scope,false,false, null, null, null); |
943 |
} else if (this.assistNodeInJavadoc == 0 && |
944 |
} else if (this.assistNodeInJavadoc == 0 && |
944 |
this.requestor.isAllowingRequiredProposals(CompletionProposal.TYPE_REF)) { |
945 |
(this.requestor.isAllowingRequiredProposals(CompletionProposal.FIELD_REF, CompletionProposal.TYPE_REF) || |
|
|
946 |
this.requestor.isAllowingRequiredProposals(CompletionProposal.METHOD_REF, CompletionProposal.TYPE_REF))) { |
945 |
boolean proposeField = !this.requestor.isIgnored(CompletionProposal.FIELD_REF); |
947 |
boolean proposeField = !this.requestor.isIgnored(CompletionProposal.FIELD_REF); |
946 |
boolean proposeMethod = !this.requestor.isIgnored(CompletionProposal.METHOD_REF); |
948 |
boolean proposeMethod = !this.requestor.isIgnored(CompletionProposal.METHOD_REF); |
947 |
if (proposeField || proposeMethod) { |
949 |
if (proposeField || proposeMethod) { |
Lines 1107-1113
Link Here
|
1107 |
// } |
1109 |
// } |
1108 |
// } |
1110 |
// } |
1109 |
if (this.assistNodeInJavadoc == 0 && |
1111 |
if (this.assistNodeInJavadoc == 0 && |
1110 |
this.requestor.isAllowingRequiredProposals(CompletionProposal.TYPE_REF)) { |
1112 |
(this.requestor.isAllowingRequiredProposals(CompletionProposal.FIELD_REF, CompletionProposal.TYPE_REF) || |
|
|
1113 |
this.requestor.isAllowingRequiredProposals(CompletionProposal.METHOD_REF, CompletionProposal.TYPE_REF))) { |
1111 |
ProblemMethodBinding problemMethodBinding = (ProblemMethodBinding) qualifiedBinding; |
1114 |
ProblemMethodBinding problemMethodBinding = (ProblemMethodBinding) qualifiedBinding; |
1112 |
findFieldsAndMethodsFromMissingReturnType( |
1115 |
findFieldsAndMethodsFromMissingReturnType( |
1113 |
problemMethodBinding.selector, |
1116 |
problemMethodBinding.selector, |
Lines 2658-2664
Link Here
|
2658 |
|
2661 |
|
2659 |
this.noProposal = false; |
2662 |
this.noProposal = false; |
2660 |
// Standard proposal |
2663 |
// Standard proposal |
2661 |
if (!this.requestor.isIgnored(CompletionProposal.FIELD_REF) && (this.assistNodeInJavadoc & CompletionOnJavadoc.ONLY_INLINE_TAG) == 0) { |
2664 |
if (!this.isIgnored(CompletionProposal.FIELD_REF, missingElements != null) && (this.assistNodeInJavadoc & CompletionOnJavadoc.ONLY_INLINE_TAG) == 0) { |
2662 |
CompletionProposal proposal = this.createProposal(CompletionProposal.FIELD_REF, this.actualCompletionPosition); |
2665 |
CompletionProposal proposal = this.createProposal(CompletionProposal.FIELD_REF, this.actualCompletionPosition); |
2663 |
proposal.setDeclarationSignature(getSignature(field.declaringClass)); |
2666 |
proposal.setDeclarationSignature(getSignature(field.declaringClass)); |
2664 |
proposal.setSignature(getSignature(field.type)); |
2667 |
proposal.setSignature(getSignature(field.type)); |
Lines 2853-2860
Link Here
|
2853 |
if (receiverType.isBaseType()) |
2856 |
if (receiverType.isBaseType()) |
2854 |
return; // nothing else is possible with base types |
2857 |
return; // nothing else is possible with base types |
2855 |
|
2858 |
|
2856 |
boolean proposeField = !this.requestor.isIgnored(CompletionProposal.FIELD_REF); |
2859 |
boolean proposeField = !this.isIgnored(CompletionProposal.FIELD_REF, missingElements != null); |
2857 |
boolean proposeMethod = !this.requestor.isIgnored(CompletionProposal.METHOD_REF); |
2860 |
boolean proposeMethod = !this.isIgnored(CompletionProposal.METHOD_REF, missingElements != null); |
2858 |
|
2861 |
|
2859 |
ObjectVector methodsFound = new ObjectVector(); |
2862 |
ObjectVector methodsFound = new ObjectVector(); |
2860 |
|
2863 |
|
Lines 2871-2877
Link Here
|
2871 |
relevance += computeRelevanceForRestrictions(IAccessRule.K_ACCESSIBLE); // no access restriction for length field |
2874 |
relevance += computeRelevanceForRestrictions(IAccessRule.K_ACCESSIBLE); // no access restriction for length field |
2872 |
|
2875 |
|
2873 |
this.noProposal = false; |
2876 |
this.noProposal = false; |
2874 |
if(!this.requestor.isIgnored(CompletionProposal.FIELD_REF)) { |
2877 |
if(!isIgnored(CompletionProposal.FIELD_REF, missingElements != null)) { |
2875 |
CompletionProposal proposal = this.createProposal(CompletionProposal.FIELD_REF, this.actualCompletionPosition); |
2878 |
CompletionProposal proposal = this.createProposal(CompletionProposal.FIELD_REF, this.actualCompletionPosition); |
2876 |
proposal.setDeclarationSignature(getSignature(receiverType)); |
2879 |
proposal.setDeclarationSignature(getSignature(receiverType)); |
2877 |
proposal.setSignature(INT_SIGNATURE); |
2880 |
proposal.setSignature(INT_SIGNATURE); |
Lines 2925-2931
Link Here
|
2925 |
completion = CharOperation.concat(cloneMethod, new char[] { '(', ')' }); |
2928 |
completion = CharOperation.concat(cloneMethod, new char[] { '(', ')' }); |
2926 |
} |
2929 |
} |
2927 |
this.noProposal = false; |
2930 |
this.noProposal = false; |
2928 |
if(!this.requestor.isIgnored(CompletionProposal.METHOD_REF)) { |
2931 |
if (!this.isIgnored(CompletionProposal.METHOD_REF, missingElements != null)) { |
2929 |
CompletionProposal proposal = this.createProposal(CompletionProposal.METHOD_REF, this.actualCompletionPosition); |
2932 |
CompletionProposal proposal = this.createProposal(CompletionProposal.METHOD_REF, this.actualCompletionPosition); |
2930 |
proposal.setDeclarationSignature(getSignature(receiverType)); |
2933 |
proposal.setDeclarationSignature(getSignature(receiverType)); |
2931 |
proposal.setSignature( |
2934 |
proposal.setSignature( |
Lines 4339-4345
Link Here
|
4339 |
|
4342 |
|
4340 |
this.noProposal = false; |
4343 |
this.noProposal = false; |
4341 |
// Standard proposal |
4344 |
// Standard proposal |
4342 |
if(!this.requestor.isIgnored(CompletionProposal.METHOD_REF) && (this.assistNodeInJavadoc & CompletionOnJavadoc.ONLY_INLINE_TAG) == 0) { |
4345 |
if(!this.isIgnored(CompletionProposal.METHOD_REF, missingElements != null) && (this.assistNodeInJavadoc & CompletionOnJavadoc.ONLY_INLINE_TAG) == 0) { |
4343 |
CompletionProposal proposal = this.createProposal(CompletionProposal.METHOD_REF, this.actualCompletionPosition); |
4346 |
CompletionProposal proposal = this.createProposal(CompletionProposal.METHOD_REF, this.actualCompletionPosition); |
4344 |
proposal.setDeclarationSignature(getSignature(method.declaringClass)); |
4347 |
proposal.setDeclarationSignature(getSignature(method.declaringClass)); |
4345 |
proposal.setSignature(getSignature(method)); |
4348 |
proposal.setSignature(getSignature(method)); |
Lines 5018-5023
Link Here
|
5018 |
} |
5021 |
} |
5019 |
} |
5022 |
} |
5020 |
|
5023 |
|
|
|
5024 |
private boolean isIgnored(int kind, boolean missingTypes) { |
5025 |
return this.requestor.isIgnored(kind) || |
5026 |
(missingTypes && !this.requestor.isAllowingRequiredProposals(kind, CompletionProposal.TYPE_REF)); |
5027 |
} |
5028 |
|
5021 |
private void findMethods( |
5029 |
private void findMethods( |
5022 |
char[] selector, |
5030 |
char[] selector, |
5023 |
TypeBinding[] typeArgTypes, |
5031 |
TypeBinding[] typeArgTypes, |