com.ibm.rational.common.test.editor.framework.extensions

Class ExtActionHandler

  • java.lang.Object
    • com.ibm.rational.common.test.editor.framework.extensions.BaseActionHandler
      • com.ibm.rational.common.test.editor.framework.extensions.BaseContainerActionHandler
        • com.ibm.rational.common.test.editor.framework.extensions.ExtActionHandler
  • All Implemented Interfaces:
    com.ibm.rational.common.test.editor.framework.extensions.ILegacyActionHandler, com.ibm.rational.common.test.editor.framework.kernel.interfaces.IActionHandler, com.ibm.rational.common.test.editor.framework.kernel.interfaces.IContainerActionHandler, com.ibm.rational.common.test.editor.framework.kernel.interfaces.IGlobalActionsHandler, com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITextGlobalActionHandler, com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITreeSectionActions, IExecutableExtension, IDisposable

    Deprecated.

    public abstract class ExtActionHandler
    extends com.ibm.rational.common.test.editor.framework.extensions.BaseContainerActionHandler
    implements IExecutableExtension, com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITreeSectionActions, com.ibm.rational.common.test.editor.framework.kernel.interfaces.IGlobalActionsHandler, com.ibm.rational.common.test.editor.framework.extensions.ILegacyActionHandler
    See Also:
    for elements that cannot have children, or have a fixed list of children., for elements that have addable/removable children.
    • Field Detail

      • MOVE_HINT_MOVING_NOOP

        public static final short MOVE_HINT_MOVING_NOOP
        Deprecated. 
      • MOVE_HINT_MOVING_DOWN

        public static final short MOVE_HINT_MOVING_DOWN
        Deprecated. 
      • MOVE_HINT_MOVING_UP

        public static final short MOVE_HINT_MOVING_UP
        Deprecated. 
      • MOVE_HINT_CAN_PASTE

        public static final short MOVE_HINT_CAN_PASTE
        Deprecated. 
      • REPARENTING_MODE_NORMAL

        public static final short REPARENTING_MODE_NORMAL
        Deprecated. 
      • REPARENTING_MODE_MOVING

        public static final short REPARENTING_MODE_MOVING
        Deprecated. 
    • Constructor Detail

      • ExtActionHandler

        public ExtActionHandler()
        Deprecated. 
    • Method Detail

      • init

        public void init(com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITestEditorExtensionContext context)
        Deprecated. 
        Specified by:
        init in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.IActionHandler
        Overrides:
        init in class com.ibm.rational.common.test.editor.framework.extensions.BaseActionHandler
      • doMoveDown

        @Deprecated
        public boolean doMoveDown(IStructuredSelection ssel)
        Deprecated. 
        Move up/down is now handled by the action handler of the parent of the moved elements.
        See Also:
        IContainerActionHandler.addChildren(IAddChangeContext, ICopiedElementDescriptor)
      • doMoveUp

        @Deprecated
        public boolean doMoveUp(IStructuredSelection ssel)
        Deprecated. 
        Move up/down is now handled by the action handler of the parent of the moved elements.
        See Also:
        IContainerActionHandler.addChildren(IAddChangeContext, ICopiedElementDescriptor)
      • getTestEditor

        @Deprecated
        public TestEditor getTestEditor()
        Deprecated. 
        Returns:
        Returns the testEditor.
        See Also:
        BaseActionHandler.getEditor()
      • canRemove

        public boolean canRemove(CBActionElement element,
                        com.ibm.rational.common.test.editor.framework.change.IRemoveChangeContext context)
        Deprecated. 
        Specified by:
        canRemove in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.IActionHandler
        Overrides:
        canRemove in class com.ibm.rational.common.test.editor.framework.extensions.BaseActionHandler
      • canRemove

        @Deprecated
        public boolean canRemove(IStructuredSelection ssel)
        Deprecated. 
        This method is called by editor when the selection in the Editor Test Tree changes. If all actionHandlers of all selected elements return true then the "Remove" button will be enabled. If at least one handler returns false, the "Remove" button will be disabled. This method should process only elements with type that match the handler's declared type and skip over other elements. Other handlers will be called for elements with other types. This implementation always return true. Override to prevent removal of elements of the type handled by this handler. Note that the framework guarantees that this method will only be called if the selection contains at least one element of the handled type.
        Parameters:
        IStructuredSelection - elements selected in the Editor Tree. The selection contains at least one element that matches the declared type of this handler.
        Returns:
        true if the selected elements can be removed. false if at least one of the elements cannot be removed.
        See Also:
        ExtActionHandler.canRemove(CBActionElement, IRemoveChangeContext), IContainerActionHandler.canRemoveChildren(CBActionElement, IRemoveChangeContext)
      • doRemove

        @Deprecated
        public boolean doRemove(List<CBActionElement> ssel)
        Deprecated. Removal is now handled by the parent. To perform specific actions on the removed element before it is deleted, use the pre remove change method.
        This implementation removes selected elements, from their parents' children lists.

        If this behavior is undesired, or if the content provider of the parent of the deleted element does not return its children in EMF Elist, and the model element is removable, then you must override this method.
        If the children list is not an EMF EList, then @see com.ibm.rational.common.test.editor.framework.extensions.ICoreObjectContainerActionHandler: when the IActionHandler associated to the parent is also a ICoreObjectContainerActionHandler, then doRemove is called to actually remove this element from the parent children list in the extension's model.

        Delete only those elements in the selection, which type equals to the type of your action handler.

        Specified by:
        doRemove in interface com.ibm.rational.common.test.editor.framework.extensions.ILegacyActionHandler
        Parameters:
        ssel - List. List of selected model elements to be deleted.
        Returns:
        boolean. true if at least one element was deleted by this handler, false otherwise.
        See Also:
        IContainerActionHandler.removeChildren(CBActionElement, IRemoveChangeContext), BaseContainerActionHandler.getPreRemoveChange(IRemoveChangeContext)
      • createNew

        public CBActionElement createNew(com.ibm.rational.common.test.editor.framework.change.IAddChangeContext context)
        Deprecated. 
        Specified by:
        createNew in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.IActionHandler
      • relocateChildren

        @Deprecated
        protected void relocateChildren(CBActionElement newParent,
                                       List<CBActionElement> sourceList,
                                       int position)
        Deprecated. 
        This method is no more called by ExtActionHandler.doRemove(List).
        See Also:
        BaseContainerActionHandler.canKeepOrphans(com.ibm.rational.common.test.editor.framework.change.IRemoveChangeContext), BaseContainerActionHandler.getKeepOrphansChange(com.ibm.rational.common.test.editor.framework.change.IRemoveChangeContext)
      • relocateChildren2

        @Deprecated
        public void relocateChildren2(CBActionElement newParent,
                                        List<CBActionElement> sourceList,
                                        int position)
        Deprecated. 
        This method is no more called by ExtActionHandler.doRemove(List).
        See Also:
        BaseContainerActionHandler.canKeepOrphans(com.ibm.rational.common.test.editor.framework.change.IRemoveChangeContext), BaseContainerActionHandler.getKeepOrphansChange(com.ibm.rational.common.test.editor.framework.change.IRemoveChangeContext)
      • canMove

        public boolean canMove(CBActionElement element,
                      com.ibm.rational.common.test.editor.framework.change.ILocalMoveContext moveContext)
        Deprecated. 
        Specified by:
        canMove in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.IActionHandler
        Overrides:
        canMove in class com.ibm.rational.common.test.editor.framework.extensions.BaseActionHandler
      • dispose

        public void dispose()
        Deprecated. 
        Specified by:
        dispose in interface IDisposable
        Overrides:
        dispose in class com.ibm.rational.common.test.editor.framework.extensions.BaseActionHandler
      • flushCachedData

        @Deprecated
        public void flushCachedData()
        Deprecated. 
        Since RPT 8.5 a provider can no longer be reused from an editor to another.
        See Also:
        ExtActionHandler.dispose()
      • setSelection

        @Deprecated
        public void setSelection(IStructuredSelection structuredSelection)
        Deprecated. Information about the current selection is now provided through the context argument of various methods.
      • getSelection

        @Deprecated
        public IStructuredSelection getSelection()
        Deprecated. Information about the current selection is now provided through the context argument of various methods.
        Returns:
        Returns the selection.
      • sortTreeSelection

        @Deprecated
        public Object[] sortTreeSelection(Object[] selectedElements,
                                            List list)
        Deprecated. 
        Sorts an array of elements obtained from MainSection.TreeView. The sort order is the same as the order obtained from the parent's children list.
        Parameters:
        selectedElements -
        list -
        Returns:
        Object[]
        See Also:
        ActionHandlerUtil.sortTreeSelection(Object[], List)
      • sortTreeSelection

        @Deprecated
        public List sortTreeSelection(List selectedElements,
                                        CBActionElement parent)
        Deprecated. 
        Sorts an array of elements obtained from MainSection.TreeView. The sort order is the same as the order obtained from the parent's children list.
        Parameters:
        selectedElements - List
        parent - CBActionElement
        Returns:
        List
        See Also:
        ActionHandlerUtil.sortTreeSelection(java.util.Collection, CBActionElement, TestEditor)
      • askToMove

        @Deprecated
        protected boolean askToMove(String propAsk,
                                   String propMove,
                                   String key)
        Deprecated. 
        Parameters:
        propAsk -
        propMove -
        key -
        Returns:
        boolean
      • promptToKeepChildren

        protected boolean promptToKeepChildren(CBActionElement parent,
                                   int position,
                                   CBActionElement removeObject,
                                   List children1,
                                   List children2)
        Deprecated. This method is no longer called
        Parameters:
        parent - Parent of an object being removed.
        position - position (zero-based index) of the removeObject in its parent's children list.
        removeObject - object being deleted
        children1 - List of children to reparent
        children2 - (optional) Second list of children to reparent, or null.
        Returns:
        boolean
           if( removeObject instanceof CBBlock )
           {
               CBBlock asBlock = (CBBlock)removeObject;
               return asBlock.isControlBlock();
           }
           return false;
         
        See Also:
        #canKeepOrphans(CBActionElement), BaseContainerActionHandler.getKeepOrphansChange(com.ibm.rational.common.test.editor.framework.change.IRemoveChangeContext)
      • validateReparenting

        @Deprecated
        protected boolean validateReparenting(CBActionElement toParent,
                                             CBActionElement fromParent,
                                             int position,
                                             List elements1,
                                             List elements2)
        Deprecated. 
        This method is no more called by the framework.
        See Also:
        #getRelocateOrphansOperation(CBActionElement, CBActionElement, int, List)
      • validateReparentingForMove

        @Deprecated
        public boolean validateReparentingForMove(CBActionElement toParent,
                                                    CBActionElement fromParent,
                                                    int position,
                                                    List elements1,
                                                    List elements2)
        Deprecated. 
        This method is not used any more. It is replaced by the more generic method #canAddChildren(CBActionElement, int, IAddedElementDescriptor) with descriptor instance of ICopiedElementDescriptor, called on the handler associated to toParent. It is not called any more by the framework.
        See Also:
        #canAddChildren(CBActionElement, int, IAddedElementDescriptor)
      • moveChildren

        @Deprecated
        public boolean moveChildren(CBActionElement fromParent,
                                      CBActionElement toParent,
                                      IStructuredSelection ssel,
                                      int position)
        Deprecated. 
        This method is not called any more. It is not called any more by the framework. It is partially replaced with #isCaptureSelectedElementsUponInsert(CBActionElement, List) for checking whether elements should be moved, and #pasteChildren(CBActionElement, int, ICopiedElementDescriptor) for performing the move.
        See Also:
        IContainerActionHandler#isCaptureSelectedElementsUponInsert(CBActionElement, List)
      • canAddChildren

        public boolean canAddChildren(com.ibm.rational.common.test.editor.framework.change.IAddChangeContext context,
                             com.ibm.rational.common.test.editor.framework.change.IAddedElementDescriptor descriptor)
        Deprecated. 
        Specified by:
        canAddChildren in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.IContainerActionHandler
        Overrides:
        canAddChildren in class com.ibm.rational.common.test.editor.framework.extensions.BaseContainerActionHandler
      • isEqualType

        @Deprecated
        public final boolean isEqualType(String otherType)
        Deprecated. 
        Returns:
        See Also:
        BaseActionHandler.isHandledType(String)
      • doCopy

        @Deprecated
        public boolean doCopy(Control focusControl,
                                com.ibm.rational.common.test.editor.framework.ccp.provisional.CopyOperation op)
        Deprecated. 
        This method was not called and is now deprecated.
        Specified by:
        doCopy in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.IGlobalActionsHandler
        See Also:
        BaseActionHandler.canCopy(CBActionElement)
      • doCut

        @Deprecated
        public boolean doCut(Control focusControl,
                               com.ibm.rational.common.test.editor.framework.ccp.provisional.CutOperation op)
        Deprecated. 
        This method was not called and is now deprecated.
        Specified by:
        doCut in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.IGlobalActionsHandler
        See Also:
        BaseActionHandler.canCut(CBActionElement)
      • doPaste

        @Deprecated
        public boolean doPaste(Control focusControl,
                                 com.ibm.rational.common.test.editor.framework.change.ICopiedElementDescriptor descriptor)
        Deprecated. 
        Specified by:
        doPaste in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.IGlobalActionsHandler
        See Also:
        BaseContainerActionHandler.pasteChildren(CBEdit, int, ICopiedElementDescriptor)
      • doSelectAll

        @Deprecated
        public boolean doSelectAll(Control focusControl,
                                     Clipboard clipboard)
        Deprecated. 
        This method was not called and is now deprecated.
        Specified by:
        doSelectAll in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITextGlobalActionHandler
      • isCopyEnabled

        @Deprecated
        public boolean isCopyEnabled(Control focusControl,
                                       ISelection selection)
        Deprecated. 
        BaseActionHandler.canCopy(CBActionElement)
        Specified by:
        isCopyEnabled in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITextGlobalActionHandler
      • isCutEnabled

        @Deprecated
        public boolean isCutEnabled(Control focusControl,
                                      ISelection selection)
        Deprecated. 
        Specified by:
        isCutEnabled in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITextGlobalActionHandler
        See Also:
        BaseActionHandler.canCut(CBActionElement)
      • isSelectAllEnabled

        @Deprecated
        public boolean isSelectAllEnabled(Control focusControl)
        Deprecated. 
        This method was not called and is now deprecated.
        Specified by:
        isSelectAllEnabled in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITextGlobalActionHandler
      • doCopy

        @Deprecated
        public boolean doCopy(Control focusControl,
                                ISelection selection)
        Deprecated. 
        This method was not called and is now deprecated.
        Specified by:
        doCopy in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITextGlobalActionHandler
      • doCut

        @Deprecated
        public boolean doCut(Control focusControl,
                               ISelection selection)
        Deprecated. 
        This method was not called and is now deprecated.
        Specified by:
        doCut in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITextGlobalActionHandler
      • doPaste

        @Deprecated
        public boolean doPaste(Control focusControl,
                                 String text)
        Deprecated. 
        This method was not called and is now deprecated.
        Specified by:
        doPaste in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITextGlobalActionHandler
      • doSelectAll

        @Deprecated
        public boolean doSelectAll(Control focusControl)
        Deprecated. 
        This method was not called and is now deprecated.
        Specified by:
        doSelectAll in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITextGlobalActionHandler
      • isPasteEnabled

        @Deprecated
        public boolean isPasteEnabled(Control focusControl,
                                        String text)
        Deprecated. 
        This method was not called and is now deprecated.
        Specified by:
        isPasteEnabled in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITextGlobalActionHandler
      • isStatic

        @Deprecated
        public boolean isStatic(CBActionElement element)
        Deprecated. 
        This method is no longer called. Equivalent function can be achieved by implementing #canAddUnder() and returning false when the context has a type equal to IAddChangeContext.ContextType#MOVE.
        Parameters:
        element -
        Returns:
      • canAddUnder

        public boolean canAddUnder(com.ibm.rational.common.test.editor.framework.change.IAddChangeContext context,
                          com.ibm.rational.common.test.editor.framework.change.IAddedElementDescriptor addedElementDesc)
        Deprecated. 
        This implementation simply calls ExtActionHandler.isValidParent(CBActionElement). Override if the return value should depend on position.
        Specified by:
        canAddUnder in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.IActionHandler
        Overrides:
        canAddUnder in class com.ibm.rational.common.test.editor.framework.extensions.BaseActionHandler
IBM Rational Performance Tester SDK

© Copyright IBM Corp. 2013. All rights reserved.