winIDEA SDK
|
This adapter class contains line description based on file/line contents not on line number.
It is used to to define source code line, which location may change when source file is modified.
#include <CAddressController.h>
Public Types | |
enum | EResourceType { E_RESOURCE_FUNCTION , E_RESOURCE_FILE , E_RESOURCE_ADDRESS } |
Type of resource, where test point is located. More... | |
enum | ESearchContext { E_SEARCH_ANY , E_SEARCH_CODE , E_SEARCH_COMMENT } |
Defines which part of source file is searched for pattern. More... | |
enum | EMatchingType { E_MATCH_PLAIN , E_MATCH_REG_EX , E_MATCH_TEST_POINT_ID } |
Defines type of pattern matching. More... | |
enum | EFileLocation { ELocalHost , EWinIDEAHost } |
Defines where to get source code from. More... | |
Public Member Functions | |
CLineDescription (EResourceType resourceType, std::string resourceName, int line, bool isSearch, int linesRange, ESearchContext searchContext, EMatchingType matchingType, std::string searchPattern, int lineOffset, EFileLocation fileLocation=ELocalHost) | |
Instantiates this class. More... | |
EResourceType | getResourceType () |
Returns type of resource for which location is given. | |
std::string | getResourceName () |
Returns name of resource where test point is located. | |
int | getLine () |
Returns line number, where test point is set, or where search range starts (if pattern is defined). More... | |
bool | isSearch () |
Returns true, if search is to be performed. More... | |
int | getLinesRange () |
Returns the number of lines, which are searched for pattern. More... | |
ESearchContext | getSearchContext () |
Returns search context for pattern. | |
EMatchingType | getMatchingType () |
Returns matching type for pattern. | |
std::string | getSearchPattern () |
Returns search pattern. More... | |
int | getLineOffset () |
Returns the number of lines, which are added to line found by search pattern above. | |
EFileLocation | getFileLocation () |
Returns source location. | |
std::string | toString () |
Returns contents of object as string. More... | |
|
inline |
Instantiates this class.
resourceType | defines where to look for location |
resourceName | name of file or function, depending on the first parameter |
line | line in file or function, 0-based. If isSearch is true, this is line where search is started |
isSearch | if true, line with the specified pattern is searched |
linesRange | how many lines to search. Set it to 0 for no limit (till the end of file) |
searchContext | see CLineDescription::ESearchContext |
matchingType | see CLineDescription::EMatchingType |
searchPattern | text pattern to search in lines, format depends on matchingType |
lineOffset | the number of lines to add to the found line |
fileLocation | defines where to look for source files - on local host running the script, or on remote host running winIDEA. If winIDEA is running on the same host as script, use the default value. |
|
inline |
Returns line number, where test point is set, or where search range starts (if pattern is defined).
Lines for file are 1-based, while lines for function are 0 based and can also be negative.
|
inline |
Returns the number of lines, which are searched for pattern.
Value 0 means till the end of file.
|
inline |
Returns search pattern.
If this item is not defined (empty string is returned), then test point is located in line returned by getLine()
. No search is performed. Num lines, search context, and matching type are ignored.
|
inline |
Returns true, if search is to be performed.
Otherwise the line number returned by getLine() is used to set a test point.
|
inline |
Returns contents of object as string.
Use this for logging/debugging purposes only.