Interface IViewerDescriptor

All Known Implementing Classes:
ViewerDescriptor

public interface IViewerDescriptor
A factory object for creating a Viewers from a descriptor.

It is used when registering a viewer for a specific type in CompareUIPlugin.registerContentViewerDescriptor and in CompareUIPlugin.registerStructureViewerDescriptor.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    createViewer(Viewer currentViewer, Composite parent, CompareConfiguration config)
    Creates a new viewer from this descriptor under the given STW parent control.
  • Method Details

    • createViewer

      Viewer createViewer(Viewer currentViewer, Composite parent, CompareConfiguration config)
      Creates a new viewer from this descriptor under the given STW parent control. If the current viewer has the same type as a new viewer the implementation of this method is free to return the current viewer instead.
      Parameters:
      currentViewer - the current viewer which is going to be replaced with a new viewer.
      parent - the SWT parent control under which the new viewer has to be created.
      config - a compare configuration the new viewer might be interested in.
      Returns:
      a new viewer or the current viewer.