final IDocument document = textViewer.getDocument();
final IRegion[] regions = new IRegion[3];
try {
final IRegion wicketIdRegion = findStringArgumentRegion(document, offset);
if (wicketIdRegion == null) {
return null;
}
final IRegion wicketComponentRegion = findWicketComponentRegion(document, wicketIdRegion.getOffset());
if (wicketComponentRegion == null) {
return null;
}
final IRegion javaRegion = JavaWordFinder.findWord(document, wicketComponentRegion.getOffset());
final IJavaElement input = EditorUtility.getEditorInputJavaElement(editor, false);
final IJavaElement[] javaElements = ((ICodeAssist) input).codeSelect(javaRegion.getOffset(), javaRegion.getLength());
if (javaElements == null || javaElements.length == 0) {
return null;
}
for (final IJavaElement javaElement : javaElements)
{