Lines 55-60
Link Here
|
55 |
import org.netbeans.modules.html.editor.lib.api.elements.*; |
55 |
import org.netbeans.modules.html.editor.lib.api.elements.*; |
56 |
import org.netbeans.modules.parsing.api.Snapshot; |
56 |
import org.netbeans.modules.parsing.api.Snapshot; |
57 |
import org.netbeans.modules.web.jsf.editor.JsfSupportImpl; |
57 |
import org.netbeans.modules.web.jsf.editor.JsfSupportImpl; |
|
|
58 |
import org.netbeans.modules.web.jsfapi.api.DefaultLibraryInfo; |
58 |
import org.netbeans.modules.web.jsfapi.api.Library; |
59 |
import org.netbeans.modules.web.jsfapi.api.Library; |
59 |
import org.netbeans.modules.web.jsfapi.api.LibraryComponent; |
60 |
import org.netbeans.modules.web.jsfapi.api.LibraryComponent; |
60 |
import org.netbeans.modules.web.jsfapi.api.NamespaceUtils; |
61 |
import org.netbeans.modules.web.jsfapi.api.NamespaceUtils; |
Lines 195-218
Link Here
|
195 |
continue; |
196 |
continue; |
196 |
} |
197 |
} |
197 |
|
198 |
|
|
|
199 |
// #244237 - no autocomplete for varStatus |
200 |
String varStatusVariable = null; |
201 |
if (DefaultLibraryInfo.FACELETS.getNamespace().equals(library.getNamespace()) |
202 |
&& "repeat".equals(tagName)) { //NOI18N |
203 |
varStatusVariable = getVarStatusVariable(openTag); |
204 |
} |
205 |
|
198 |
String documentValueContent = topLevelSnapshot.getText().subSequence(doc_from, doc_to).toString(); |
206 |
String documentValueContent = topLevelSnapshot.getText().subSequence(doc_from, doc_to).toString(); |
199 |
|
207 |
|
200 |
JsfVariableContext context = new JsfVariableContext( |
208 |
JsfVariableContext context = new JsfVariableContext( |
201 |
openTag.from(), |
209 |
openTag.from(), |
202 |
openTag.semanticEnd(), |
210 |
openTag.semanticEnd(), |
203 |
openTag.getAttribute(variableAttributeName).unquotedValue().toString(), |
211 |
openTag.getAttribute(variableAttributeName).unquotedValue().toString(), |
204 |
unquotedValue(documentValueContent)); |
212 |
unquotedValue(documentValueContent), |
|
|
213 |
varStatusVariable); |
205 |
|
214 |
|
206 |
contextsList.add(context); |
215 |
contextsList.add(context); |
207 |
} |
216 |
} |
208 |
} |
217 |
} |
209 |
} |
218 |
} |
210 |
|
219 |
|
211 |
} |
220 |
} |
212 |
} |
221 |
} |
213 |
} |
222 |
} |
214 |
} |
223 |
} |
215 |
|
224 |
|
|
|
225 |
private String getVarStatusVariable(OpenTag openTag) { |
226 |
Attribute itemsAttribute = openTag.getAttribute("varStatus"); //NOI18N |
227 |
int doc_from = result.getSnapshot().getOriginalOffset(itemsAttribute.valueOffset()); |
228 |
int doc_to = result.getSnapshot().getOriginalOffset(itemsAttribute.valueOffset() + itemsAttribute.value().length()); |
229 |
if (doc_from == -1 || doc_to == -1) { |
230 |
return null; |
231 |
} |
232 |
|
233 |
return unquotedValue(topLevelSnapshot.getText().subSequence(doc_from, doc_to).toString()); |
234 |
} |
235 |
|
216 |
private String unquotedValue(String value) { |
236 |
private String unquotedValue(String value) { |
217 |
return isValueQuoted(value) ? value.substring(1, value.length() - 1) : value; |
237 |
return isValueQuoted(value) ? value.substring(1, value.length() - 1) : value; |
218 |
} |
238 |
} |
Lines 386-392
Link Here
|
386 |
} |
406 |
} |
387 |
|
407 |
|
388 |
/* test */ static class Expression { |
408 |
/* test */ static class Expression { |
389 |
|
409 |
|
390 |
private String base, postfix, expression; |
410 |
private String base, postfix, expression; |
391 |
|
411 |
|
392 |
/** expression can contain the EL delimiters */ |
412 |
/** expression can contain the EL delimiters */ |