View | Details | Raw Unified | Return to bug 44984 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/model/CompletionTestsRequestor2.java (-1 / +3 lines)
Lines 72-78 Link Here
72
	
72
	
73
	public void allowAllRequiredProposals() {
73
	public void allowAllRequiredProposals() {
74
		for (int i = CompletionProposal.ANONYMOUS_CLASS_DECLARATION; i <= CompletionProposal.JAVADOC_INLINE_TAG; i++) {
74
		for (int i = CompletionProposal.ANONYMOUS_CLASS_DECLARATION; i <= CompletionProposal.JAVADOC_INLINE_TAG; i++) {
75
			this.setAllowsRequiredProposals(i, true);
75
			for (int j = CompletionProposal.ANONYMOUS_CLASS_DECLARATION; j <= CompletionProposal.JAVADOC_INLINE_TAG; j++) {
76
				this.setAllowsRequiredProposals(i, j, true);
77
			}
76
		}
78
		}
77
	}
79
	}
78
80
(-)model/org/eclipse/jdt/core/CompletionRequestor.java (-21 / +43 lines)
Lines 65-71 Link Here
65
	 * allows for required proposals; <code>0</code> means the set is empty.
65
	 * allows for required proposals; <code>0</code> means the set is empty.
66
	 * 1 << completionProposalKind
66
	 * 1 << completionProposalKind
67
	 */
67
	 */
68
	private int requiredProposalAllowSet = 0;
68
	private int requiredProposalAllowSet[] = null;
69
69
70
	/**
70
	/**
71
	 * Creates a new completion requestor.
71
	 * Creates a new completion requestor.
Lines 119-173 Link Here
119
	}
119
	}
120
	
120
	
121
	/**
121
	/**
122
	 * Returns whether a proposal with a required proposal
122
	 * Returns whether a proposal of a given kind with a required proposal
123
	 * of the given kind is allowed.
123
	 * of the given kind is allowed.
124
	 * 
124
	 * 
125
	 * @param completionProposalKind one of the kind constants declared
125
	 * @param proposalKind one of the kind constants declared
126
	 * @param requiredProposalKind one of the kind constants declared
126
	 * on <code>CompletionProposal</code>
127
	 * on <code>CompletionProposal</code>
127
	 * @return <code>true</code> if a proposal with a required proposal
128
	 * @return <code>true</code> if a proposal of a given kind with a required proposal
128
	 * of the given kind is allowed by this requestor, and <code>false</code> 
129
	 * of the given kind is allowed by this requestor, and <code>false</code> 
129
	 * if it isn't of interest.
130
	 * if it isn't of interest.
130
	 * <p>
131
	 * <p>
131
	 * By default, all kinds of required proposals aren't allowed.
132
	 * By default, all kinds of required proposals aren't allowed.
132
	 * </p>
133
	 * </p>
133
	 * @see #setAllowsRequiredProposals(int, boolean)
134
	 * @see #setAllowsRequiredProposals(int, int, boolean)
134
	 * @see CompletionProposal#getKind()
135
	 * @see CompletionProposal#getKind()
135
	 * @see CompletionProposal#getRequiredProposals()
136
	 * @see CompletionProposal#getRequiredProposals()
136
	 * 
137
	 * 
137
	 * @since 3.3
138
	 * @since 3.3
138
	 */
139
	 */
139
	public boolean isAllowingRequiredProposals(int completionProposalKind) {
140
	public boolean isAllowingRequiredProposals(int proposalKind, int requiredProposalKind) {
140
		if (completionProposalKind < CompletionProposal.FIRST_KIND
141
		if (proposalKind < CompletionProposal.FIRST_KIND
141
			|| completionProposalKind > CompletionProposal.LAST_KIND) {
142
			|| proposalKind > CompletionProposal.LAST_KIND) {
142
				throw new IllegalArgumentException("Unknown kind of completion proposal: "+completionProposalKind); //$NON-NLS-1$
143
				throw new IllegalArgumentException("Unknown kind of completion proposal: "+requiredProposalKind); //$NON-NLS-1$
143
		}
144
			}
144
		return 0 != (this.requiredProposalAllowSet & (1 << completionProposalKind));
145
		
146
		if (requiredProposalKind < CompletionProposal.FIRST_KIND
147
			|| requiredProposalKind > CompletionProposal.LAST_KIND) {
148
				throw new IllegalArgumentException("Unknown required kind of completion proposal: "+requiredProposalKind); //$NON-NLS-1$
149
		}
150
		if (this.requiredProposalAllowSet == null) return false;
151
		
152
		return 0 != (this.requiredProposalAllowSet[proposalKind] & (1 << requiredProposalKind));
145
	}
153
	}
146
	
154
	
147
	/**
155
	/**
148
	 * Sets whether a proposal with a required proposal
156
	 * Sets whether a proposal of a given kind with a required proposal
149
	 * of the given kind is allowed.
157
	 * of the given kind is allowed.
150
	 * 
158
	 * 
151
	 * @param completionProposalKind one of the kind constants declared
159
	 * Currenlty only a subset of kinds support required proposals. To see what combinations
160
	 * are supported you must look at {@link CompletionProposal#getRequiredProposals()}
161
	 * documentation.
162
	 * 
163
	 * @param proposalKind one of the kind constants declared
164
	 * @param requiredProposalKind one of the kind constants declared
152
	 * on <code>CompletionProposal</code>
165
	 * on <code>CompletionProposal</code>
153
	 * @param allow <code>true</code> if a proposal with a required proposal
166
	 * @param allow <code>true</code> if a proposal of a given kind with a required proposal
154
	 * of the given kind is allowed by this requestor, and <code>false</code> 
167
	 * of the given kind is allowed by this requestor, and <code>false</code> 
155
	 * if it isn't of interest
168
	 * if it isn't of interest
156
	 * @see #isAllowingRequiredProposals(int)
169
	 * @see #isAllowingRequiredProposals(int, int)
157
	 * @see CompletionProposal#getKind()
170
	 * @see CompletionProposal#getKind()
158
	 * @see CompletionProposal#getRequiredProposals()
171
	 * @see CompletionProposal#getRequiredProposals()
159
	 * 
172
	 * 
160
	 * @since 3.3
173
	 * @since 3.3
161
	 */
174
	 */
162
	public void setAllowsRequiredProposals(int completionProposalKind, boolean allow) {
175
	public void setAllowsRequiredProposals(int proposalKind, int requiredProposalKind, boolean allow) {
163
		if (completionProposalKind < CompletionProposal.FIRST_KIND
176
		if (proposalKind < CompletionProposal.FIRST_KIND
164
			|| completionProposalKind > CompletionProposal.LAST_KIND) {
177
			|| proposalKind > CompletionProposal.LAST_KIND) {
165
				throw new IllegalArgumentException("Unknown kind of completion proposal: "+completionProposalKind); //$NON-NLS-1$
178
				throw new IllegalArgumentException("Unknown kind of completion proposal: "+requiredProposalKind); //$NON-NLS-1$
179
		}
180
		if (requiredProposalKind < CompletionProposal.FIRST_KIND
181
			|| requiredProposalKind > CompletionProposal.LAST_KIND) {
182
				throw new IllegalArgumentException("Unknown required kind of completion proposal: "+requiredProposalKind); //$NON-NLS-1$
183
		}
184
		
185
		if (this.requiredProposalAllowSet == null) {
186
			this.requiredProposalAllowSet = new int[CompletionProposal.LAST_KIND + 1];
166
		}
187
		}
188
		
167
		if (allow) {
189
		if (allow) {
168
			this.requiredProposalAllowSet |= (1 << completionProposalKind);
190
			this.requiredProposalAllowSet[proposalKind] |= (1 << requiredProposalKind);
169
		} else {
191
		} else {
170
			this.requiredProposalAllowSet &= ~(1 << completionProposalKind);
192
			this.requiredProposalAllowSet[proposalKind] &= ~(1 << requiredProposalKind);
171
		}
193
		}
172
	}
194
	}
173
	
195
	
(-)model/org/eclipse/jdt/core/CompletionProposal.java (-8 / +12 lines)
Lines 1577-1593 Link Here
1577
	 * This field is available for the following kinds of
1577
	 * This field is available for the following kinds of
1578
	 * completion proposals:
1578
	 * completion proposals:
1579
	 * <ul>
1579
	 * <ul>
1580
	 * 	<li><code>FIELD_REF</code></li>
1580
	 * 	<li><code>FIELD_REF</code> - The allowed required proposals for this kind are:
1581
	 * 	<li><code>METHOD_REF</code>/li>
1581
	 *   <ul>
1582
	 *    <li><code>TYPE_REF</code></li>
1583
	 *   </ul>
1584
	 * </li>
1585
	 * 	<li><code>METHOD_REF</code> - The allowed required proposals for this kind are:
1586
	 *   <ul>
1587
	 *    <li><code>TYPE_REF</code></li>
1588
	 *   </ul>
1589
	 *  </li>
1582
	 * </ul>
1590
	 * </ul>
1583
	 * </p>
1591
	 * </p>
1584
	 * <p>
1592
	 * <p>
1585
	 * A required completion proposal can is a completion proposal of one of the following kinds:
1586
	 * <ul>
1587
	 *  <li><code>TYPE_REF</code></li>
1588
	 * </ul>
1589
	 * Other kinds of required proposals will be returned in the future, therefore clients of this
1593
	 * Other kinds of required proposals will be returned in the future, therefore clients of this
1590
	 * API must allow with {@link CompletionRequestor#setAllowsRequiredProposals(int, boolean)} 
1594
	 * API must allow with {@link CompletionRequestor#setAllowsRequiredProposals(int, int, boolean)} 
1591
	 * only kinds which are in this list to avoid unexpected results in the future.
1595
	 * only kinds which are in this list to avoid unexpected results in the future.
1592
	 * </p>
1596
	 * </p>
1593
	 * <p>
1597
	 * <p>
Lines 1596-1602 Link Here
1596
	 * 
1600
	 * 
1597
	 * @return the required completion proposals, or <code>null</code> if none.
1601
	 * @return the required completion proposals, or <code>null</code> if none.
1598
	 * 
1602
	 * 
1599
	 * @see CompletionRequestor#setAllowsRequiredProposals(int, boolean)
1603
	 * @see CompletionRequestor#setAllowsRequiredProposals(int, int,boolean)
1600
	 * 
1604
	 * 
1601
	 * @since 3.3
1605
	 * @since 3.3
1602
	 */
1606
	 */
(-)buildnotes_jdt-core.html (-19 / +29 lines)
Lines 103-119 Link Here
103
	 * This field is available for the following kinds of
103
	 * This field is available for the following kinds of
104
	 * completion proposals:
104
	 * completion proposals:
105
	 * &lt;ul&gt;
105
	 * &lt;ul&gt;
106
	 * 	&lt;li&gt;&lt;code&gt;FIELD_REF&lt;/code&gt;&lt;/li&gt;
106
	 * 	&lt;li&gt;&lt;code&gt;FIELD_REF&lt;/code&gt; - The allowed required proposals for this kind are:
107
	 * 	&lt;li&gt;&lt;code&gt;METHOD_REF&lt;/code&gt;/li&gt;
107
	 *   &lt;ul&gt;
108
	 *    &lt;li&gt;&lt;code&gt;TYPE_REF&lt;/code&gt;&lt;/li&gt;
109
	 *   &lt;/ul&gt;
110
	 * &lt;/li&gt;
111
	 * 	&lt;li&gt;&lt;code&gt;METHOD_REF&lt;/code&gt; - The allowed required proposals for this kind are:
112
	 *   &lt;ul&gt;
113
	 *    &lt;li&gt;&lt;code&gt;TYPE_REF&lt;/code&gt;&lt;/li&gt;
114
	 *   &lt;/ul&gt;
115
	 *  &lt;/li&gt;
108
	 * &lt;/ul&gt;
116
	 * &lt;/ul&gt;
109
	 * &lt;/p&gt;
117
	 * &lt;/p&gt;
110
	 * &lt;p&gt;
118
	 * &lt;p&gt;
111
	 * A required completion proposal can is a completion proposal of one of the following kinds:
112
	 * &lt;ul&gt;
113
	 *  &lt;li&gt;&lt;code&gt;TYPE_REF&lt;/code&gt;&lt;/li&gt;
114
	 * &lt;/ul&gt;
115
	 * Other kinds of required proposals will be returned in the future, therefore clients of this
119
	 * Other kinds of required proposals will be returned in the future, therefore clients of this
116
	 * API must allow with {@link CompletionRequestor#setAllowsRequiredProposals(int, boolean)} 
120
	 * API must allow with {@link CompletionRequestor#setAllowsRequiredProposals(int, int, boolean)} 
117
	 * only kinds which are in this list to avoid unexpected results in the future.
121
	 * only kinds which are in this list to avoid unexpected results in the future.
118
	 * &lt;/p&gt;
122
	 * &lt;/p&gt;
119
	 * &lt;p&gt;
123
	 * &lt;p&gt;
Lines 122-128 Link Here
122
	 * 
126
	 * 
123
	 * @return the required completion proposals, or &lt;code&gt;null&lt;/code&gt; if none.
127
	 * @return the required completion proposals, or &lt;code&gt;null&lt;/code&gt; if none.
124
	 * 
128
	 * 
125
	 * @see CompletionRequestor#setAllowsRequiredProposals(int, boolean)
129
	 * @see CompletionRequestor#setAllowsRequiredProposals(int, int,boolean)
126
	 * 
130
	 * 
127
	 * @since 3.3
131
	 * @since 3.3
128
	 */
132
	 */
Lines 138-178 Link Here
138
	...
142
	...
139
143
140
	/**
144
	/**
141
	 * Returns whether a proposal with a required proposal
145
	 * Returns whether a proposal of a given kind with a required proposal
142
	 * of the given kind is allowed.
146
	 * of the given kind is allowed.
143
	 * 
147
	 * 
144
	 * @param completionProposalKind one of the kind constants declared
148
	 * @param proposalKind one of the kind constants declared
149
	 * @param requiredProposalKind)one of the kind constants declared
145
	 * on &lt;code&gt;CompletionProposal&lt;/code&gt;
150
	 * on &lt;code&gt;CompletionProposal&lt;/code&gt;
146
	 * @return &lt;code&gt;true&lt;/code&gt; if a proposal with a required proposal
151
	 * @return &lt;code&gt;true&lt;/code&gt; if a proposal of a given kind with a required proposal
147
	 * of the given kind is allowed by this requestor, and &lt;code&gt;false&lt;/code&gt; 
152
	 * of the given kind is allowed by this requestor, and &lt;code&gt;false&lt;/code&gt; 
148
	 * if it isn't of interest.
153
	 * if it isn't of interest.
149
	 * &lt;p&gt;
154
	 * &lt;p&gt;
150
	 * By default, all kinds of required proposals aren't allowed.
155
	 * By default, all kinds of required proposals aren't allowed.
151
	 * &lt;/p&gt;
156
	 * &lt;/p&gt;
152
	 * @see #setAllowsRequiredProposals(int, boolean)
157
	 * @see #setAllowsRequiredProposals(int, int, boolean)
153
	 * @see CompletionProposal#getKind()
158
	 * @see CompletionProposal#getKind()
154
	 * @see CompletionProposal#getRequiredProposals()
159
	 * @see CompletionProposal#getRequiredProposals()
155
	 * 
160
	 * 
156
	 * @since 3.3
161
	 * @since 3.3
157
	 */
162
	 */
158
	public boolean isAllowingRequiredProposals(int completionProposalKind) {...}
163
	public boolean isAllowingRequiredProposals(int proposalKind, int requiredProposalKind) {...}
159
	
164
160
	/**
165
	/**
161
	 * Sets whether a proposal with a required proposal
166
	 * Sets whether a proposal of a given kind with a required proposal
162
	 * of the given kind is allowed.
167
	 * of the given kind is allowed.
163
	 * 
168
	 * 
164
	 * @param completionProposalKind one of the kind constants declared
169
	 * Currenlty only a subset of kinds support required proposals. To see what combinations
170
	 * are supported you must look at {@link CompletionProposal#getRequiredProposals()}
171
	 * documentation.
172
	 * 
173
	 * @param proposalKind one of the kind constants declared
174
	 * @param requiredProposalKind)one of the kind constants declared
165
	 * on &lt;code&gt;CompletionProposal&lt;/code&gt;
175
	 * on &lt;code&gt;CompletionProposal&lt;/code&gt;
166
	 * @param allow &lt;code&gt;true&lt;/code&gt; if a proposal with a required proposal
176
	 * @param allow &lt;code&gt;true&lt;/code&gt; if a proposal of a given kind with a required proposal
167
	 * of the given kind is allowed by this requestor, and &lt;code&gt;false&lt;/code&gt; 
177
	 * of the given kind is allowed by this requestor, and &lt;code&gt;false&lt;/code&gt; 
168
	 * if it isn't of interest
178
	 * if it isn't of interest
169
	 * @see #isAllowingRequiredProposals(int)
179
	 * @see #isAllowingRequiredProposals(int, int)
170
	 * @see CompletionProposal#getKind()
180
	 * @see CompletionProposal#getKind()
171
	 * @see CompletionProposal#getRequiredProposals()
181
	 * @see CompletionProposal#getRequiredProposals()
172
	 * 
182
	 * 
173
	 * @since 3.3
183
	 * @since 3.3
174
	 */
184
	 */
175
	public void setAllowsRequiredProposals(int completionProposalKind, boolean allow) {...}
185
	public void setAllowsRequiredProposals(int proposalKind, int requiredProposalKind)boolean allow) {...}
176
186
177
	...
187
	...
178
188
(-)codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java (-9 / +17 lines)
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,
(-)eval/org/eclipse/jdt/internal/eval/CodeSnippetToCuMapper.java (-4 / +4 lines)
Lines 207-218 Link Here
207
			originalRequestor.setIgnored(completionProposalKind, ignore);
207
			originalRequestor.setIgnored(completionProposalKind, ignore);
208
		}
208
		}
209
		
209
		
210
		public boolean isAllowingRequiredProposals(int completionProposalKind) {
210
		public boolean isAllowingRequiredProposals(int mainKind, int requiredKind) {
211
			return originalRequestor.isAllowingRequiredProposals(completionProposalKind);
211
			return originalRequestor.isAllowingRequiredProposals(mainKind, requiredKind);
212
		}
212
		}
213
213
214
		public void setAllowsRequiredProposals(int completionProposalKind, boolean allow) {
214
		public void setAllowsRequiredProposals(int mainKind, int requiredKind, boolean allow) {
215
			originalRequestor.setAllowsRequiredProposals(completionProposalKind, allow);
215
			originalRequestor.setAllowsRequiredProposals(mainKind, requiredKind, allow);
216
		}
216
		}
217
	};
217
	};
218
}
218
}

Return to bug 44984