public class LoadTestEditor extends TestEditor implements IPropertyChangeListener, IEditorStateListener
Load Test Editor.
Modifier and Type | Class and Description |
---|---|
class |
LoadTestEditor.FieldMagnifier |
class |
LoadTestEditor.ToggleEditorViewModeAction |
TestEditor.EnableOperation
Modifier and Type | Field and Description |
---|---|
static String |
ID |
static int |
MAX_HISTORY
Max number of last accessed data sources to put in menu
|
static String |
ms_PRIMARY_FEATURE |
static byte |
VIEW_MODE_SUBSTITUTERS |
LASTFIELDSELECTION, LASTSELECTION, VIEW_MODE_NORMAL
pages
PAGE_CONTAINER_SITE
AFTER_SAVE, BEFORE_SAVE, LOADED, UNLOADING
ACTION_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_ALL
RPCA0100W, RPCA0101W, RPCA0102W, RPCA0103W, RPCA0104W, RPCA0105E, RPCA0106E, RPCA0107E, RPCA0108E, RPCA0109E, RPCA0110E, RPCA1001E, RPCA1001W, RPCA1002E
PROP_DIRTY, PROP_INPUT
PROP_TITLE
Constructor and Description |
---|
LoadTestEditor() |
Modifier and Type | Method and Description |
---|---|
void |
activate(boolean active) |
void |
addAvailableType(String type) |
Datapool[] |
addDatapool()
Prompts user for a datapool file.
|
com.ibm.rational.common.test.editor.framework.kernel.util.TestTreeRegion |
addSplitoutRegion(String fileName,
IStructuredSelection selection) |
void |
afterSave(TestEditor editor) |
void |
attachHiddenVarsContainer() |
boolean |
beforeSave(TestEditor editor) |
void |
cacheDataSource(com.ibm.rational.test.common.models.behavior.cbdata.DataSource ds) |
boolean |
canAddModelElement(String elementType) |
protected String |
computeEditorName() |
protected String |
computeFormTitle() |
protected String |
computeLeftTreeDescription() |
protected String |
computeLeftTreeTitle() |
protected String |
computeRightTreeDescription() |
protected String |
computeRightTreeTitle() |
protected void |
connectToEclipse(IEditorPart part) |
protected com.ibm.rational.common.test.editor.framework.TestEditorForm |
createEditorForm()
Creates the TestEditorForm.
|
com.ibm.rational.common.test.editor.framework.extensions.ExceptionsUI |
createExceptionsUI(ExtLayoutProvider provider) |
protected void |
createMainFormContent(IManagedForm managedForm) |
protected CBTest |
createTestObject(org.eclipse.hyades.models.common.facades.behavioral.ITestSuite suite)
Calls LttestFactory.eINSTANCE.loadLTTest( getTestSuite() ).
|
void |
dataSourceRemoved(com.ibm.rational.test.common.models.behavior.cbdata.DataSourceHost _dsh,
com.ibm.rational.test.common.models.behavior.cbdata.CoreHarvester _ch) |
void |
detachHiddenVarsContainer() |
void |
displayMatch(Object match)
Display SearchMatch or FieldMatch
|
void |
displayObject(com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITargetDescriptor target)
Directs
TestEditor to locate and select specified model element in the tree section. |
protected void |
doFirstTimeInit() |
void |
fillContextMenu(IMenuManager menu)
Fills content menu for TestEditor's MainSection
|
protected String |
formatMessage(com.ibm.rational.test.common.models.behavior.exceptions.CommonModelException e1) |
Object |
getAdapter(Class adapter) |
com.ibm.rational.test.lt.testeditor.actions.AllowRulesAccumulatonAction |
getAllowRulesAccumulationAction() |
String[] |
getApplicableTypes()
Override base class' implementation to load only those extensions that support LTTest type.
|
BuiltinDatasources |
getBuiltinDataSources() |
List<com.ibm.rational.test.common.models.behavior.cbdata.DataSource> |
getCachedDataSources()
Returns a list of cached (recently accessed)
DataSource s. |
com.ibm.rational.test.lt.testeditor.main.LoadTestEditor.SplitTestRegion |
getElementRegion(CBActionElement element) |
com.ibm.rational.test.common.models.behavior.variables.CBVarContainer |
getHiddenVarsContainer() |
com.ibm.rational.test.common.models.behavior.cbdata.DatapoolHarvester |
getLastDatapool() |
LTTest |
getLtTest()
Returns
LTTest |
com.ibm.rational.test.lt.datacorrelation.rules.ui.generator.RuleSetGenerationUIHelper |
getRuleSetGeneratorHelper() |
com.ibm.rational.test.lt.testeditor.actions.ShowAccumulatedRulesAction |
getShowAccumulatedRulesAction() |
IConfigurationElement[] |
getSupportedDataSources(String catId) |
String[] |
getSupportedDataSourcesTypes()
Returns array of IDs of DataSources that this
LTTest can support. |
LTTest |
getTest()
Returns
CBTest . |
ISearchQuery |
getTestSearchQuery(com.ibm.rational.common.test.editor.framework.kernel.search.QuerySpecification specs,
int what)
Returns instanceof
SearchQuery . |
LoadTestEditor.ToggleEditorViewModeAction |
getToggleViewModeAction() |
byte |
getViewMode() |
boolean |
isOkToSave() |
boolean |
isReferencesNeedReview() |
boolean |
isRulesAccumulationEnabled() |
void |
loaded(TestEditor editor) |
void |
markDirty()
Calls
SplitTestAction.resetCachedSplitParticipantStatus(getLtTest()) |
protected void |
onSaveAsComplete(IFile file,
String newName,
String newID) |
protected void |
preSave() |
static void |
promptTestTooLarge(String editorName) |
void |
propertyChange(PropertyChangeEvent event) |
void |
refreshDetails() |
void |
refreshTree() |
boolean |
removeDatapools(Object[] objects)
Removes specified datapools from the test.
|
boolean |
removeFromCache(com.ibm.rational.test.common.models.behavior.cbdata.DataSource ds)
Remove specified
DataSource from cache. |
ArrayList<String> |
removeRegionsFor(Object[] array) |
protected void |
restoreState()
Restores editor state upon load.
|
void |
saveState()
Saves editor state
|
void |
searchForDataSources(IDCStringLocator location,
com.ibm.rational.test.common.models.behavior.cbdata.Substituter existing) |
void |
setAllowRulesAccumulation(boolean _allowRulesAccumulation) |
void |
setHiddenVarsContainer(com.ibm.rational.test.common.models.behavior.variables.CBVarContainer hiddenVarsContainer) |
void |
setInput(Object arg0)
This method is called when the test is opening in the Eclipse editor.
|
void |
setLastDatapool(com.ibm.rational.test.common.models.behavior.cbdata.DatapoolHarvester lastDatapool)
Stores least recently used
DatapoolHarvester |
void |
setReferencesNeedReview(boolean isReferencesNeedReview) |
protected void |
setViewMode(byte newViewMode,
StructuredSelection ssel)
This implementation does nothing.
|
protected void |
unload(boolean reserved)
This method is called when
TestEditor is being unloaded. |
void |
unloading(TestEditor editor) |
void |
verifyDatapools() |
void |
verifyDatapools(String oldFile,
String newFile)
This method is called from
DatapoolMonitor and should not be called directly by clients. |
aboutToRun, addAvailableType, addRecentSearchText, awake, cancelCutOperation, clearDirty, confirmRemove, confirmRemove, createEmptyNavigationLocation, createLabelProvider, createMenuManager, createNavigationLocation, createTreeContentProvider, dispose, done, doSaveAs, enableElements, fixBadRequirements, getAvailableTypes, getBookmarkAction, getCaseSearchValue, getChangeFactory, getContentProvider, getCurrentSelection, getDialogCaption, getEditorInput, getEditorName, getEditorState, getEnableDisableActionGroup, getExtensionContext, getExtensionContext, getFindReplaceAction, getForm, getFormattedResourceName, getImageFor, getLabelFor, getLabelProvider, getMenuManager, getOperationService, getProviders, getProviders, getProviders, getProviders, getProviders, getRecentSearches, getRegexSearchValue, getSecondarySelection, getSelection, getTestSuite, gotoMarker, hasJobs, hideInsertionPoint, isAcceptingPasteFrom, isHighlightSearchResults, isReadOnly, isSaveAsAllowed, jobCreated, markLocation, performSaveAsRPT, postSave, refresh, refreshActionStates, refreshContent, registerEditActionsHandler, reload, running, saveFile, saveFileTo, scheduled, setCaseSearchValue, setCbTest, setEditorObject, setHighlightSearchResults, setInput, setReadOnly, setRegexSearchValue, setSelection, setStatusLineMessage, setStatusLineMessage, showInsertionPoint, sleeping, storeFieldLocation, unregisterEditActionsHandler, unregisterEditActionsHandler, updateEditorWindowTitle, updateFindRepleceAction
addSelectionChangedListener, fireSelection, getEditorObject, getResourceSet, internalDoSave, internalDoSaveTo, isDirty, reloadEditorObject, removeSelectionChangedListener
addPages, createHeaderContents, createPages, doSave, getClipboard, getContainer, getProgressMonitor, getSharedFormTitle, init, setPartName, setSharedFormTitle
commitPages, createPageContainer, getHeaderForm, setActivePage, setFocus
addPage, addPage, addPage, addPage, addPage, addPage, close, configurePage, createToolkit, editorDirtyStateChanged, findPage, getActiveEditor, getActivePageInstance, getCurrentPage, getSelectedPage, getToolkit, pageChange, removePage, selectReveal, setActivePage, setActivePage, updateActionBarContributor
activateSite, addPageChangedListener, createPartControl, createSite, deactivateSite, findEditors, getActivePage, getControl, getEditor, getPageCount, getPageImage, getPageSite, getPageText, handlePropertyChange, initializePageSwitching, removePageChangedListener, setActiveEditor, setControl, setPageImage, setPageText
checkSite, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInputWithNotify
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSite
addPropertyListener, getSite, getTitle, getTitleImage, removePropertyListener
public static final String ID
public static final String ms_PRIMARY_FEATURE
public static final int MAX_HISTORY
public static final byte VIEW_MODE_SUBSTITUTERS
public LTTest getTest()
TestEditor
CBTest
. CBTest is base class for concreate test types, and is a root element in the
TestEditor's Tree section.getTest
in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITestEditor
getTest
in class TestEditor
protected void createMainFormContent(IManagedForm managedForm)
createMainFormContent
in class TestEditor
protected com.ibm.rational.common.test.editor.framework.TestEditorForm createEditorForm()
TestEditor
createEditorForm
in class TestEditor
protected String computeEditorName()
computeEditorName
in class TestEditor
protected String computeFormTitle()
computeFormTitle
in class TestEditor
protected String computeLeftTreeTitle()
computeLeftTreeTitle
in class TestEditor
protected String computeLeftTreeDescription()
computeLeftTreeDescription
in class TestEditor
protected String computeRightTreeTitle()
computeRightTreeTitle
in class TestEditor
protected String computeRightTreeDescription()
computeRightTreeDescription
in class TestEditor
public void verifyDatapools()
public void cacheDataSource(com.ibm.rational.test.common.models.behavior.cbdata.DataSource ds)
public List<com.ibm.rational.test.common.models.behavior.cbdata.DataSource> getCachedDataSources()
DataSource
s.public boolean removeFromCache(com.ibm.rational.test.common.models.behavior.cbdata.DataSource ds)
DataSource
from cache. This is typically alled when the DataqSource
is being deletedds
- DataSource
true
if deleted, false
if not.public String[] getApplicableTypes()
ActionHandler, LabelProvider
and LayoutProvider
classes
that handle such elements as IF
and Loop
. However, CommonActionHandler
does not
allow for addition of any of these objects, even though the CommonLabelProvider
and
CommonLayoutProvider
"know" how to display them. You extension will have to specify which
objects of Common it permits to be added.getApplicableTypes
in class TestEditor
TestEditor.getApplicableTypes()
protected CBTest createTestObject(org.eclipse.hyades.models.common.facades.behavioral.ITestSuite suite)
LttestFactory.eINSTANCE.loadLTTest( getTestSuite() ). Clients must not call this method directly.
createTestObject
in class TestEditor
com.ibm.rational.common.test.editor.framework.TestEditor#createTestObject()
protected String formatMessage(com.ibm.rational.test.common.models.behavior.exceptions.CommonModelException e1)
formatMessage
in class TestEditor
public boolean canAddModelElement(String elementType)
canAddModelElement
in class TestEditor
public LTTest getLtTest()
LTTest
protected void unload(boolean reserved)
TestEditor
TestEditor
is being unloaded.unload
in class TestEditor
public Datapool[] addDatapool()
DatapoolUtil.addDatapool( this, false, null, null );
Datapool
type)Datapool
public boolean removeDatapools(Object[] objects)
objects
- An array of Object
s that are Datapool
sDatapoolUtil.removeDatapoolsEx(LoadTestEditor, Object[])
public void searchForDataSources(IDCStringLocator location, com.ibm.rational.test.common.models.behavior.cbdata.Substituter existing)
location
- existing
- public void displayObject(com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITargetDescriptor target)
TestEditor
TestEditor
to locate and select specified model element in the tree section.
Optionally, ITargetDescriptor
may contain additional, more precise, information about attribute
and position within attribute of the target model element.
NOTE this mechanism is subject to chage in the future versions of TestEditor.
displayObject
in class TestEditor
target
- ITargetDescriptorITargetDescriptor
,
ExtLayoutProvider.navigateTo(ITargetDescriptor)
protected void restoreState()
TestEditor
restoreState
in class TestEditor
public void saveState()
TestEditor
saveState
in class TestEditor
protected void onSaveAsComplete(IFile file, String newName, String newID)
onSaveAsComplete
in class TestEditor
protected void preSave()
preSave
in class com.ibm.rational.common.test.editor.framework.editor.RptEmfEditor
public void verifyDatapools(String oldFile, String newFile)
DatapoolMonitor
and should not be called directly by clients.oldFile
- newFile
- public static void promptTestTooLarge(String editorName)
public com.ibm.rational.test.common.models.behavior.cbdata.DatapoolHarvester getLastDatapool()
public void setLastDatapool(com.ibm.rational.test.common.models.behavior.cbdata.DatapoolHarvester lastDatapool)
DatapoolHarvester
lastDatapool
- The lastDatapool to set.public void propertyChange(PropertyChangeEvent event)
propertyChange
in interface IPropertyChangeListener
public void refreshTree()
public void refreshDetails()
public void displayMatch(Object match)
displayMatch
in class TestEditor
match
- ObjectTestEditor.displayMatch(java.lang.Object)
public BuiltinDatasources getBuiltinDataSources()
public void fillContextMenu(IMenuManager menu)
TestEditor
fillContextMenu
in class TestEditor
menu
- IMenuManagerprotected void doFirstTimeInit()
doFirstTimeInit
in class TestEditor
public void activate(boolean active)
activate
in class TestEditor
public void setInput(Object arg0)
TestEditor
setInput
in class TestEditor
public final IConfigurationElement[] getSupportedDataSources(String catId)
public final String[] getSupportedDataSourcesTypes()
LTTest
can support. These IDs are loaded from
DataSourceViewPage.DATASOURCE_CAT_ID
extensions.DataSourceViewPage
,
DataSourceView}
,
DataCorrelatingTextAttrField
public ISearchQuery getTestSearchQuery(com.ibm.rational.common.test.editor.framework.kernel.search.QuerySpecification specs, int what)
TestEditor
SearchQuery
. Extensing classes may override and return null
if no search is supported, or some more specialized query. When this method is called from SearchPage
,
the second argument is QuerySpecification.QUERY_TYPE_DEFALT
.getTestSearchQuery
in class TestEditor
specs
- QuerySpecification
query specificationprotected void connectToEclipse(IEditorPart part)
connectToEclipse
in class TestEditor
public byte getViewMode()
getViewMode
in class TestEditor
protected void setViewMode(byte newViewMode, StructuredSelection ssel)
TestEditor
setViewMode
in class TestEditor
newViewMode
- byte. Editor mode.ssel
- Selection of objects to display innew mode.public void addAvailableType(String type)
addAvailableType
in class TestEditor
public void markDirty()
SplitTestAction.resetCachedSplitParticipantStatus(getLtTest())
markDirty
in class TestEditor
TestEditor.markDirty()
public LoadTestEditor.ToggleEditorViewModeAction getToggleViewModeAction()
public com.ibm.rational.common.test.editor.framework.kernel.util.TestTreeRegion addSplitoutRegion(String fileName, IStructuredSelection selection)
public com.ibm.rational.test.lt.testeditor.main.LoadTestEditor.SplitTestRegion getElementRegion(CBActionElement element)
public boolean isOkToSave()
isOkToSave
in class TestEditor
public boolean isReferencesNeedReview()
public void setReferencesNeedReview(boolean isReferencesNeedReview)
public com.ibm.rational.common.test.editor.framework.extensions.ExceptionsUI createExceptionsUI(ExtLayoutProvider provider)
createExceptionsUI
in class TestEditor
public com.ibm.rational.test.lt.datacorrelation.rules.ui.generator.RuleSetGenerationUIHelper getRuleSetGeneratorHelper()
public void dataSourceRemoved(com.ibm.rational.test.common.models.behavior.cbdata.DataSourceHost _dsh, com.ibm.rational.test.common.models.behavior.cbdata.CoreHarvester _ch)
public boolean isRulesAccumulationEnabled()
public final void setAllowRulesAccumulation(boolean _allowRulesAccumulation)
public com.ibm.rational.test.lt.testeditor.actions.ShowAccumulatedRulesAction getShowAccumulatedRulesAction()
public final com.ibm.rational.test.lt.testeditor.actions.AllowRulesAccumulatonAction getAllowRulesAccumulationAction()
public void afterSave(TestEditor editor)
afterSave
in interface IEditorStateListener
public boolean beforeSave(TestEditor editor)
beforeSave
in interface IEditorStateListener
public void loaded(TestEditor editor)
loaded
in interface IEditorStateListener
public void attachHiddenVarsContainer()
public void detachHiddenVarsContainer()
public void unloading(TestEditor editor)
unloading
in interface IEditorStateListener
public com.ibm.rational.test.common.models.behavior.variables.CBVarContainer getHiddenVarsContainer()
public void setHiddenVarsContainer(com.ibm.rational.test.common.models.behavior.variables.CBVarContainer hiddenVarsContainer)
public Object getAdapter(Class adapter)
getAdapter
in interface IAdaptable
getAdapter
in class TestEditor
© Copyright IBM Corp. 2013. All rights reserved.