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
for elements that cannot have children, or have a fixed list of children.
,
for elements that have addable/removable children.
Modifier and Type | Field and Description |
---|---|
static short |
MOVE_HINT_CAN_PASTE
Deprecated.
|
static short |
MOVE_HINT_MOVING_DOWN
Deprecated.
|
static short |
MOVE_HINT_MOVING_NOOP
Deprecated.
|
static short |
MOVE_HINT_MOVING_UP
Deprecated.
|
static short |
REPARENTING_MODE_MOVING
Deprecated.
|
static short |
REPARENTING_MODE_NORMAL
Deprecated.
|
Constructor and Description |
---|
ExtActionHandler()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected String |
_T(String t)
Deprecated.
|
protected boolean |
askToMove(String propAsk,
String propMove,
String key)
Deprecated.
|
boolean |
canAddChildren(com.ibm.rational.common.test.editor.framework.change.IAddChangeContext context,
com.ibm.rational.common.test.editor.framework.change.IAddedElementDescriptor descriptor)
Deprecated.
|
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) . |
boolean |
canMove(CBActionElement element,
com.ibm.rational.common.test.editor.framework.change.ILocalMoveContext moveContext)
Deprecated.
|
boolean |
canMoveDown(CBActionElement element)
Deprecated.
|
boolean |
canMoveUp(CBActionElement element)
Deprecated.
|
boolean |
canRemove(CBActionElement element,
com.ibm.rational.common.test.editor.framework.change.IRemoveChangeContext context)
Deprecated.
|
boolean |
canRemove(IStructuredSelection ssel)
Deprecated.
|
abstract CBActionElement |
createNew(CBActionElement parent)
Deprecated.
|
CBActionElement |
createNew(com.ibm.rational.common.test.editor.framework.change.IAddChangeContext context)
Deprecated.
|
void |
dispose()
Deprecated.
|
boolean |
doCopy(Control focusControl,
com.ibm.rational.common.test.editor.framework.ccp.provisional.CopyOperation op)
Deprecated.
|
boolean |
doCopy(Control focusControl,
ISelection selection)
Deprecated.
|
boolean |
doCut(Control focusControl,
com.ibm.rational.common.test.editor.framework.ccp.provisional.CutOperation op)
Deprecated.
|
boolean |
doCut(Control focusControl,
ISelection selection)
Deprecated.
|
boolean |
doDelete(Control focusControl,
ISelection selection)
Deprecated.
|
boolean |
doMoveDown(IStructuredSelection ssel)
Deprecated.
|
boolean |
doMoveUp(IStructuredSelection ssel)
Deprecated.
|
boolean |
doPaste(Control focusControl,
com.ibm.rational.common.test.editor.framework.change.ICopiedElementDescriptor descriptor)
Deprecated.
|
boolean |
doPaste(Control focusControl,
String text)
Deprecated.
|
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.
|
boolean |
doSelectAll(Control focusControl)
Deprecated.
|
boolean |
doSelectAll(Control focusControl,
Clipboard clipboard)
Deprecated.
|
void |
flushCachedData()
Deprecated.
|
short |
getChildValidationMode()
Deprecated.
|
String |
getMode()
Deprecated.
|
short |
getMovingHint()
Deprecated.
|
IStructuredSelection |
getSelection()
Deprecated.
Information about the current selection is now provided through the context
argument of various methods.
|
TestEditor |
getTestEditor()
Deprecated.
|
void |
init(com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITestEditorExtensionContext context)
Deprecated.
|
boolean |
isAddMode()
Deprecated.
|
boolean |
isCopyEnabled(Control focusControl,
ISelection selection)
Deprecated.
|
boolean |
isCutEnabled(Control focusControl,
ISelection selection)
Deprecated.
|
boolean |
isDeleteEnabled(Control focusControl,
ISelection selection)
Deprecated.
|
boolean |
isEqualType(String otherType)
Deprecated.
|
boolean |
isInsertMode()
Deprecated.
|
boolean |
isPasteEnabled(Control focusControl,
com.ibm.rational.common.test.editor.framework.change.ICopiedElementDescriptor descriptor)
Deprecated.
|
boolean |
isPasteEnabled(Control focusControl,
String text)
Deprecated.
|
boolean |
isSelectAllEnabled(Control focusControl)
Deprecated.
|
boolean |
isStatic(CBActionElement element)
Deprecated.
|
boolean |
isValidChild(CBActionElement element,
String childType)
Deprecated.
|
boolean |
isValidChild(String type)
Deprecated.
|
boolean |
isValidParent(CBActionElement element)
Deprecated.
|
boolean |
isValidParent2(CBActionElement element)
Deprecated.
|
boolean |
moveChildren(CBActionElement fromParent,
CBActionElement toParent,
IStructuredSelection ssel,
int position)
Deprecated.
|
protected boolean |
promptToKeepChildren(CBActionElement parent,
int position,
CBActionElement removeObject,
List children1,
List children2)
Deprecated.
This method is no longer called
|
protected void |
relocateChildren(CBActionElement newParent,
List<CBActionElement> sourceList,
int position)
Deprecated.
|
void |
relocateChildren2(CBActionElement newParent,
List<CBActionElement> sourceList,
int position)
Deprecated.
|
short |
setChildValidationMode(short mode)
Deprecated.
|
void |
setInitializationData(IConfigurationElement config,
String propertyName,
Object data)
Deprecated.
|
void |
setMode(String mode)
Deprecated.
|
void |
setMovingHint(short movingHint)
Deprecated.
|
void |
setSelection(IStructuredSelection structuredSelection)
Deprecated.
Information about the current selection is now provided through the context
argument of various methods.
|
void |
setTestEditor(TestEditor testEditor)
Deprecated.
|
List |
sortTreeSelection(List selectedElements,
CBActionElement parent)
Deprecated.
|
Object[] |
sortTreeSelection(Object[] selectedElements,
List list)
Deprecated.
|
protected boolean |
validateReparenting(CBActionElement toParent,
CBActionElement fromParent,
int position,
List elements1,
List elements2)
Deprecated.
|
boolean |
validateReparentingForMove(CBActionElement toParent,
CBActionElement fromParent,
int position,
List elements1,
List elements2)
Deprecated.
|
protected boolean |
warning(PluginHelper ph,
String key,
CBActionElement toParent,
CBActionElement fromParent)
Deprecated.
|
addChildren, addChildren, canCaptureSelectedElementsUponInsert, canKeepOrphans, canRemoveChildren, getCaptureSelectedElementsOperation, getCaptureSelectedElementUponInsertPreferenceKey, getCaptureSelectedElementUponInsertQuestion, getKeepOrphansChange, getPostAddChange, getPreRemoveChange, pasteChildren, removeChildren
canAddSibling, canCopy, canCut, doDoubleClick, getContext, getEditor, isHandledType
public static final short MOVE_HINT_MOVING_NOOP
public static final short MOVE_HINT_MOVING_DOWN
public static final short MOVE_HINT_MOVING_UP
public static final short MOVE_HINT_CAN_PASTE
public static final short REPARENTING_MODE_NORMAL
public static final short REPARENTING_MODE_MOVING
public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException
setInitializationData
in interface IExecutableExtension
CoreException
public void init(com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITestEditorExtensionContext context)
init
in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.IActionHandler
init
in class com.ibm.rational.common.test.editor.framework.extensions.BaseActionHandler
@Deprecated public boolean doMoveDown(IStructuredSelection ssel)
IContainerActionHandler.addChildren(IAddChangeContext, ICopiedElementDescriptor)
@Deprecated public boolean doMoveUp(IStructuredSelection ssel)
IContainerActionHandler.addChildren(IAddChangeContext, ICopiedElementDescriptor)
@Deprecated public TestEditor getTestEditor()
BaseActionHandler.getEditor()
@Deprecated public void setTestEditor(TestEditor testEditor)
testEditor
- The testEditor to set.ExtActionHandler.init(ITestEditorExtensionContext)
public boolean canRemove(CBActionElement element, com.ibm.rational.common.test.editor.framework.change.IRemoveChangeContext context)
canRemove
in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.IActionHandler
canRemove
in class com.ibm.rational.common.test.editor.framework.extensions.BaseActionHandler
@Deprecated public boolean canRemove(IStructuredSelection ssel)
actionHandler
s 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.IStructuredSelection
- elements selected in the Editor Tree. The selection contains at least one element that matches
the declared type of this handler.true
if the selected elements can be removed. false
if at least one of the elements
cannot be removed.ExtActionHandler.canRemove(CBActionElement, IRemoveChangeContext)
,
IContainerActionHandler.canRemoveChildren(CBActionElement, IRemoveChangeContext)
@Deprecated public boolean doRemove(List<CBActionElement> ssel)
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.
doRemove
in interface com.ibm.rational.common.test.editor.framework.extensions.ILegacyActionHandler
ssel
- List. List of selected model elements to be deleted.true
if at least one element was deleted by this handler, false
otherwise.IContainerActionHandler.removeChildren(CBActionElement, IRemoveChangeContext)
,
BaseContainerActionHandler.getPreRemoveChange(IRemoveChangeContext)
public CBActionElement createNew(com.ibm.rational.common.test.editor.framework.change.IAddChangeContext context)
createNew
in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.IActionHandler
@Deprecated public abstract CBActionElement createNew(CBActionElement parent)
CBActionElement
- parentExtActionHandler.createNew(IAddChangeContext)
@Deprecated protected void relocateChildren(CBActionElement newParent, List<CBActionElement> sourceList, int position)
ExtActionHandler.doRemove(List)
.BaseContainerActionHandler.canKeepOrphans(com.ibm.rational.common.test.editor.framework.change.IRemoveChangeContext)
,
BaseContainerActionHandler.getKeepOrphansChange(com.ibm.rational.common.test.editor.framework.change.IRemoveChangeContext)
@Deprecated public void relocateChildren2(CBActionElement newParent, List<CBActionElement> sourceList, int position)
ExtActionHandler.doRemove(List)
.BaseContainerActionHandler.canKeepOrphans(com.ibm.rational.common.test.editor.framework.change.IRemoveChangeContext)
,
BaseContainerActionHandler.getKeepOrphansChange(com.ibm.rational.common.test.editor.framework.change.IRemoveChangeContext)
@Deprecated public boolean canMoveDown(CBActionElement element)
@Deprecated public boolean canMoveUp(CBActionElement element)
public boolean canMove(CBActionElement element, com.ibm.rational.common.test.editor.framework.change.ILocalMoveContext moveContext)
canMove
in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.IActionHandler
canMove
in class com.ibm.rational.common.test.editor.framework.extensions.BaseActionHandler
public void dispose()
dispose
in interface IDisposable
dispose
in class com.ibm.rational.common.test.editor.framework.extensions.BaseActionHandler
@Deprecated public void flushCachedData()
ExtActionHandler.dispose()
@Deprecated public void setSelection(IStructuredSelection structuredSelection)
@Deprecated public IStructuredSelection getSelection()
@Deprecated public Object[] sortTreeSelection(Object[] selectedElements, List list)
selectedElements
- list
- ActionHandlerUtil.sortTreeSelection(Object[], List)
@Deprecated public List sortTreeSelection(List selectedElements, CBActionElement parent)
selectedElements
- Listparent
- CBActionElementActionHandlerUtil.sortTreeSelection(java.util.Collection, CBActionElement, TestEditor)
@Deprecated protected boolean askToMove(String propAsk, String propMove, String key)
propAsk
- propMove
- key
- protected boolean promptToKeepChildren(CBActionElement parent, int position, CBActionElement removeObject, List children1, List children2)
parent
- Parent of an object being removed.position
- position (zero-based index) of the removeObject
in its parent's children list.removeObject
- object being deletedchildren1
- List of children to reparentchildren2
- (optional) Second list of children to reparent, or null
.if( removeObject instanceof CBBlock ) { CBBlock asBlock = (CBBlock)removeObject; return asBlock.isControlBlock(); } return false;
#canKeepOrphans(CBActionElement)
,
BaseContainerActionHandler.getKeepOrphansChange(com.ibm.rational.common.test.editor.framework.change.IRemoveChangeContext)
@Deprecated public String getMode()
@Deprecated public void setMode(String mode)
mode
- The mode to set.ExtActionHandler.canAddUnder(IAddChangeContext, IAddedElementDescriptor)
,
ExtActionHandler.createNew(IAddChangeContext)
@Deprecated public boolean isAddMode()
@Deprecated public boolean isInsertMode()
@Deprecated protected boolean validateReparenting(CBActionElement toParent, CBActionElement fromParent, int position, List elements1, List elements2)
#getRelocateOrphansOperation(CBActionElement, CBActionElement, int, List)
@Deprecated public boolean validateReparentingForMove(CBActionElement toParent, CBActionElement fromParent, int position, List elements1, List elements2)
#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.#canAddChildren(CBActionElement, int, IAddedElementDescriptor)
protected boolean warning(PluginHelper ph, String key, CBActionElement toParent, CBActionElement fromParent)
@Deprecated public boolean moveChildren(CBActionElement fromParent, CBActionElement toParent, IStructuredSelection ssel, int position)
#isCaptureSelectedElementsUponInsert(CBActionElement, List)
for checking whether elements should be moved, and #pasteChildren(CBActionElement, int, ICopiedElementDescriptor)
for performing the move.IContainerActionHandler#isCaptureSelectedElementsUponInsert(CBActionElement, List)
@Deprecated public boolean isValidChild(String type)
public boolean canAddChildren(com.ibm.rational.common.test.editor.framework.change.IAddChangeContext context, com.ibm.rational.common.test.editor.framework.change.IAddedElementDescriptor descriptor)
canAddChildren
in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.IContainerActionHandler
canAddChildren
in class com.ibm.rational.common.test.editor.framework.extensions.BaseContainerActionHandler
@Deprecated public boolean isValidChild(CBActionElement element, String childType)
@Deprecated protected String _T(String t)
@Deprecated public final boolean isEqualType(String otherType)
BaseActionHandler.isHandledType(String)
@Deprecated public boolean doCopy(Control focusControl, com.ibm.rational.common.test.editor.framework.ccp.provisional.CopyOperation op)
doCopy
in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.IGlobalActionsHandler
BaseActionHandler.canCopy(CBActionElement)
@Deprecated public boolean doCut(Control focusControl, com.ibm.rational.common.test.editor.framework.ccp.provisional.CutOperation op)
doCut
in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.IGlobalActionsHandler
BaseActionHandler.canCut(CBActionElement)
@Deprecated public boolean doDelete(Control focusControl, ISelection selection)
doDelete
in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITextGlobalActionHandler
ExtActionHandler.doRemove(List)
@Deprecated public boolean doPaste(Control focusControl, com.ibm.rational.common.test.editor.framework.change.ICopiedElementDescriptor descriptor)
doPaste
in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.IGlobalActionsHandler
BaseContainerActionHandler.pasteChildren(CBEdit, int, ICopiedElementDescriptor)
@Deprecated public boolean doSelectAll(Control focusControl, Clipboard clipboard)
doSelectAll
in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITextGlobalActionHandler
@Deprecated public boolean isCopyEnabled(Control focusControl, ISelection selection)
BaseActionHandler.canCopy(CBActionElement)
isCopyEnabled
in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITextGlobalActionHandler
@Deprecated public boolean isCutEnabled(Control focusControl, ISelection selection)
isCutEnabled
in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITextGlobalActionHandler
BaseActionHandler.canCut(CBActionElement)
@Deprecated public boolean isDeleteEnabled(Control focusControl, ISelection selection)
isDeleteEnabled
in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITextGlobalActionHandler
ExtActionHandler.canRemove(IStructuredSelection)
@Deprecated public boolean isPasteEnabled(Control focusControl, com.ibm.rational.common.test.editor.framework.change.ICopiedElementDescriptor descriptor)
isPasteEnabled
in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.IGlobalActionsHandler
ExtActionHandler.canAddChildren(IAddChangeContext, IAddedElementDescriptor)
@Deprecated public boolean isSelectAllEnabled(Control focusControl)
isSelectAllEnabled
in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITextGlobalActionHandler
@Deprecated public boolean doCopy(Control focusControl, ISelection selection)
doCopy
in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITextGlobalActionHandler
@Deprecated public boolean doCut(Control focusControl, ISelection selection)
doCut
in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITextGlobalActionHandler
@Deprecated public boolean doPaste(Control focusControl, String text)
doPaste
in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITextGlobalActionHandler
@Deprecated public boolean doSelectAll(Control focusControl)
doSelectAll
in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITextGlobalActionHandler
@Deprecated public boolean isPasteEnabled(Control focusControl, String text)
isPasteEnabled
in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITextGlobalActionHandler
@Deprecated public boolean isValidParent2(CBActionElement element)
true
@Deprecated public short getMovingHint()
ExtActionHandler.canAddChildren(IAddChangeContext, IAddedElementDescriptor)
,
BaseContainerActionHandler.addChildren(IAddChangeContext, ICopiedElementDescriptor)
,
ExtActionHandler.canMove(CBActionElement, ILocalMoveContext)
@Deprecated public void setMovingHint(short movingHint)
ExtActionHandler.canAddChildren(IAddChangeContext, IAddedElementDescriptor)
,
BaseContainerActionHandler.addChildren(IAddChangeContext, ICopiedElementDescriptor)
,
ExtActionHandler.canMove(CBActionElement, ILocalMoveContext)
@Deprecated public short setChildValidationMode(short mode)
ExtActionHandler.canAddChildren(IAddChangeContext, IAddedElementDescriptor)
,
BaseContainerActionHandler.addChildren(IAddChangeContext, ICopiedElementDescriptor)
,
ExtActionHandler.canMove(CBActionElement, ILocalMoveContext)
@Deprecated public short getChildValidationMode()
ExtActionHandler.canAddChildren(IAddChangeContext, IAddedElementDescriptor)
,
BaseContainerActionHandler.addChildren(IAddChangeContext, ICopiedElementDescriptor)
,
ExtActionHandler.canMove(CBActionElement, ILocalMoveContext)
@Deprecated public boolean isStatic(CBActionElement element)
false
when the context has a
type
equal to IAddChangeContext.ContextType#MOVE
.element
- @Deprecated public boolean isValidParent(CBActionElement element)
ExtActionHandler.canAddUnder(IAddChangeContext, IAddedElementDescriptor)
, so it it
not necessary to implement it if the latter method is overridden.false
, so one must override to allow
insertion of elements handled by this handler, unless #canAddUnder(IAddChangeContext)
is overridden.element
- ExtActionHandler.canAddUnder(IAddChangeContext, IAddedElementDescriptor)
public boolean canAddUnder(com.ibm.rational.common.test.editor.framework.change.IAddChangeContext context, com.ibm.rational.common.test.editor.framework.change.IAddedElementDescriptor addedElementDesc)
ExtActionHandler.isValidParent(CBActionElement)
. Override
if the return value should depend on position.canAddUnder
in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.IActionHandler
canAddUnder
in class com.ibm.rational.common.test.editor.framework.extensions.BaseActionHandler
© Copyright IBM Corp. 2013. All rights reserved.