Package org.eclipse.emf.compare.ide.ui.internal.structuremergeviewer

# Class CompareToolBar

java.lang.Object
org.eclipse.emf.compare.ide.ui.internal.structuremergeviewer.CompareToolBar

All Implemented Interfaces:
  `org.eclipse.jface.viewers.ISelectionChangedListener`

public class CompareToolBar extends Object implements org.eclipse.jface.viewers.ISelectionChangedListener

## Constructor Summary

Constructors
Constructor
Description
`CompareToolBar(org.eclipse.jface.action.ToolBarManager toolbarManager, StructureMergeViewerGrouper viewerGrouper, StructureMergeViewerFilter viewerFilter, EMFCompareConfiguration compareConfiguration)`

## Method Summary

Modifier and Type
Method
Description
`void`
`adapterFactoryChange(IAdapterFactoryChange event)`
`void`
`comparisonAndScopeChange(IComparisonAndScopeChange event)`
`void`
`dispose()`
`void`
`editingDomainChange(ICompareEditingDomainChange event)`
`org.eclipse.jface.action.ToolBarManager`
`getToolBarManager()`
Returns the toolbar manager for this tool bar.
`final void`
`initToolbar(org.eclipse.jface.viewers.AbstractTreeViewer viewer, org.eclipse.compare.INavigatable nav, CompareHandlerService handlerService)`
`boolean`
`isEnabled()`
Returns whether the toolbar is currently enabled.
`void`
`selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)`
`void`
`setEnabled(boolean enable)`
Enables or disables the toolbar.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### CompareToolBar

public CompareToolBar(org.eclipse.jface.action.ToolBarManager toolbarManager, StructureMergeViewerGrouper viewerGrouper, StructureMergeViewerFilter viewerFilter, EMFCompareConfiguration compareConfiguration)

## Method Details

### initToolbar

public final void initToolbar(org.eclipse.jface.viewers.AbstractTreeViewer viewer, org.eclipse.compare.INavigatable nav, CompareHandlerService handlerService)

### getToolBarManager

public org.eclipse.jface.action.ToolBarManager getToolBarManager()
Returns the toolbar manager for this tool bar.

Returns:
  the `ToolBarManager`.

### dispose

public void dispose()

### selectionChanged

public void selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)

Specified by:
  `selectionChanged` in interface `org.eclipse.jface.viewers.ISelectionChangedListener`
See Also:
  - `ISelectionChangedListener.selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)`

### editingDomainChange

public void editingDomainChange(ICompareEditingDomainChange event)

### adapterFactoryChange

public void adapterFactoryChange(IAdapterFactoryChange event)

### comparisonAndScopeChange

public void comparisonAndScopeChange(IComparisonAndScopeChange event)

### setEnabled

public void setEnabled(boolean enable)
Enables or disables the toolbar.

Parameters:
  `enable` - Set to `true` to enable, `false` otherwise.

### isEnabled

public boolean isEnabled()
Returns whether the toolbar is currently enabled.

Returns:
  whether the toolbar is currently enabled.