Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.search.core.text
Class TextSearchMatchAccess


java.lang.Object
  extended by 
org.eclipse.search.core.text.TextSearchMatchAccess

public abstract class TextSearchMatchAccess
extends Object

A TextSearchMatchAccess gives access to a pattern match found by the TextSearchEngine.

Please note that TextSearchMatchAccess objects do not have value semantic. The state of the object might change over time especially since objects are reused for different call backs. Clients shall not keep a reference to a TextSearchMatchAccess element.

This class should only be implemented by implementors of a TextSearchEngine.

Since:
3.2

Constructor Summary
TextSearchMatchAccess ()
           
 
Method Summary
abstract   IFile getFile ()
          Returns the file the match was found in.
abstract   String getFileContent (int offset, int length)
          Returns the file's content at the given offsets.
abstract  char getFileContentChar (int offset)
          Returns a character of the file's content at the given offset
abstract  int getFileContentLength ()
          Returns the length of this file's content.
abstract  int getMatchLength ()
          Returns the length of this search match.
abstract  int getMatchOffset ()
          Returns the offset of this search match.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextSearchMatchAccess

public TextSearchMatchAccess()
Method Detail

getFile

public abstract 
IFile getFile()
Returns the file the match was found in.

Returns:
the file the match was found.

getMatchOffset

public abstract int getMatchOffset()
Returns the offset of this search match.

Returns:
the offset of this search match

getMatchLength

public abstract int getMatchLength()
Returns the length of this search match.

Returns:
the length of this search match

getFileContentLength

public abstract int getFileContentLength()
Returns the length of this file's content.

Returns:
the length of this file's content.

getFileContentChar

public abstract char getFileContentChar(int offset)
Returns a character of the file's content at the given offset

Parameters:
offset - the offset
Returns:
the character at the given offset
Throws:
IndexOutOfBoundsException - an IndexOutOfBoundsException is thrown when the offset is negative or not less than the file content's length.

getFileContent

public abstract 
String getFileContent(int offset,
                                      int length)
Returns the file's content at the given offsets.

Parameters:
offset - the offset of the requested content
length - the of the requested content
Returns:
the substring of the file's content
Throws:
IndexOutOfBoundsException - an IndexOutOfBoundsException is thrown when the offset or the length are negative or when offset + length is not less than the file content's length.

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire