Package org.eclipse.wst.sse.core.internal.document

Examples of org.eclipse.wst.sse.core.internal.document.IDocumentCharsetDetector


    boolean failed = false;
    IStructuredModel internalModel = getInternalModel();
    if (internalModel != null) {
      IStructuredDocument doc = internalModel.getStructuredDocument();
      EncodingMemento memento = doc.getEncodingMemento();
      IDocumentCharsetDetector detector = internalModel.getModelHandler().getEncodingDetector();
      if (memento != null && detector != null) {
        detector.set(doc);
        try {
          String newEncoding = detector.getEncoding();
          if (newEncoding != null) {
            memento.setDetectedCharsetName(newEncoding);
          }
        }
        catch (IOException e) {
View Full Code Here


      handler = getJSPDefaultEmbeddedType();
    }
    else {
      String mimeType = null;

      IDocumentCharsetDetector jspProvider = getDocumentEncodingDetector();
      Reader fullPreparedReader = getFullPreparedReader();
      BufferedLimitedReader limitedReader = new BufferedLimitedReader(fullPreparedReader, CodedIO.MAX_BUF_SIZE);
      jspProvider.set(limitedReader);
      if (jspProvider instanceof IJSPHeadContentDetector) {
        mimeType = ((IJSPHeadContentDetector) jspProvider).getContentType();
        fullPreparedReader.reset();
      }
View Full Code Here

    boolean failed = false;
    IStructuredModel internalModel = getInternalModel();
    if (internalModel != null) {
      IStructuredDocument doc = internalModel.getStructuredDocument();
      EncodingMemento memento = doc.getEncodingMemento();
      IDocumentCharsetDetector detector = internalModel.getModelHandler().getEncodingDetector();
      if (memento != null && detector != null) {
        detector.set(doc);
        try {
          String newEncoding = detector.getEncoding();
          if (newEncoding != null) {
            memento.setDetectedCharsetName(newEncoding);
          }
        }
        catch (IOException e) {
View Full Code Here

TOP

Related Classes of org.eclipse.wst.sse.core.internal.document.IDocumentCharsetDetector

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.