newDocument= ((IDocumentRange)fElement).getDocument(); range= ((IDocumentRange)fElement).getRange(); connectToSharedDocument(); } else if (fDocumentProvider == null) { connectToSharedDocument();
newDocument= ((IDocumentRange) fElement).getDocument(); range= ((IDocumentRange) fElement).getRange(); connectToSharedDocument(); } else if (fDocumentProvider == null) { connectToSharedDocument();
private IDocument createDocument() { // If the content provider is a text content provider, attempt to obtain // a shared document (i.e. file buffer) IDocument newDoc = connectToSharedDocument(); if (newDoc == null) { IStreamContentAccessor sca= (IStreamContentAccessor) fElement; String s= null; try { String encoding = getEncoding(); s = Utilities.readString(sca, encoding); } catch (CoreException ex) { this.fViewer.setError(fLeg, ex.getMessage()); } newDoc= new Document(s != null ? s : ""); //$NON-NLS-1$ } return newDoc; }
private IDocument createDocument() { // If the content provider is a text content provider, attempt to obtain // a shared document (i.e. file buffer) IDocument newDoc = connectToSharedDocument(); if (newDoc == null) { IStreamContentAccessor sca= (IStreamContentAccessor) fElement; String s= null; try { String encoding = internalGetEncoding(); s = Utilities.readString(sca, encoding); } catch (CoreException ex) { this.fViewer.setError(fLeg, ex.getMessage()); } newDoc= new Document(s != null ? s : ""); //$NON-NLS-1$ } return newDoc; }