int x = 0;
while (i.hasNext()) {
Object o = i.next();
if (o instanceof Value) {
Value val = (Value)o;
if (cleanParamText.length() == 0
|| val.toString().toLowerCase().startsWith(cleanParamText.toLowerCase())) {
String insertion = val.toString().substring(cleanParamText.length(),val.toString().length());
int cursorOffset = insertion.length()+suffix.length();
if (!paramText.endsWith("\"")
&& paramText.startsWith("\"")) {
insertion += "\"";
cursorOffset ++;
}
else if(paramText.startsWith("\"")){
cursorOffset ++;
}
if (!paramText.endsWith("'")
&& paramText.startsWith("'")) {
insertion += "'";;
cursorOffset ++;
}
else if(paramText.startsWith("'")){
cursorOffset ++;
}
CompletionProposal proposal = new CompletionProposal(
insertion+suffix,
offset,
0,
cursorOffset,
CFPluginImages.get(CFPluginImages.ICON_PARAM),
activeParam.toString() + " - " + val.toString(),
null,
extraInfo);
//System.out.println("Added " + val.toString());
tmpResult[x] = proposal;