use of org.eclipse.jst.jsp.core.internal.contenttype.JSPResourceEncodingDetector in project webtools.sourceediting by eclipse.
the class JSPEncodingTests method testUTF16le.
public void testUTF16le() throws IOException {
String filename = fileLocation + "utf16le.jsp";
doTestFileStream(filename, "UTF-16LE", new JSPResourceEncodingDetector());
}
use of org.eclipse.jst.jsp.core.internal.contenttype.JSPResourceEncodingDetector in project webtools.sourceediting by eclipse.
the class ContentDescriberForJSPedCSS method handleCalculations.
private void handleCalculations(IContentDescription description, IResourceCharsetDetector detector) throws IOException {
// handle standard ones first, to be sure detector processes
handleStandardCalculations(description, detector);
// check, for now.
if (detector instanceof JSPResourceEncodingDetector) {
JSPResourceEncodingDetector jspDetector = (JSPResourceEncodingDetector) detector;
String language = jspDetector.getLanguage();
if (language != null && language.length() > 0) {
description.setProperty(IContentDescriptionForJSP.LANGUAGE_ATTRIBUTE, language);
}
String contentTypeAttribute = jspDetector.getContentType();
if (contentTypeAttribute != null && contentTypeAttribute.length() > 0) {
description.setProperty(IContentDescriptionForJSP.CONTENT_TYPE_ATTRIBUTE, contentTypeAttribute);
}
}
}
Aggregations