String[] wids = getWicketIdsFrom(line);
for (String wid : wids) {
final String additionalInfo = line.trim().replaceAll("<", "<").replaceAll("\"" + wid + "\"", "\"<b>" + wid + "</b>\"");
final IRegion sar = DocumentHelper.findStringArgumentInJava(document, context.getInvocationOffset());
final CompletionProposal ccp = new CompletionProposal(wid, sar.getOffset(), sar.getLength(), 0, img, wid, null, additionalInfo);
proposals.put(wid, ccp);
}
}
} else if (openKind.equals(WicketHyperlink.PROPERTIES)) {
if (filename.endsWith(WicketHyperlink.PROPERTIES) && line.contains("=")) {
final String key = line.split("=")[0];
final IRegion sar = DocumentHelper.findStringArgumentInJava(document, context.getInvocationOffset());
final CompletionProposal ccp = new CompletionProposal(key, sar.getOffset(), sar.getLength(), 0, img, key, null, line.trim().replaceAll(key, "<b>" + key + "</b>"));
proposals.put(key, ccp);
} else if (filename.endsWith(WicketHyperlink.XML) && line.contains("<entry key=\"")) {
final String key = line.split("<entry key=\"")[1].split("\">")[0];
final IRegion sar = DocumentHelper.findStringArgumentInJava(document, context.getInvocationOffset());
final CompletionProposal ccp = new CompletionProposal(key, sar.getOffset(), sar.getLength(), 0, img, key, null, line.trim().replaceAll("<", "<").replaceAll("\"" + key + "\"", "\"<b>" + key + "</b>\""));
proposals.put(key, ccp);
}
}
}
br.close();