Search in sources :

Example 6 with IStreamContentAccessor

use of org.eclipse.compare.IStreamContentAccessor in project xtext-eclipse by eclipse.

the class StreamContentDocumentProvider method createDocument.

@Override
protected IDocument createDocument(Object element) throws CoreException {
    IDocument document = null;
    if (element instanceof IStreamContentAccessor) {
        document = createEmptyDocument();
        setupDocument(element, document);
    }
    return document;
}
Also used : IStreamContentAccessor(org.eclipse.compare.IStreamContentAccessor) IDocument(org.eclipse.jface.text.IDocument)

Example 7 with IStreamContentAccessor

use of org.eclipse.compare.IStreamContentAccessor in project erlide_eclipse by erlang.

the class ErlContentViewer method setInput.

@Override
public void setInput(final Object input) {
    if (input instanceof IStreamContentAccessor) {
        final Document document = new Document(ErlContentViewer.getString(input));
        // ErlangCompareUtilities.setupDocument(document);
        fSourceViewer.setDocument(document);
    }
    fInput = input;
}
Also used : IStreamContentAccessor(org.eclipse.compare.IStreamContentAccessor) Document(org.eclipse.jface.text.Document)

Aggregations

IStreamContentAccessor (org.eclipse.compare.IStreamContentAccessor)7 CoreException (org.eclipse.core.runtime.CoreException)4 Document (org.eclipse.jface.text.Document)3 IDocument (org.eclipse.jface.text.IDocument)3 IOException (java.io.IOException)2 InputStream (java.io.InputStream)2 WrappedException (org.eclipse.emf.common.util.WrappedException)2 IResourceProvider (org.eclipse.compare.IResourceProvider)1 ITypedElement (org.eclipse.compare.ITypedElement)1 ResourceNode (org.eclipse.compare.ResourceNode)1 IFile (org.eclipse.core.resources.IFile)1 IResource (org.eclipse.core.resources.IResource)1 ErlModelException (org.erlide.engine.model.ErlModelException)1 IErlElement (org.erlide.engine.model.IErlElement)1 IErlModel (org.erlide.engine.model.root.IErlModel)1 IErlModule (org.erlide.engine.model.root.IErlModule)1 IPersistenceKit (org.whole.lang.codebase.IPersistenceKit)1 StreamPersistenceProvider (org.whole.lang.codebase.StreamPersistenceProvider)1 IEntity (org.whole.lang.model.IEntity)1