|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.compare.ui.viewer.content.part.ModelContentMergeTabFolder
public class ModelContentMergeTabFolder
Describes a part of a ModelContentMergeViewer
.
Field Summary | |
---|---|
protected ModelContentMergeViewer |
parentViewer
This keeps track of the parent viewer of this tab folder. |
protected int |
partSide
This int represents the side of this viewer part. |
protected IModelContentMergeViewerTab |
properties
This is the content of the properties tab for this viewer part. |
protected org.eclipse.swt.custom.CTabFolder |
tabFolder
This is the view displayed by this viewer part. |
protected java.util.List<IModelContentMergeViewerTab> |
tabs
Keeps references to the tabs contained within this folder. |
protected IModelContentMergeViewerTab |
tree
This is the content of the tree tab for this viewer part. |
Constructor Summary | |
---|---|
ModelContentMergeTabFolder(ModelContentMergeViewer viewer,
org.eclipse.swt.widgets.Composite composite,
int side)
Instantiates a ModelContentMergeTabFolder given its parent Composite and its side. |
Method Summary | |
---|---|
void |
addCompareEditorPartListener(ICompareEditorPartListener listener)
Registers the given listener for notification. |
protected void |
createContents(org.eclipse.swt.widgets.Composite composite)
Creates the contents of this viewer part given its parent composite. |
protected IModelContentMergeViewerTab |
createModelContentMergeDiffTab(org.eclipse.swt.widgets.Composite parent)
Actual creation of the tree tab. |
protected IModelContentMergeViewerTab |
createModelContentMergeViewerTab(org.eclipse.swt.widgets.Composite parent)
Actual creation of the properties tab. |
void |
dispose()
Disposes of all resources used by this folder. |
protected org.eclipse.emf.ecore.EObject |
findMatchFromElement(org.eclipse.emf.ecore.EObject element)
Returns the Match2Elements containing the given EObject as its left or right element. |
protected void |
fireSelectedtabChanged()
Notifies All listeners registered for this viewer part that the tab
selection has been changed. |
protected void |
fireSelectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)
Notifies All listeners registered for this viewer part that the user
selection has changed on the properties or tree tab. |
protected void |
fireUpdateCenter()
Notifies All listeners registered for this viewer part that the
center part needs to be refreshed. |
java.util.List<DiffElement> |
getDiffAsList()
Returns a list of all diffs contained by the input DiffModel except for DiffGroups. |
IModelContentMergeViewerTab |
getPropertyPart()
Returns the properties tab of this tab folder. |
IModelContentMergeViewerTab |
getTreePart()
Returns the tree tab of this tab folder. |
ModelContentMergeTabItem |
getUIItem(DiffElement element)
This will be used when drawing the center part's marquees. |
java.util.List<ModelContentMergeTabItem> |
getVisibleElements()
Returns the visible elements of the active tab. |
void |
layout()
Redraws this viewer part. |
void |
navigateToDiff(DiffElement diff)
Shows the given item on the tree tab or its properties on the property tab. |
void |
navigateToDiff(java.util.List<DiffElement> diffs)
Ensures the first item of the given list of DiffElement s is visible, and sets the selection of
the tree to all those items. |
void |
removeCompareEditorPartListener(ICompareEditorPartListener listener)
Removes the given listener from this folder's listeners list. |
protected void |
resizeBounds()
This will resize the tabs displayed by this content merge viewer. |
void |
setBounds(int x,
int y,
int width,
int height)
Sets the receiver's size and location to the rectangular area specified by the arguments. |
void |
setBounds(org.eclipse.swt.graphics.Rectangle bounds)
Sets the receiver's size and location to given rectangular area. |
void |
setInput(java.lang.Object input)
Sets the input of this viewer part. |
void |
setSelectedTab(int index)
Changes the current tab. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final ModelContentMergeViewer parentViewer
protected final int partSide
int
represents the side of this viewer part. Must be one of
protected IModelContentMergeViewerTab properties
protected org.eclipse.swt.custom.CTabFolder tabFolder
protected final java.util.List<IModelContentMergeViewerTab> tabs
protected IModelContentMergeViewerTab tree
Constructor Detail |
---|
public ModelContentMergeTabFolder(ModelContentMergeViewer viewer, org.eclipse.swt.widgets.Composite composite, int side)
ModelContentMergeTabFolder
given its parent Composite
and its side.
viewer
- Parent viewer of this viewer part.composite
- Parent Composite
for this part.side
- Comparison side of this part. Must be one of EMFCompareConstants.RIGHT
, EMFCompareConstants.LEFT
or
EMFCompareConstants.ANCESTOR
.Method Detail |
---|
public void addCompareEditorPartListener(ICompareEditorPartListener listener)
listener
- The listener to register for changes of this input.public void dispose()
public java.util.List<DiffElement> getDiffAsList()
public IModelContentMergeViewerTab getPropertyPart()
public IModelContentMergeViewerTab getTreePart()
public ModelContentMergeTabItem getUIItem(DiffElement element)
element
- The DiffElement which we need UI variables for.
public java.util.List<ModelContentMergeTabItem> getVisibleElements()
public void layout()
public void navigateToDiff(DiffElement diff)
diff
- Item to scroll to.public void navigateToDiff(java.util.List<DiffElement> diffs)
DiffElement
s is visible, and sets the selection of
the tree to all those items.
diffs
- Items to select.public void removeCompareEditorPartListener(ICompareEditorPartListener listener)
listener
- The listener to remove from this folder.public void setBounds(int x, int y, int width, int height)
x
- Desired x coordinate of the part.y
- Desired y coordinate of the part.width
- Desired width of the part.height
- Desired height of the part.public void setBounds(org.eclipse.swt.graphics.Rectangle bounds)
bounds
- Desired bounds for this receiver.public void setInput(java.lang.Object input)
input
- New input of this viewer part.public void setSelectedTab(int index)
index
- New tab to set selected.protected void createContents(org.eclipse.swt.widgets.Composite composite)
composite
- Parent composite of this viewer parts's widgets.protected org.eclipse.emf.ecore.EObject findMatchFromElement(org.eclipse.emf.ecore.EObject element)
Match2Elements
containing the given EObject
as its left or right element.
element
- Element we seek the Match2Elements
for.
Match2Elements
containing the given EObject
as its left or right element.protected void fireSelectedtabChanged()
listeners
registered for this viewer part that the tab
selection has been changed.
protected void fireSelectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)
listeners
registered for this viewer part that the user
selection has changed on the properties or tree tab.
event
- Source Selection changed event
of the notification.protected void fireUpdateCenter()
listeners
registered for this viewer part that the
center part needs to be refreshed.
protected void resizeBounds()
protected IModelContentMergeViewerTab createModelContentMergeViewerTab(org.eclipse.swt.widgets.Composite parent)
createPropertiesPart(Composite)
.
parent
- Parent Composite
of the viewer tab that is to be created.
IModelContentMergeViewerTab
that'll be added to the current tab
folder.protected IModelContentMergeViewerTab createModelContentMergeDiffTab(org.eclipse.swt.widgets.Composite parent)
createTreePart(Composite)
.
parent
- Parent Composite
of the viewer tab that is to be created.
IModelContentMergeViewerTab
that'll be added to the current tab
folder.
|
Copyright 2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |