org.eclipse.mat.ui.snapshot.panes.oql.contentAssist
Class FieldsSuggestionProvider

java.lang.Object
  extended by org.eclipse.mat.ui.snapshot.panes.oql.contentAssist.FieldsSuggestionProvider
All Implemented Interfaces:
SuggestionProvider

public class FieldsSuggestionProvider
extends Object
implements SuggestionProvider

Provides the list of classnames in the snapshot that starts with the provided context String.


Constructor Summary
FieldsSuggestionProvider(ISnapshot snapshot)
          Builds this object passing the snapshot
 
Method Summary
 List<ContentAssistElement> getSuggestions(String context)
          Returns the list of ICompletionProposals It scans the ordered set up to the first valid element.
 void setClassesSuggestions(ISnapshot snapshot, IContextInformation[] classSuggestions)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldsSuggestionProvider

public FieldsSuggestionProvider(ISnapshot snapshot)
Builds this object passing the snapshot

Parameters:
snapshot -
Method Detail

setClassesSuggestions

public void setClassesSuggestions(ISnapshot snapshot,
                                  IContextInformation[] classSuggestions)

getSuggestions

public List<ContentAssistElement> getSuggestions(String context)
Returns the list of ICompletionProposals It scans the ordered set up to the first valid element. Once it is found it fills the temporary list with all the elements up to the first which is no more valid. At that point it returns.

Specified by:
getSuggestions in interface SuggestionProvider
Parameters:
context - is the prefix to be searched from. It can be an empty String but must not be null.
Returns:
the list of suggestion proposals.