Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.maddyhome.idea.vim.ex.range
Class SearchRange  view SearchRange download SearchRange.java

java.lang.Object
  extended bycom.maddyhome.idea.vim.ex.range.AbstractRange
      extended bycom.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.


Field Summary
private  java.util.ArrayList flags
           
private static Logger logger
           
private  java.util.ArrayList patterns
           
 
Fields inherited from class com.maddyhome.idea.vim.ex.range.AbstractRange
move, offset
 
Constructor Summary
SearchRange(java.lang.String pattern, int offset, boolean move)
          Create the pattern range
 
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.
 
Methods inherited from class com.maddyhome.idea.vim.ex.range.AbstractRange
createRange, getLine, getOffset, isMove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

patterns

private java.util.ArrayList patterns

flags

private java.util.ArrayList flags

logger

private static Logger logger
Constructor Detail

SearchRange

public SearchRange(java.lang.String pattern,
                   int offset,
                   boolean move)
Create the pattern range

Method Detail

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