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

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

  




 

 


Eclipse JDT
Release 3.5

org.eclipse.jdt.ui.search
Interface IMatchPresentation


public interface IMatchPresentation

This interface serves to display elements that a search participant has contributed to a search result.

Each IMatchPresentation is associated with a particular IQueryParticipant. The IMatchPresentation will only be asked to handle elements and matches which its IQueryParticipant contributed to the search result. If two search participants report matches against the same element, one of them will be chosen to handle the element.

Clients may implement this interface.

Since:
3.0

Method Summary
  ILabelProvider createLabelProvider ()
          Creates a new instance of a label provider for elements that have been contributed to a search result by the corresponding query participant.
 void showMatch ( Match match, int currentOffset, int currentLength, boolean activate)
          Opens an editor on the given element and selects the given range of text.
 

Method Detail

createLabelProvider

ILabelProvider createLabelProvider()
Creates a new instance of a label provider for elements that have been contributed to a search result by the corresponding query participant. The search view will call this method when it needs to render elements and will dispose the label providers when it is done with them. This method may therefore be called multiple times.

Returns:
A label provider for elements found by the corresponding query participant.

showMatch

void showMatch(
Match match,
               int currentOffset,
               int currentLength,
               boolean activate)
               throws 
PartInitException
Opens an editor on the given element and selects the given range of text. The location of matches are automatically updated when a file is edited through the file buffer infrastructure (see ITextFileBufferManager). When a file buffer is saved, the current positions are written back to the match. If the activate parameter is true the opened editor should have be activated. Otherwise the focus should not be changed.

Parameters:
match - The match to show.
currentOffset - The current start offset of the match.
currentLength - The current length of the selection.
activate - Whether to activate the editor the match is shown in.
Throws:
PartInitException - If an editor can't be opened.

Eclipse JDT
Release 3.5

Copyright (c) IBM Corp. and others 2000, 2008. All Rights Reserved.

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