java.lang.Object
com.maddyhome.idea.vim.ex.range.AbstractRange
com.maddyhome.idea.vim.ex.range.SearchRange
- All Implemented Interfaces:
- com.maddyhome.idea.vim.ex.Range
- public class SearchRange
- extends AbstractRange
Represents a range given by a search pattern. The pattern can be '\\/', '\\?', '\\&', /{pattern}/,
or ?{pattern}?. The last two can be repeated 0 or more times after any of the others.
|
Method Summary |
protected int |
getRangeLine(Editor editor,
DataContext context,
boolean lastZero)
Gets the line number specified by this range without regard to any offset. |
private void |
setPattern(java.lang.String pattern)
Parses the pattern into a list of subpatterns and flags |
java.lang.String |
toString()
Convert this Object to a human-readable String. |
patterns
private java.util.ArrayList patterns
flags
private java.util.ArrayList flags
logger
private static Logger logger
SearchRange
public SearchRange(java.lang.String pattern,
int offset,
boolean move)
- Create the pattern range
setPattern
private void setPattern(java.lang.String pattern)
- Parses the pattern into a list of subpatterns and flags
getRangeLine
protected int getRangeLine(Editor editor,
DataContext context,
boolean lastZero)
- Gets the line number specified by this range without regard to any offset.
- Specified by:
getRangeLine in class AbstractRange
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object
- Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method
never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string
concatenation with this object. If the result is
null, string concatenation will instead
use "null".
The default implementation returns
getClass().getName() + "@" +
Integer.toHexString(hashCode()).
- Overrides:
toString in class AbstractRange