public ITextRegion createToken(String context, int start, int textLength, int length, String lang, String surroundingTag) { ITextRegion newRegion = null; if (context == DOMJSPRegionContexts.JSP_CONTENT) { newRegion = new ForeignRegion(context, start, textLength, length); } else newRegion = super.createToken(context, start, textLength, length, lang, surroundingTag); return newRegion; } }
protected String getPartitionType(ForeignRegion region, int offset) { String tagname = region.getSurroundingTag(); String result = null; // tagname should not be null, // but see https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=4911 if (tagname == null) { result = getUnknown(); } else if (tagname.equalsIgnoreCase(HTML40Namespace.ElementName.SCRIPT)) result = IHTMLPartitions.SCRIPT; else if (tagname.equalsIgnoreCase(HTML40Namespace.ElementName.STYLE)) result = ICSSPartitions.STYLE; else result = super.getPartitionType(region, offset); return result; }
newRegion = new ForeignRegion(context, start, textLength, length); ((ForeignRegion) newRegion).setSurroundingTag(surroundingTag);
isFullReparsed = false; return super.updateRegion(requester, flatnode, changes, requestStart, lengthToReplace);