Eclipse Platform
Release 3.2

org.eclipse.search.ui.text
Class SearchMatchInformationProvider

java.lang.Object
  extended byorg.eclipse.search.ui.text.SearchMatchInformationProvider
Direct Known Subclasses:
AbstractSearchMatchInformationProvider

public abstract class SearchMatchInformationProvider
extends Object

Abstract base class for information providers supplied via the org.eclipse.search.textSearchMatchInformationProvider extension point. An implementation of a SearchMatchInformationProvider can evaluate line information and locations for a given match.

  • LOCATION_STRING_LITERAL match inside a string literal
  • LOCATION_COMMENT match inside a comment
  • LOCATION_IMPORT_OR_INCLUDE_STATEMENT match inside import / include statement
  • LOCATION_PREPROCESSOR_DIRECTIVE match inside a preprocessor directive
  • LOCATION_FUNCTION match inside function
  • LOCATION_OTHER match if the location can not be assigned to any of the other locations.
  • Since:
    3.2

    Nested Class Summary
    static class SearchMatchInformationProvider.LineInformation
              Information about a line of a match.
     
    Field Summary
    static int LOCATION_COMMENT
              Id for the comment location
    static int LOCATION_FUNCTION
              Id for the function location
    static int LOCATION_IMPORT_OR_INCLUDE_STATEMENT
              Id for the import and include location
    static int LOCATION_OTHER
              Id for the 'Other' location
    static int LOCATION_PREPROCESSOR_DIRECTIVE
              Id for the preprocessor location
    static int LOCATION_STRING_LITERAL
              Id for the String literal location
     
    Constructor Summary
    SearchMatchInformationProvider()
               
     
    Method Summary
    abstract  SearchMatchInformationProvider.LineInformation getLineInformation(TextSearchMatchAccess match)
              Returns information about the lines containing the given match.
     int getLocationKind(TextSearchMatchAccess match)
              Returns the kind of location the given match starts in.
     void reset()
              Notification sent to tell a information provider to clear all cached information.
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    LOCATION_OTHER

    public static final int LOCATION_OTHER
    Id for the 'Other' location

    See Also:
    Constant Field Values

    LOCATION_STRING_LITERAL

    public static final int LOCATION_STRING_LITERAL
    Id for the String literal location

    See Also:
    Constant Field Values

    LOCATION_COMMENT

    public static final int LOCATION_COMMENT
    Id for the comment location

    See Also:
    Constant Field Values

    LOCATION_IMPORT_OR_INCLUDE_STATEMENT

    public static final int LOCATION_IMPORT_OR_INCLUDE_STATEMENT
    Id for the import and include location

    See Also:
    Constant Field Values

    LOCATION_PREPROCESSOR_DIRECTIVE

    public static final int LOCATION_PREPROCESSOR_DIRECTIVE
    Id for the preprocessor location

    See Also:
    Constant Field Values

    LOCATION_FUNCTION

    public static final int LOCATION_FUNCTION
    Id for the function location

    See Also:
    Constant Field Values
    Constructor Detail

    SearchMatchInformationProvider

    public SearchMatchInformationProvider()
    Method Detail

    reset

    public void reset()
    Notification sent to tell a information provider to clear all cached information.


    getLineInformation

    public abstract SearchMatchInformationProvider.LineInformation getLineInformation(TextSearchMatchAccess match)
    Returns information about the lines containing the given match.

    Parameters:
    match - the match to get the line information for.
    Returns:
    the information about the provided match.

    getLocationKind

    public int getLocationKind(TextSearchMatchAccess match)
    Returns the kind of location the given match starts in.

    Parameters:
    match - the match to get the location for
    Returns:
    one of the location constants defined in SearchMatchInformationProvider.

    Eclipse Platform
    Release 3.2

    Guidelines for using Eclipse APIs.

    Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.