Class AbstractMoveElementHandler

    • Constructor Detail

      • AbstractMoveElementHandler

        public AbstractMoveElementHandler()
    • 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 be null
        positionShift - element position shift, cannot be 0; 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 be null
        newIndexComputer - the computer that computes the new index of the element considering the provided all list elements and the selected elements, cannot be null
        Throws:
        org.eclipse.core.commands.ExecutionException - if execution fails with some reason