initFragments();
// find the fragment matching the offset
int subOffset = offset - getOffset() - 2;
if (subOffset < 0)
return null;
Fragment fragment = null;
for (Iterator<Fragment> i = fragments.iterator(); i.hasNext();) {
Fragment fragmentSub = i.next();
if (fragmentSub.getOffset() <= subOffset)
fragment = fragmentSub;
else
break;
}
if (null != fragment) {
// find the parent class
Class<?> parentClass = null;
for (Iterator<Fragment> i = fragments.iterator(); i.hasNext();) {
Fragment fragmentSub = i.next();
if (fragmentSub.equals(fragment))
break;
else
parentClass = fragmentSub.getReturnClass(parentClass,
fragments, context, getResource(), getResource()
.getProject());
}
return fragment.getCompletionProposals(
subOffset - fragment.getOffset(), offset, parentClass,