## org.eclipse.emf.compare.ui.viewer.structure
Class ModelStructureMergeViewer

    java.lang.Object
      org.eclipse.jface.viewers.Viewer
          org.eclipse.jface.viewers.ContentViewer
              org.eclipse.jface.viewers.StructuredViewer
                  org.eclipse.jface.viewers.ColumnViewer
                      org.eclipse.jface.viewers.AbstractTreeViewer
                          org.eclipse.jface.viewers.TreeViewer
                              org.eclipse.emf.compare.ui.viewer.structure.ModelStructureMergeViewer

All Implemented Interfaces:
  org.eclipse.jface.viewers.IInputProvider, org.eclipse.jface.viewers.IInputSelectionProvider, org.eclipse.jface.viewers.IPostSelectionProvider, org.eclipse.jface.viewers.ISelectionProvider

    public class ModelStructureMergeViewer

extends org.eclipse.jface.viewers.TreeViewer

Compare and merge viewer with an area showing diffs as a structured tree.

Nested Class Summary

Nested classes/interfaces inherited from class org.eclipse.jface.viewers.StructuredViewer
`org.eclipse.jface.viewers.StructuredViewer.ColorAndFontCollector, org.eclipse.jface.viewers.StructuredViewer.ColorAndFontCollectorWithProviders`

Field Summary
`protected org.eclipse.compare.CompareConfiguration` `configuration` Configuration element of the underlying comparison.
`protected ExportMenu` `exportMenu` This is the action displaying the "export diff as..." menu.

Fields inherited from class org.eclipse.jface.viewers.AbstractTreeViewer
`ALL_LEVELS`

Fields inherited from class org.eclipse.jface.viewers.Viewer
`WIDGET_DATA_KEY`

Constructor Summary
`ModelStructureMergeViewer(org.eclipse.swt.widgets.Composite parent, org.eclipse.compare.CompareConfiguration compareConfiguration)` Creates a new model structure merge viewer and intializes it.

Method Summary
`protected ModelStructureContentProvider` `createContentProvider(org.eclipse.compare.CompareConfiguration compareConfiguration)` Creates this viewer's content provider.
`protected org.eclipse.emf.compare.ui.viewer.structure.ModelStructureMergeViewer.ModelStructureLabelProvider` `createLabelProvider(org.eclipse.compare.CompareConfiguration compareConfiguration)` Creates this viewer's label provider.
`protected void` `createToolItems()` This will initialize the "save as emfdiff" action and put its icon in the `CompareViewerPane` toolbar.
`protected void` `fireOpen(org.eclipse.jface.viewers.OpenEvent event)`
`protected void` `fireSelectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)`
`org.eclipse.compare.CompareConfiguration` `getCompareConfiguration()` Returns the compare configuration of this viewer, or `null` if this viewer does not yet have a configuration.
`java.lang.String` `getTitle()` Returns the viewer's title.
`protected void` `handleDispose(org.eclipse.swt.events.DisposeEvent event)`
`protected void` `inputChanged(java.lang.Object input, java.lang.Object oldInput)`
`protected void` `updateToolItems()` Updates the Structure viewer's tool items.

Methods inherited from class org.eclipse.jface.viewers.TreeViewer

`addTreeListener, assertContentProviderType, createViewerEditor, disassociate, doGetColumnCount, editElement, getChild, getChildren, getColumnViewerOwner, getControl, getExpanded, getItemAt, getItemCount, getItemCount, getItems, getLabelProvider, getParentElement, getParentItem, getRawChildren, getSelection, getTree, getViewerRowFromItem, handleTreeCollapse, handleTreeExpand, hookControl, internalAdd, internalInitializeTree, internalRefreshStruct, isExpandable, mapElement, newItem, remove, removeAll, replace, setChildCount, setContentProvider, setExpanded, setHasChildren, setSelection, setSelection, showItem, updatePlus`

Methods inherited from class org.eclipse.jface.viewers.AbstractTreeViewer

`add, add, addSelectionListener, addTreeListener, associate, buildLabel, collapseAll, collapseToLevel, createChildren, createTreeItem, doFindInputItem, doFindItem, doUpdateItem, doUpdateItem, expandAll, expandToLevel, expandToLevel, fireTreeCollapsed, fireTreeExpanded, getAutoExpandLevel, getChildren, getExpandedElements, getExpandedState, getExpandedTreePaths, getNextItem, getPreviousItem, getSelection, getSelectionFromWidget, getSortedChildren, getTreePathFromItem, getVisibleExpandedElements, handleDoubleSelect, indexForElement, insert, internalCollapseToLevel, internalExpand, internalExpandToLevel, internalFindItems, internalGetWidgetToSelect, internalIsInputOrEmptyPath, internalRefresh, internalRefresh, internalRefresh, internalRemove, internalRemove, isSameSelection, labelProviderChanged, remove, remove, remove, removeTreeListener, reveal, scrollDown, scrollUp, setAutoExpandLevel, setExpandedElements, setExpandedState, setExpandedTreePaths, setSelectionToWidget, setSelectionToWidget, updateChildren`

Methods inherited from class org.eclipse.jface.viewers.ColumnViewer
`applyEditorValue, cancelEditing, checkBusy, getCell, getCellEditors, getCellModifier, getColumnProperties, getColumnViewerEditor, getItem, getLabelProvider, getViewerRow, hookEditingSupport, isBusy, isCellEditorActive, refresh, refresh, setBusy, setCellEditors, setCellModifier, setColumnProperties, setColumnViewerEditor, setLabelProvider, triggerEditorActivationEvent, update`

Methods inherited from class org.eclipse.jface.viewers.StructuredViewer

`addDoubleClickListener, addDragSupport, addDropSupport, addFilter, addOpenListener, addPostSelectionChangedListener, assertElementsNotNull, equals, filter, findItem, findItems, fireDoubleClick, firePostSelectionChanged, getColorAndFontCollector, getComparator, getComparer, getFilteredChildren, getFilters, getRoot, getSorter, handleInvalidSelection, handleLabelProviderChanged, handleOpen, handlePostSelect, handleSelect, hasFilters, internalUpdate, needsRefilter, preservingSelection, refresh, refresh, refreshItem, removeDoubleClickListener, removeFilter, removeOpenListener, removePostSelectionChangedListener, resetFilters, setComparator, setComparer, setFilters, setInput, setSorter, setUseHashlookup, testFindItem, testFindItems, unmapAllElements, unmapElement, unmapElement, update, updateItem, updateSelection, usingElementMap`

Methods inherited from class org.eclipse.jface.viewers.ContentViewer
`getContentProvider, getInput`

Methods inherited from class org.eclipse.jface.viewers.Viewer
`addHelpListener, addSelectionChangedListener, fireHelpRequested, getData, handleHelpRequest, removeHelpListener, removeSelectionChangedListener, setData, setSelection`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.eclipse.jface.viewers.ISelectionProvider
`addSelectionChangedListener, removeSelectionChangedListener, setSelection`

Field Detail

### configuration

    protected org.eclipse.compare.CompareConfiguration configuration

  Configuration element of the underlying comparison.

### exportMenu

    protected ExportMenu exportMenu

  This is the action displaying the "export diff as..." menu.

Constructor Detail

### ModelStructureMergeViewer

    public ModelStructureMergeViewer(org.eclipse.swt.widgets.Composite parent,
                                     org.eclipse.compare.CompareConfiguration compareConfiguration)

  Creates a new model structure merge viewer and intializes it.

  Parameters:
    `parent` - Parent composite for this viewer.
    `compareConfiguration` - The configuration object.

Method Detail

### getCompareConfiguration

    public org.eclipse.compare.CompareConfiguration getCompareConfiguration()

  Returns the compare configuration of this viewer, or `null` if this viewer does not yet have a configuration.

  Returns:
    the compare configuration, or `null` if none

### getTitle

    public java.lang.String getTitle()

  Returns the viewer's title.

  Returns:
    The viewer's title.
  See Also:
    `CompareUI.COMPARE_VIEWER_TITLE`

### createContentProvider

    protected ModelStructureContentProvider createContentProvider(org.eclipse.compare.CompareConfiguration compareConfiguration)

  Creates this viewer's content provider.

  Parameters:
    `compareConfiguration` - Compare configuration that's been fed this viewer.
  Returns:
    This viewer's content provider.
  Since:
    1.1

### createLabelProvider

    protected org.eclipse.emf.compare.ui.viewer.structure.ModelStructureMergeViewer.ModelStructureLabelProvider createLabelProvider(org.eclipse.compare.CompareConfiguration compareConfiguration)

  Creates this viewer's label provider.

  Parameters:
    `compareConfiguration` - Compare configuration that's been fed this viewer.
  Returns:
    This viewer's label provider.
  Since:
    1.1

### createToolItems

    protected void createToolItems()

  This will initialize the "save as emfdiff" action and put its icon in the `CompareViewerPane` toolbar.

### fireOpen

    protected void fireOpen(org.eclipse.jface.viewers.OpenEvent event)

  Overrides:
    `fireOpen` in class `org.eclipse.jface.viewers.StructuredViewer`
  See Also:
    `StructuredViewer.fireOpen(org.eclipse.jface.viewers.OpenEvent)`

### fireSelectionChanged

    protected void fireSelectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)

  Overrides:
    `fireSelectionChanged` in class `org.eclipse.jface.viewers.Viewer`
  See Also:
    `Viewer.fireSelectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)`

### handleDispose

    protected void handleDispose(org.eclipse.swt.events.DisposeEvent event)

  Overrides:
    `handleDispose` in class `org.eclipse.jface.viewers.StructuredViewer`
  See Also:
    `ContentViewer.handleDispose(org.eclipse.swt.events.DisposeEvent)`

### inputChanged

    protected void inputChanged(java.lang.Object input,
                                java.lang.Object oldInput)

  Overrides:
    `inputChanged` in class `org.eclipse.jface.viewers.AbstractTreeViewer`
  See Also:
    `AbstractTreeViewer.inputChanged(java.lang.Object, java.lang.Object)`

### updateToolItems

    protected void updateToolItems()

  Updates the Structure viewer's tool items. This will modify the actions of the "export diff as..." menu.

Copyright 2006 IBM Corporation and others. All Rights Reserved.