Class AbstractMoveElementHandler
- java.lang.Object
-
- org.eclipse.core.commands.common.EventManager
-
- org.eclipse.core.commands.AbstractHandler
-
- com._1c.g5.v8.dt.ui.commands.list.AbstractListElementHandler
-
- com._1c.g5.v8.dt.ui.commands.list.AbstractMoveElementHandler
-
- All Implemented Interfaces:
org.eclipse.core.commands.IHandler
,org.eclipse.core.commands.IHandler2
- Direct Known Subclasses:
MoveDownElementHandler
,MoveToBottomElementHandler
,MoveToElementHandler
,MoveToTopElementHandler
,MoveUpElementHandler
public abstract class AbstractMoveElementHandler extends AbstractListElementHandler
Abstract handler that moves list element on the specifiedpositionShift
or tonewPosition
.Handler supports:
- BM objects move, then objects will be moved using BM editing support.
- EMF objects move, then objects will be moved only in terms of EMF objects, through EMF commands.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interface
AbstractMoveElementHandler.IListElementIndexComputer
The new list element index computer.
-
Constructor Summary
Constructors Constructor Description AbstractMoveElementHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
moveElements(org.eclipse.core.commands.ExecutionEvent event, AbstractMoveElementHandler.IListElementIndexComputer newIndexComputer)
Moves selected elements according to the provided new index computer.protected void
shiftElements(org.eclipse.core.commands.ExecutionEvent event, int positionShift)
Shifts selected elements on the specified position shift.-
Methods inherited from class com._1c.g5.v8.dt.ui.commands.list.AbstractListElementHandler
findReference, getContainingFeature, getContainingFeature, getContainingList, getElementContainer, getSelectedElement, getSelectedElementContainer, getSelectedElements, getSelection, setLookupChildren
-
Methods inherited from class org.eclipse.core.commands.AbstractHandler
addHandlerListener, dispose, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener, setBaseEnabled, setEnabled
-
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
-
-
-
-
Method Detail
-
shiftElements
protected void shiftElements(org.eclipse.core.commands.ExecutionEvent event, int positionShift) throws org.eclipse.core.commands.ExecutionException
Shifts selected elements on the specified position shift.- Parameters:
event
- the handler execution event, cannot benull
positionShift
- element position shift, cannot be0
; positive values means position shift down (closer to list last element) and negative values means position shift up (closer to list first element)- Throws:
org.eclipse.core.commands.ExecutionException
- if execution fails with some reason
-
moveElements
protected void moveElements(org.eclipse.core.commands.ExecutionEvent event, AbstractMoveElementHandler.IListElementIndexComputer newIndexComputer) throws org.eclipse.core.commands.ExecutionException
Moves selected elements according to the provided new index computer.- Parameters:
event
- the handler execution event, cannot benull
newIndexComputer
- the computer that computes the new index of the element considering the provided all list elements and the selected elements, cannot benull
- Throws:
org.eclipse.core.commands.ExecutionException
- if execution fails with some reason
-
-