// StructuredDocumentRegion
// not sure why this check was there...
// if (fnDelim.getType() == XMLRegionContext.BLOCK_TEXT) {
Iterator blockRegions = fnDelim.getRegions().iterator();
ITextRegion temp = null;
ITextRegionContainer trc;
while (blockRegions.hasNext()) {
temp = (ITextRegion) blockRegions.next();
// we hit a nested
if (temp instanceof ITextRegionContainer) {
trc = (ITextRegionContainer) temp;
// it's in this region
if (documentPosition >= trc.getStartOffset() && documentPosition < trc.getEndOffset()) {
Iterator nestedJSPRegions = trc.getRegions().iterator();
while (nestedJSPRegions.hasNext()) {
temp = (ITextRegion) nestedJSPRegions.next();
if (XMLContentAssistUtilities.isJSPOpenDelimiter(temp.getType()) && documentPosition == trc.getStartOffset(temp)) {
// HTML content assist
// we actually want content assist for the
// previous type of region,
// well get those proposals from the embedded
// adapter
if (documentPosition > 0) {
partitionType = getPartitionType(viewer, documentPosition - 1);
break;
}
}
else if (XMLContentAssistUtilities.isJSPCloseDelimiter(temp.getType()) && documentPosition == trc.getStartOffset(temp)) {
// JSP content assist
return getJSPJavaCompletionProposals(viewer, documentPosition);
}
}
}