org.eclipse.emf.compare.ui.viewer.structure
Class ModelStructureContentProvider

java.lang.Object
  extended by org.eclipse.emf.compare.ui.viewer.structure.ModelStructureContentProvider
All Implemented Interfaces:
org.eclipse.jface.viewers.IContentProvider, org.eclipse.jface.viewers.IStructuredContentProvider, org.eclipse.jface.viewers.ITreeContentProvider

public class ModelStructureContentProvider
extends java.lang.Object
implements org.eclipse.jface.viewers.ITreeContentProvider

Structure viewer used by the ModelStructureMergeViewer. Assumes that its input is a DiffModel.


Field Summary
protected  org.eclipse.compare.CompareConfiguration configuration
          CompareConfiguration controls various aspect of the GUI elements.
protected  java.lang.Object input
          Result of the underlying comparison.
 
Constructor Summary
ModelStructureContentProvider(org.eclipse.compare.CompareConfiguration compareConfiguration)
          Instantiates a content provider given the CompareConfiguration to use.
 
Method Summary
 void dispose()
          
 java.lang.Object[] getChildren(java.lang.Object parentElement)
          
 java.lang.Object[] getElements(java.lang.Object inputElement)
          
 java.lang.Object getParent(java.lang.Object element)
          
 boolean hasChildren(java.lang.Object element)
          
 void inputChanged(org.eclipse.jface.viewers.Viewer viewer, java.lang.Object oldInput, java.lang.Object newInput)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

configuration

protected final org.eclipse.compare.CompareConfiguration configuration
CompareConfiguration controls various aspect of the GUI elements. This will keep track of the one used to created this compare editor.

Since:
1.1

input

protected java.lang.Object input
Result of the underlying comparison. This can be either a DiffModel or DiffResourceSet.

Since:
1.1
Constructor Detail

ModelStructureContentProvider

public ModelStructureContentProvider(org.eclipse.compare.CompareConfiguration compareConfiguration)
Instantiates a content provider given the CompareConfiguration to use.

Parameters:
compareConfiguration - CompareConfiguration used for this comparison.
Method Detail

dispose

public void dispose()

Specified by:
dispose in interface org.eclipse.jface.viewers.IContentProvider
See Also:
IContentProvider.dispose()

getChildren

public java.lang.Object[] getChildren(java.lang.Object parentElement)

Specified by:
getChildren in interface org.eclipse.jface.viewers.ITreeContentProvider
See Also:
ITreeContentProvider.getChildren(Object)

getElements

public java.lang.Object[] getElements(java.lang.Object inputElement)

Specified by:
getElements in interface org.eclipse.jface.viewers.IStructuredContentProvider
Specified by:
getElements in interface org.eclipse.jface.viewers.ITreeContentProvider
See Also:
IStructuredContentProvider.getElements(Object)

getParent

public java.lang.Object getParent(java.lang.Object element)

Specified by:
getParent in interface org.eclipse.jface.viewers.ITreeContentProvider
See Also:
ITreeContentProvider.getParent(Object)

hasChildren

public boolean hasChildren(java.lang.Object element)

Specified by:
hasChildren in interface org.eclipse.jface.viewers.ITreeContentProvider
See Also:
ITreeContentProvider.hasChildren(Object)

inputChanged

public void inputChanged(org.eclipse.jface.viewers.Viewer viewer,
                         java.lang.Object oldInput,
                         java.lang.Object newInput)

Specified by:
inputChanged in interface org.eclipse.jface.viewers.IContentProvider
See Also:
IContentProvider.inputChanged(Viewer, Object, Object)

Copyright 2006 IBM Corporation and others.
All Rights Reserved.