Class DtComparisonView
java.lang.Object
org.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
com._1c.g5.v8.dt.compare.ui.editor.DtComparisonView
- All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable
public class DtComparisonView
extends org.eclipse.swt.widgets.Composite
View for DT projects' comparison process.
Contains comparison tree and filter control.
-
Field Summary
Fields inherited from class org.eclipse.swt.widgets.Control
handle -
Constructor Summary
ConstructorsConstructorDescriptionDtComparisonView(org.eclipse.swt.widgets.Composite parent, DtComparisonViewContext context) Creates a new view instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFilter(INamedViewerFilter viewerFilter) Adds the viewer filter.voiddispose()voidexpandToLevel(int level) Expands the comparison tree up to the specified level.org.eclipse.swt.graphics.ColorGets the color for 'node has diffs' case.org.eclipse.swt.graphics.ColorGets the color for 'node has only main object' case.org.eclipse.swt.graphics.ColorGets the color for 'node has only other object' case.Returns the current named viewer filter.Returns the comparison tree control.Gets search adapter.booleanDetermines whether the read-only mode is enabled.voidopenChildComparisonDialog(org.eclipse.jface.dialogs.Dialog childComparisonDialog) Opens the child DT comparison dialog.voidrefresh()Refreshes this view completely.voidrefresh(IPartialModelNode node) Refreshes given node in this view.voidrefresh(Collection<IPartialModelNode> nodesToRefreshWithoutCheckingChildren, Collection<IPartialModelNode> nodesToRefresh) Refreshes the given collection of nodes in this view.voidSets label on ComparisonTreeControl reporting error during comparison.voidResets all tree viewer filters.voidsetComparisonTreeReadyForSearch(boolean isComparisonTreeReady) Sets readiness of the tree to be searched through.voidSets new search mediator for tree view.voidsetFilters(ViewerFilter... filters) Sets the specified filters to the tree view.voidSets the tree viewer input.voidsetReadOnly(boolean value) Sets the read-only mode of the view to the specified value.Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList, toStringMethods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBarMethods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, updateMethods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setDataMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.swt.graphics.Drawable
isAutoScalable
-
Constructor Details
-
DtComparisonView
Creates a new view instance.- Parameters:
parent- the parent composite, can not benullcontext- the view context, can not benull
-
-
Method Details
-
dispose
public void dispose()- Overrides:
disposein classorg.eclipse.swt.widgets.Widget
-
expandToLevel
public void expandToLevel(int level) Expands the comparison tree up to the specified level.- Parameters:
level- the non-negative level
-
getColorHasDiffs
public org.eclipse.swt.graphics.Color getColorHasDiffs()Gets the color for 'node has diffs' case.- Returns:
- the color.
-
getColorOnlyMain
public org.eclipse.swt.graphics.Color getColorOnlyMain()Gets the color for 'node has only main object' case.- Returns:
- the color.
-
getColorOnlyOther
public org.eclipse.swt.graphics.Color getColorOnlyOther()Gets the color for 'node has only other object' case.- Returns:
- the color.
-
refresh
public void refresh(Collection<IPartialModelNode> nodesToRefreshWithoutCheckingChildren, Collection<IPartialModelNode> nodesToRefresh) Refreshes the given collection of nodes in this view. Must be called in the UI thread.- Parameters:
nodesToRefreshWithoutCheckingChildren- the collection of nodes to update their presentation; the structural changes (e.g. addition or removal of children) are not handled; cannot benullnodesToRefresh- the collection of nodes to refresh with handling structural changes (e.g. addition or removal of children), cannot benull
-
refresh
Refreshes given node in this view. This handles structural changes of the given node (e.g. addition or removal of children). Must be called in the UI thread.- Parameters:
node- the partial model node to be refreshed, can not benull
-
refresh
public void refresh()Refreshes this view completely. This handles structural changes of the given node (e.g. addition or removal of children). Must be called in the UI thread. -
reportFailedComparison
public void reportFailedComparison()Sets label on ComparisonTreeControl reporting error during comparison. -
isReadOnly
public boolean isReadOnly()Determines whether the read-only mode is enabled.- Returns:
trueif the read-only mode is enabled andfalseotherwise
-
setReadOnly
public void setReadOnly(boolean value) Sets the read-only mode of the view to the specified value.- Parameters:
value-trueto turn the read-only mode on, andfalseto turn it off
-
setInput
Sets the tree viewer input.- Parameters:
input- the tree viewer input, cannot benull
-
resetFilters
public void resetFilters()Resets all tree viewer filters. -
setFilters
Sets the specified filters to the tree view.- Parameters:
filtes- the filters to set, cannot benull
-
setComparisonTreeSearchEngineMediator
public void setComparisonTreeSearchEngineMediator(ComparisonTreeSearchEngineMediator searchMediator) Sets new search mediator for tree view.- Parameters:
searchMediator- the mediator to be set, cannot benull
-
getTreeControl
Returns the comparison tree control.- Returns:
- the comparison tree control, never
null
-
openChildComparisonDialog
public void openChildComparisonDialog(org.eclipse.jface.dialogs.Dialog childComparisonDialog) Opens the child DT comparison dialog. If the child comparison dialog is instanceofIDtComparisonViewRefresher, then this view refreshes it when the partial model is changing.- Parameters:
childComparisonDialog- the child comparison dialog, cannot benull
-
getCurrentNamedViewerFilter
Returns the current named viewer filter.- Returns:
- the current named viewer filter, never
null
-
addFilter
Adds the viewer filter.- Parameters:
viewerFilter- the viewer filter to add, cannot benull
-
setComparisonTreeReadyForSearch
public void setComparisonTreeReadyForSearch(boolean isComparisonTreeReady) Sets readiness of the tree to be searched through.- Parameters:
isComparisonTreeReady- the readiness of tree to be used for searching
-
getTreeSearchEngineMediator
Gets search adapter.- Parameters:
allowEmptySearch- flag indicating whether search over empty container is allowed for this view- Returns:
- the search mediator, may be
nullif search not supported for this view orallowEmptySearch == falseand no md nodes are present in tree
-