Class ExternalFileStreamContent

  • All Implemented Interfaces:
    StreamContent, org.eclipse.compare.IContentChangeNotifier, org.eclipse.compare.IEditableContent, org.eclipse.compare.IEditableContentExtension, org.eclipse.compare.IModificationDate, org.eclipse.compare.IStreamContentAccessor, org.eclipse.compare.ITypedElement, org.eclipse.compare.structuremergeviewer.IStructureComparator, org.eclipse.core.runtime.IAdaptable

    public class ExternalFileStreamContent
    extends org.eclipse.compare.BufferedContent
    implements StreamContent, org.eclipse.compare.IEditableContent, org.eclipse.compare.IModificationDate, org.eclipse.compare.IEditableContentExtension
    Content for external files without document support.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private ContentWrapper content  
      protected boolean dirty  
      • Fields inherited from interface org.eclipse.compare.ITypedElement

        FOLDER_TYPE, TEXT_TYPE, UNKNOWN_TYPE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean commitChanges​(org.eclipse.core.runtime.IProgressMonitor pm)  
      protected java.io.InputStream createStream()  
      void dispose()  
      java.lang.Object getAdapter​(java.lang.Class adapter)  
      java.lang.Object[] getChildren()  
      java.lang.String getFullName()  
      org.eclipse.swt.graphics.Image getImage()  
      long getModificationDate()  
      java.lang.String getName()  
      java.lang.String getType()  
      void init​(AnyeditCompareInput input)  
      boolean isDirty()  
      boolean isDisposed()  
      boolean isEditable()  
      boolean isReadOnly()  
      StreamContent recreate()  
      org.eclipse.compare.ITypedElement replace​(org.eclipse.compare.ITypedElement dest, org.eclipse.compare.ITypedElement src)  
      void setContent​(byte[] contents)  
      void setDirty​(boolean dirty)  
      org.eclipse.core.runtime.IStatus validateEdit​(org.eclipse.swt.widgets.Shell shell)  
      • Methods inherited from class org.eclipse.compare.BufferedContent

        addContentChangeListener, discardBuffer, fireContentChanged, getContent, getContents, removeContentChangeListener
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.eclipse.compare.structuremergeviewer.IStructureComparator

        equals
    • Field Detail

      • dirty

        protected boolean dirty
    • Constructor Detail

      • ExternalFileStreamContent

        public ExternalFileStreamContent​(ContentWrapper content)
    • Method Detail

      • setContent

        public void setContent​(byte[] contents)
        Specified by:
        setContent in interface org.eclipse.compare.IEditableContent
        Overrides:
        setContent in class org.eclipse.compare.BufferedContent
      • getImage

        public org.eclipse.swt.graphics.Image getImage()
        Specified by:
        getImage in interface org.eclipse.compare.ITypedElement
      • commitChanges

        public boolean commitChanges​(org.eclipse.core.runtime.IProgressMonitor pm)
                              throws org.eclipse.core.runtime.CoreException
        Specified by:
        commitChanges in interface StreamContent
        Throws:
        org.eclipse.core.runtime.CoreException
      • createStream

        protected java.io.InputStream createStream()
                                            throws org.eclipse.core.runtime.CoreException
        Specified by:
        createStream in class org.eclipse.compare.BufferedContent
        Throws:
        org.eclipse.core.runtime.CoreException
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface org.eclipse.compare.ITypedElement
      • getType

        public java.lang.String getType()
        Specified by:
        getType in interface org.eclipse.compare.ITypedElement
      • getChildren

        public java.lang.Object[] getChildren()
        Specified by:
        getChildren in interface org.eclipse.compare.structuremergeviewer.IStructureComparator
      • isEditable

        public boolean isEditable()
        Specified by:
        isEditable in interface org.eclipse.compare.IEditableContent
      • replace

        public org.eclipse.compare.ITypedElement replace​(org.eclipse.compare.ITypedElement dest,
                                                         org.eclipse.compare.ITypedElement src)
        Specified by:
        replace in interface org.eclipse.compare.IEditableContent
      • getModificationDate

        public long getModificationDate()
        Specified by:
        getModificationDate in interface org.eclipse.compare.IModificationDate
      • isReadOnly

        public boolean isReadOnly()
        Specified by:
        isReadOnly in interface org.eclipse.compare.IEditableContentExtension
      • validateEdit

        public org.eclipse.core.runtime.IStatus validateEdit​(org.eclipse.swt.widgets.Shell shell)
        Specified by:
        validateEdit in interface org.eclipse.compare.IEditableContentExtension
      • getAdapter

        public java.lang.Object getAdapter​(java.lang.Class adapter)
        Specified by:
        getAdapter in interface org.eclipse.core.runtime.IAdaptable