public abstract class ModelErrorChecker extends Object implements com.ibm.rational.common.test.editor.framework.kernel.interfaces.IElementErrorChecker
Constructor and Description |
---|
ModelErrorChecker() |
Modifier and Type | Method and Description |
---|---|
void |
clearErrors(CBActionElement element) |
IMarker |
createError(CBActionElement element1,
CBActionElement element2,
String attr_name,
String msg)
Create an error for element and secondary element.
|
IMarker |
createError(CBActionElement element,
String msg) |
IMarker |
createWarning(CBActionElement element,
String msg) |
void |
dispose() |
void |
flushCachedData()
Deprecated.
|
com.ibm.rational.common.test.editor.framework.jobs.ErrorCheckerJob |
getErrorCheckerJob() |
TestEditor |
getTestEditor() |
abstract boolean |
hasErrors(CBActionElement element)
This method ie expected to examine the passed object for errors.
|
void |
setErrorCheckerJob(com.ibm.rational.common.test.editor.framework.jobs.ErrorCheckerJob errorCheckerJob) |
void |
setTestEditor(TestEditor testEditor) |
public abstract boolean hasErrors(CBActionElement element)
boolean error_condition = ... // check for error if( error_condition == true ) { // the following two lines must be executed for every error found IMarker marker = MarkerUtil.createMarker( getTestEditor(), element, ... ); ModelStateManager.setError( element, getTestEditor(), marker ); return true; } else { return false; // no errors were found }
hasErrors
in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.IElementErrorChecker
true
if errors were found, false
otherwise.IElementErrorChecker.hasErrors(com.ibm.rational.test.common.models.behavior.CBActionElement)
,
MarkerUtil.createErrorMarker(TestEditor, CBActionElement, CBActionElement, String, String, int)
,
MarkerUtil.createErrorMarker(TestEditor, CBActionElement, String, int)
,
MarkerUtil.createErrorMarker(TestEditor, CBActionElement, String, String, int, int, int, int)
,
ModelStateManager.setError(CBActionElement, TestEditor, IMarker)
public TestEditor getTestEditor()
getTestEditor
in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.IElementErrorChecker
public void setTestEditor(TestEditor testEditor)
setTestEditor
in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.IElementErrorChecker
testEditor
- The testEditor to set.public IMarker createWarning(CBActionElement element, String msg)
element
- CBActionElementmsg
- Stringpublic IMarker createError(CBActionElement element, String msg)
element
- CBActionElementmsg
- StringIMarker
marker can be modified to store additional data.public IMarker createError(CBActionElement element1, CBActionElement element2, String attr_name, String msg)
element1
- CBActionElement
main element (shown in the editor treeelement2
- CBActionElement
secondary element (shown on the details section)attr_name
- String
Field name of the widget that displays the secondary elementmsg
- String
Error messageIMarker
marker can be modified to store additional data.public void dispose()
@Deprecated public void flushCachedData()
ModelErrorChecker.dispose()
public void clearErrors(CBActionElement element)
public final com.ibm.rational.common.test.editor.framework.jobs.ErrorCheckerJob getErrorCheckerJob()
public final void setErrorCheckerJob(com.ibm.rational.common.test.editor.framework.jobs.ErrorCheckerJob errorCheckerJob)
© Copyright IBM Corp. 2013. All rights reserved.