public abstract class DataCorrelatingTextAttrField
extends com.ibm.rational.test.lt.testeditor.common.AbstractDataCorrelatingTextAttrField
com.ibm.rational.test.lt.testeditor.common.AbstractDataCorrelatingTextAttrField.HandleContentVpAction, com.ibm.rational.test.lt.testeditor.common.AbstractDataCorrelatingTextAttrField.RemoveAllSubsAction, com.ibm.rational.test.lt.testeditor.common.AbstractDataCorrelatingTextAttrField.StyledTextSearcherDc, com.ibm.rational.test.lt.testeditor.common.AbstractDataCorrelatingTextAttrField.SubstitutionActioncom.ibm.rational.common.test.editor.framework.extensions.TextAttributeField.FieldFindReplaceAction, com.ibm.rational.common.test.editor.framework.extensions.TextAttributeField.FindReplaceAdapter, com.ibm.rational.common.test.editor.framework.extensions.TextAttributeField.StyledTextSearcherACTION_NEXT_RANGE, ACTION_PREV_RANGE, AID_CREATE_FIELD_REF, AID_CREATE_REF, AID_JUMP_TO, AID_REMOVE_ALL_DC, AID_REMOVE_ALL_SUBS, AID_REMOVE_DC, AID_REMOVE_FIELD_REF, AID_SUBST, AID_SUBST_FROM_BLD, AID_SUBST_FROM_DP, AID_SUBST_OTHER, AID_TOGGLE_ENC, GID_NAV_END, GID_NAV_START, GID_REFERENCES_END, GID_REFERENCES_START, GID_SUBST_END, GID_SUBST_START, m_actions, m_findAndSubstituteAction, m_handleContentVpAction, m_isEncodingEnabled, m_isFieldHarvestEnabled, m_isHarvestEnabled, m_isJumpToEnabled, m_isRemoveFieldReferenceEnabled, m_isRemoveReferenceEnabled, m_isRemoveSubstitutorEnabled, m_isSubstitutionEnabled, m_textSearcherm_actionCopy, m_actionCut, m_actionDelete, m_actionPaste, m_actionSelect, m_mmenuID, USE_DEFAULTACTION_GROUP_EDIT_END, ACTION_GROUP_EDIT_START, ACTION_GROUP_FILTERS_END, ACTION_GROUP_FILTERS_START, ACTION_GROUP_FIND_END, ACTION_GROUP_FIND_START, ACTION_GROUP_GOTO_END, ACTION_GROUP_GOTO_START, ACTION_GROUP_MODIFY_CONTRIBUTIONS_END, ACTION_GROUP_MODIFY_CONTRIBUTIONS_START, ACTION_GROUP_NEW_END, ACTION_GROUP_NEW_START, ACTION_GROUP_SHOW_END, ACTION_GROUP_SHOW_START, COPY, CUT, DELETE, PASTE, SAVE, SELECT_ALLAFTER_SAVE, BEFORE_SAVE, LOADED, UNLOADING| Constructor and Description |
|---|
DataCorrelatingTextAttrField(ExtLayoutProvider hostLayoutProvider)
Constructor
|
DataCorrelatingTextAttrField(ExtLayoutProvider hostLayoutProvider,
com.ibm.rational.test.lt.testeditor.common.IContentHidingHelper contentHidingHelper)
Constructor
|
DataCorrelatingTextAttrField(ExtLayoutProvider provider,
int minValue,
int maxValue)
Creates a data correlatable field for numeric model value/attribute.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
attributeMatch(String otherAttribute)
When parsing lists of harvesters (references) and substituters,
ExtendedStyledText will call this
method to filter out those datacorrelation objects that do not belong to this atttribute/field. |
protected void |
collectFieldMarkers()
Refreshes internal lists of references (harvesters) and substituters and updates visual que.
|
protected void |
createActions() |
protected void |
disassociate() |
protected void |
doInit() |
protected void |
fillMenu(IMenuManager menu)
Fills context menu with datacorrelation related actions.
|
protected com.ibm.rational.test.lt.testeditor.common.DefaultAttributeMatcher |
getAttributeMatcher()
Returns
DefaultAttributeMatcher. |
String |
getAttributeName() |
void |
modelElementChanged(boolean internalChange) |
void |
objectChanged(Point pt,
boolean update,
String msg) |
protected void |
parseHarvesters()
If
getHostElement() is not DataSourceHost, does nothing. |
protected void |
parseSubstituters()
If
getHostElement() is not SubstituterHost, does nothing. |
void |
setControl(Control control) |
protected void |
setEncoding()
Calls
su.setEncode( ! |
void |
setModelValue() |
protected int |
shift(int start,
int len,
int shift,
String replacedText)
Called in response to
ModifyEvent after text in StyledText is modified. |
void |
unloading(TestEditor editor) |
protected void |
updateActions() |
add, addHarvester, addHarvester, addListenersInternal, addModelUpdateListeners, addSubstituter, addSubstituter, addSubstituter, applyModelText, cache, canPerform, checkFilterCondition, clearFieldHarvester, clearMarkers, compareFieldName, createBinaryDataEditor, createBuiltinSubstituter, createDatapoolSubstituter, createFieldSubstitutionTarget, createKeyBindings, createNewHarvester, createNewSubstituterFor, createNewSubstituterFor, decode, decode, dispose, doDecode, enableKeyBindings, fillFindMenu, fillGoToMenu, fillSubstSubMenu, fillSubstSubMenuOld, getActionCreateFieldReference, getActionCreateReference, getActionRemoveDcObject, getActionRemoveFieldReference, getActionRemoveSubs, getActionSearchForOtherInput, getActionSubstFromBuiltIn, getActionSubstFromDatapool, getActionToggleEncoding, getContainedDc, getCue, getCurrentDataRange, getDataAsBytes, getDataSourceMenuText, getDataSourceMenuText, getDcAction, getDcMarkers, getDecoderLabel, getEnableDisableAction, getFieldHarvester, getFilterMessage, getHostElement, getListOfHarvesters, getListOfSubstituters, getLoadTestEditor, getMaxIntValue, getMenuTextForDsCategory, getMinIntValue, getRelatedHostElement, getSelectedDcRanges, getSelection, getStringLocatorFromData, getStringLocatorFromSelection, getStringLocatorFromSelection, getSubstituterMenuText, getSubstituterMenuText, getSupportedDataSourceTypes, getSupportedDataSourceTypes2, getTextSearcher, getToolTipFor, isAllowExternalEditor, isCursorInRange, isEncodingEnabled, isFieldHarvestEnabled, isFileSubstitutionEnabled, isHarvestEnabled, isJumpToEnabled, isNumericOnly, isRemoveFieldReferenceEnabled, isRemoveReferenceEnabled, isRemoveSubstitutorEnabled, isSubstitutionEnabled, isSubstitutionEnabled, isSupportedDsType, isWholeText1DcOnly, keyReleased, lineGetStyle, modifyText, mouseDoubleClick, navigateTo, objectChanged, okToRemove, okToRemove, onEditRegex, onSubstituterTypeChanged, onTextMatchFound, onTextSelectionChanged, refreshRegion, remove, removeDataCorrelation, removeListenersInternal, removeModelUpdateListeners, setBytesValue, setCurrentDataRange, setCurrentRange, setEncodingEnabled, setFieldHarvestEnabled, setHarvestEnabled, setHarvestEnabled, setJumpToEnabled, setLayoutProvider, setRemoveFieldReferenceEnabled, setRemoveReferenceEnabled, setRemoveSubstitutorEnabled, setSubstitutionEnabled, setWholeText1DcOnly, shiftText, shiftText, substituteFromBuiltinDS, substituteFromDatapool, substituteFromSelectedDataSource, updateDataSourceView, updateStatusLine, verifyKey, verifyTextforceShow, getFilterStyleRanges, getModelValue, getOriginalText, getUiText, isBinary, isFilterActive, isForceOriginalText, isHotKey, isHotKey, isWordWrapEnabled, mouseUp, performExternalEdit, setAllowExternalEditor, setBinary, setFilterActive, setForceOriginalText, setOriginalText, setSelectiongetCurrentRange, getMarkerManager, getNextRange, getOverlappedRanges, getPreviousRange, getRangeForSelection, getSelectedRange, isEmpty, isMouseInRange, isSelectionOverlapsWithRangesEx, keyPressed, lineGetBackground, mouseDown, mouseEnter, mouseExit, mouseHover, paintControl, setTooltipText, toPointaddSelectionChangedListener, beforeSave, createControl, doPerform, getActionGoToLine, getActionGoToOffset, getAdapter, getCursorPosition, getDefaultValue, getFindReplaceAction, getSelectionFromWidget, getStyledText, getTextValue, initNavigationLocation, isCopyEnabled, isCutEnabled, isDeleteEnabled, isPasteEnabled, isSelectAllEnabled, modifyText, removeSelectionChangedListener, setCursorPosition, setSelection, setTextValue, validateValueafterSave, associate, canPerform, checkParent, createLabel, createMenu, createMenuManager, doCopy, doCut, doDelete, doPaste, doSelectAll, doSelectAll, getAttributeLabel, getControl, getEditor, getField, getLabelProvider, getLayoutProvider, getTextSelectionProvider, isModelUpdated, isRefreshTreeOnEdit, loaded, setFocus, setModelUpdated, setRefreshTreeOnEdit, setStatusLineErrorMessage, setStatusLineMessagepublic DataCorrelatingTextAttrField(ExtLayoutProvider provider, int minValue, int maxValue)
provider - ExtLayoutProvider. Host layout provider.minValue - int. Minimum acceptable valuemaxValue - int. Maximum acceptable value.LoadTestWidgetFactory.setIntegerOnly(StyledText, boolean, int, int, int)public DataCorrelatingTextAttrField(ExtLayoutProvider hostLayoutProvider, com.ibm.rational.test.lt.testeditor.common.IContentHidingHelper contentHidingHelper)
hostLayoutProvider - ExtLayotProvider that displays this attribue.contentHidingHelper - helper for hiding the content in this fieldpublic DataCorrelatingTextAttrField(ExtLayoutProvider hostLayoutProvider)
hostLayoutProvider - ExtLayotProvider that displays this attribue.protected void doInit()
doInit in class com.ibm.rational.test.lt.testeditor.common.AbstractDataCorrelatingTextAttrFieldprotected void disassociate()
disassociate in class com.ibm.rational.common.test.editor.framework.extensions.MarkerAttributeFieldpublic void unloading(TestEditor editor)
unloading in interface IEditorStateListenerunloading in class com.ibm.rational.test.lt.testeditor.common.AbstractDataCorrelatingTextAttrFieldpublic String getAttributeName()
getAttributeName in class com.ibm.rational.test.lt.testeditor.common.AbstractDataCorrelatingTextAttrFieldModelElement. Default implementation
calls getFieldName. Under ordinary circumstances, clients should not override this method (i.e. data correlation
attribute should be the same as field Name.ExtendedStyledText.getHostElement()protected void createActions()
createActions in class com.ibm.rational.test.lt.testeditor.common.AbstractDataCorrelatingTextAttrFieldprotected void fillMenu(IMenuManager menu)
- IWorkbenchActionConstants.MB_ADDITIONS + "-dc.ref.start"
- IWorkbenchActionConstants.MB_ADDITIONS + "-dc.ref.end"
- IWorkbenchActionConstants.MB_ADDITIONS + "-dc.subst.start"
- IWorkbenchActionConstants.MB_ADDITIONS + "-dc.subst.end"
- IWorkbenchActionConstants.MB_ADDITIONS + "-dc.nav.start"
- IWorkbenchActionConstants.MB_ADDITIONS + "-dc.nav.end"
- IWorkbenchActionConstants.MB_ADDITIONS
- IWorkbenchActionConstants.MB_ADDITIONS + ".end"
fillMenu in class com.ibm.rational.test.lt.testeditor.common.AbstractDataCorrelatingTextAttrFieldStyledTextLogic.fillMenu(org.eclipse.jface.action.IMenuManager)protected void setEncoding()
su.setEncode( !su.isEncode()) method for Substituter that is currently selected or under curser.
Does nothing otherwise.
This method is called from ToggleEncodingAction action and should not be called by clients.
protected boolean attributeMatch(String otherAttribute)
ExtendedStyledText will call this
method to filter out those datacorrelation objects that do not belong to this atttribute/field.
For example, suppose that some model elemnt has two fields (attribues) A and B, both of which have data correlation.
In the editor's UI, there are two StyledText widgets that display contents of these two attributes. For each of those
widgets, there is instance of ExtendedStyledText class. One should look for datacorrelation
objects with attribute A, the other should look for attribute B.
Clients should override this method only if some more complex comparisons are needed. The default implementation calls:
otherAttribute.equals( getAttrName() )
attributeMatch in class com.ibm.rational.test.lt.testeditor.common.AbstractDataCorrelatingTextAttrFieldotherAttribute - datacorrelation attribute, must not be null.protected com.ibm.rational.test.lt.testeditor.common.DefaultAttributeMatcher getAttributeMatcher()
DefaultAttributeMatcher. Client classes may override and return
another type of matcher of more intiricate matching is required. This method is called
often so the instance of the matcher is saved.DefaultAttributeMatcherpublic void setControl(Control control) throws IllegalArgumentException
setControl in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.IAttributeFieldHandlersetControl in class com.ibm.rational.test.lt.testeditor.common.AbstractDataCorrelatingTextAttrFieldIllegalArgumentExceptionprotected int shift(int start,
int len,
int shift,
String replacedText)
ModifyEvent after text in StyledText is modified. Loops over internal lists
of references and substituters and adjusts their offsets and lengths.shift in class com.ibm.rational.test.lt.testeditor.common.AbstractDataCorrelatingTextAttrFieldStyledTextLogic.shift(int, int, int, java.lang.String)public void modelElementChanged(boolean internalChange)
modelElementChanged in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.IAttributeFieldHandlermodelElementChanged in class com.ibm.rational.test.lt.testeditor.common.AbstractDataCorrelatingTextAttrFieldprotected void collectFieldMarkers()
Clients should not override this method.
collectFieldMarkers in class com.ibm.rational.test.lt.testeditor.common.AbstractDataCorrelatingTextAttrFieldprotected void parseSubstituters()
getHostElement() is not SubstituterHost, does nothing.
Otherwise, calls DataCorrelationLabelProvider.getSubstitutersFor to obtain list of Substituters,
and stores them in the internal list.protected void parseHarvesters()
getHostElement() is not DataSourceHost, does nothing.
Otherwise, calls DataCorrelationLabelProvider.getHarvestersFor to obtain list of DataSources, and
stores them in the internal list.public void objectChanged(Point pt, boolean update, String msg)
objectChanged in class com.ibm.rational.test.lt.testeditor.common.AbstractDataCorrelatingTextAttrFieldpublic void setModelValue()
setModelValue in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.IAttributeFieldHandlersetModelValue in class com.ibm.rational.common.test.editor.framework.extensions.TextAttributeFieldprotected void updateActions()
updateActions in class com.ibm.rational.test.lt.testeditor.common.AbstractDataCorrelatingTextAttrField© Copyright IBM Corp. 2013. All rights reserved.