|
IBM Rational Performance Tester SDK | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibm.rational.common.test.editor.framework.MarkerUtil
public class MarkerUtil
| Field Summary | |
|---|---|
static String |
ATTRIBUTE_NAME
The name of the attribute. |
static String |
ERROR_ID
|
static boolean |
FormatLocationInfo
Flag that tells MarkerUtil.createLocationInfo(TestEditor, CBActionElement, CBActionElement) to create abbreviated
location information string for markers. |
static String |
MODEL_MARKER
Defines model marker type. |
static String |
OBJECT_ID
Primary object attribute. |
static String |
PERMANENT_ERROR
|
static String |
PID
|
static String |
SUBOBJECT_ID
Secondary object attribute. |
static String |
TEST_BOOKMARK
Defines model bookmark marker type. |
static String |
TEST_ERROR_MARKER
Defines model error marker type. |
static String |
TEST_ID
Test ID marker attribute. |
static String |
TEST_SEARCH_MATCH
Defines model search marker type. |
| Constructor Summary | |
|---|---|
MarkerUtil()
|
|
| Method Summary | |
|---|---|
static IMarker |
createBookmarkMarker(TestEditor editor,
CBActionElement element,
String message)
Creates bookmark marker. |
static IMarker |
createBookmarkMarker(TestEditor editor,
CBActionElement element,
String message,
String fieldName,
Point location)
Creates bookmark for textual data in a field. |
static IMarker |
createErrorMarker(TestEditor editor,
CBActionElement element1,
CBActionElement element2,
String message,
String attr_name,
int severity)
Create a marker for the test element1 and sub-element element2. |
static IMarker |
createErrorMarker(TestEditor editor,
CBActionElement element,
String message,
int severity)
Create a marker for the test element. |
static IMarker |
createErrorMarker(TestEditor editor,
CBActionElement element,
String message,
String attribute_name,
int offset,
int len,
int line_number,
int severity)
Create a marker for the test element. |
static IMarker |
createGenericMarker(IResource resource,
String markerType,
String testId,
CBActionElement element,
String message,
int severity)
Creates a generic marker of type markerType |
static String |
createLocationInfo(TestEditor editor,
CBActionElement element)
|
static String |
createLocationInfo(TestEditor editor,
CBActionElement element,
CBActionElement upToThisOne)
|
static IMarker |
createSearchMarker(TestEditor editor,
CBActionElement element,
String text)
Create a search match marker for the test element. |
static IMarker |
createSearchMarker(TestEditor editor,
CBActionElement element,
String text,
boolean caseSensitive,
boolean regex,
String attribute_name,
int offset,
int len,
int line_number)
Create a search match marker for the test element. |
static IMarker |
createSearchMarker(TestEditor editor,
CBActionElement element,
String text,
boolean caseSensitive,
String attribute_name,
int offset,
int len,
int line_number)
Deprecated. Starting from 8.2, use MarkerUtil.createSearchMarker(TestEditor, CBActionElement, String, boolean, boolean, String, int, int, int) |
static IMarker |
createSearchMatchMarker(TestEditor editor,
CBActionElement element1,
CBActionElement element2,
String matchText,
boolean caseSensitive,
boolean regex,
String attr_name)
Create a search match marker for the test element1 and sub-element element2. |
static IMarker |
createSearchMatchMarker(TestEditor editor,
CBActionElement element1,
CBActionElement element2,
String matchText,
boolean caseSensitive,
String attr_name)
Deprecated. Starting form 8.2 use MarkerUtil.createSearchMatchMarker(TestEditor, CBActionElement, CBActionElement, String, boolean, boolean, String) |
static IMarker[] |
findBookmark(TestEditor editor,
CBActionElement element)
Finds bookmarks that belong to the given object. |
static CBActionElement |
findModelObject(IMarker marker,
boolean type,
CBTest test)
Finds model element that has ID equal to the ID specified in the marker. |
static String |
getMessage(IMarker marker)
Returns message |
static int |
getSeverity(IMarker marker)
Returns severity |
static String |
getUniqueId(IMarker marker)
|
static void |
removeMarkers(IMarker[] markers,
TestEditor editor)
Deletes markers. |
static void |
setId(IMarker marker,
String uniqueId)
Assigns an ID to this marker. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static boolean FormatLocationInfo
MarkerUtil.createLocationInfo(TestEditor, CBActionElement, CBActionElement) to create abbreviated
location information string for markers. Default is true. Set to false when the label
of the element in question contains error. This will prevent infinite loop. Reset back to true when
not needed.
public static String PID
public static String MODEL_MARKER
IMarker.isSubtypeOf(String)public static String TEST_ERROR_MARKER
IMarker.isSubtypeOf(String)public static String TEST_BOOKMARK
IMarker.isSubtypeOf(String)public static String TEST_SEARCH_MATCH
IMarker.isSubtypeOf(String)public static String TEST_ID
public static String OBJECT_ID
public static String SUBOBJECT_ID
public static String ATTRIBUTE_NAME
IAttributeFieldHandler,
TextAttributeField.navigateTo(com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITargetDescriptor)public static String ERROR_ID
public static final String PERMANENT_ERROR
| Constructor Detail |
|---|
public MarkerUtil()
| Method Detail |
|---|
public static IMarker createBookmarkMarker(TestEditor editor,
CBActionElement element,
String message)
CreateBookmarkAction.
editor - TestEditor.element - Primary model element (visible in the editor tree).message - String. Bookmar label.
MarkerUtil.TEST_BOOKMARKCreateBookmarkAction,
MarkerUtil.createBookmarkMarker(TestEditor, CBActionElement, String, String, Point)
public static String createLocationInfo(TestEditor editor,
CBActionElement element)
public static String createLocationInfo(TestEditor editor,
CBActionElement element,
CBActionElement upToThisOne)
public static IMarker createBookmarkMarker(TestEditor editor,
CBActionElement element,
String message,
String fieldName,
Point location)
editor - TestEditor.element - CBActionElement. Primary element.message - String. Bookmark labelfieldName - String. Name of the field attribute.location - Point. Location within the field attribute.
Typically this is the same as selection, but not always.
Point.x is the beginning and Point.y is end, not the length, of the selection.
MarkerUtil.TEST_BOOKMARK
public static IMarker[] findBookmark(TestEditor editor,
CBActionElement element)
editor - TestEditor.element - CBActionElement. Primary element visible in editor tree.
element. The array is empty if no markers were found. Stale markers are not included.
public static IMarker createErrorMarker(TestEditor editor,
CBActionElement element,
String message,
int severity)
element in the tree.
editor - TestEditorelement - CBActionElement with errormessage - Error textseverity - int. One of the values defined in IMarker.IMarker.SEVERITY_ERROR,
IMarker.SEVERITY_WARNING,
IMarker.SEVERITY_INFO
public static IMarker createErrorMarker(TestEditor editor,
CBActionElement element1,
CBActionElement element2,
String message,
String attr_name,
int severity)
attribute_name name. Inside that control, the element2 will be selected.
editor - TestEditorelement1 - Primary objectelement2 - Secondary objectmessage - Error textattr_name - Name of the control that displays the secondary objectseverity -
IMarker.SEVERITY_ERROR,
IMarker.SEVERITY_WARNING,
IMarker.SEVERITY_INFOpublic static int getSeverity(IMarker marker)
marker - IMarker
public static String getMessage(IMarker marker)
marker - IMarker
public static IMarker createErrorMarker(TestEditor editor,
CBActionElement element,
String message,
String attribute_name,
int offset,
int len,
int line_number,
int severity)
element. The element is displayed in the tree. Navigation will set
selection to the element in the Main Tree and then set focus to the
control with attribute_name name. The control is assumed to be either StyledText or
Text. Inside that control, selection will be set to either offset/len,
or line_number.
editor - TestEditorelement - CBActionElement with errormessage - Error textattribute_name - name of the attribute/control.offset - beginning of the text region with error, or -1 if line_number is givenlen - end of the text region with error, or -1 for the entire text (if offset is not -1)line_number - the line with error, or -1 if offset is not -1.severity -
IMarker.SEVERITY_ERROR,
IMarker.SEVERITY_WARNING,
IMarker.SEVERITY_INFO
public static CBActionElement findModelObject(IMarker marker,
boolean type,
CBTest test)
marker - type - boolean. If type is true, the MarkerUtil.OBJECT_ID is is considered, otherwise it is MarkerUtil.SUBOBJECT_ID.
null if object not found.
public static void removeMarkers(IMarker[] markers,
TestEditor editor)
markers - IMArker[].editor - TestEditor
public static IMarker createSearchMatchMarker(TestEditor editor,
CBActionElement element1,
CBActionElement element2,
String matchText,
boolean caseSensitive,
String attr_name)
MarkerUtil.createSearchMatchMarker(TestEditor, CBActionElement, CBActionElement, String, boolean, boolean, String)
attribute_name name. Inside that control, the element2 will be selected.
editor - TestEditorelement1 - Primary objectelement2 - Secondary objectmatchText - Match textcaseSensitive - attr_name - Name of the control that displays the secondary object
public static IMarker createSearchMatchMarker(TestEditor editor,
CBActionElement element1,
CBActionElement element2,
String matchText,
boolean caseSensitive,
boolean regex,
String attr_name)
attribute_name name. Inside that control, the element2 will be selected.
editor - TestEditorelement1 - Primary objectelement2 - Secondary objectmatchText - Match textcaseSensitive - booleanregex - boolean.attr_name - Name of the control that displays the secondary object
public static IMarker createSearchMarker(TestEditor editor,
CBActionElement element,
String text)
element in the tree.
editor - TestEditorelement - CBActionElement with errortext - Match text.
public static IMarker createSearchMarker(TestEditor editor,
CBActionElement element,
String text,
boolean caseSensitive,
boolean regex,
String attribute_name,
int offset,
int len,
int line_number)
element. The element is displayed in the tree. Navigation will set
selection to the element in the Main Tree and then set focus to the
control with attribute_name name. The control is assumed to be either StyledText or
Text. Inside that control, selection will be set to either offset/len,
or line_number.
editor - TestEditorelement - CBActionElement with errortext - Search match textcaseSensitive - boolean.regex - boolean. Was the search don using regular expression.attribute_name - name of the attribute/control.offset - beginning of the text region with error, or -1 if line_number is givenlen - end of the text region with error, or -1 for the entire text (if offset is not -1)line_number - the line with error, or -1 if offset is not -1.
public static IMarker createSearchMarker(TestEditor editor,
CBActionElement element,
String text,
boolean caseSensitive,
String attribute_name,
int offset,
int len,
int line_number)
MarkerUtil.createSearchMarker(TestEditor, CBActionElement, String, boolean, boolean, String, int, int, int)
element. The element is displayed in the tree. Navigation will set
selection to the element in the Main Tree and then set focus to the
control with attribute_name name. The control is assumed to be either StyledText or
Text. Inside that control, selection will be set to either offset/len,
or line_number.
editor - TestEditorelement - CBActionElement with errortext - Search match textcaseSensitive - boolean.attribute_name - name of the attribute/control.offset - beginning of the text region with error, or -1 if line_number is givenlen - end of the text region with error, or -1 for the entire text (if offset is not -1)line_number - the line with error, or -1 if offset is not -1.
public static IMarker createGenericMarker(IResource resource,
String markerType,
String testId,
CBActionElement element,
String message,
int severity)
markerType
resource - - IResource of testsuitemarkerType - - type of the new marker. It's recommended for Bookmarks, Errors and Search markers to use those creation methods.testId - - id of the testelement - - CBActionElement to selectmessage - - String usage is consuming view-specificseverity - - int usage is consuming view-specific
public static void setId(IMarker marker,
String uniqueId)
marker - IMarker marker created by of the 'create' methods.uniqueId - String the ID which must be unique within the scope of the element for which the marker was created.public static String getUniqueId(IMarker marker)
|
IBM Rational Performance Tester SDK | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||