| org.netbeans.modules.cnd.gotodeclaration.element.spi.ElementProvider
All known Subclasses: org.netbeans.modules.cnd.gotodeclaration.element.providers.FuncVarElementProvider, org.netbeans.modules.cnd.gotodeclaration.element.providers.BaseProvider, org.netbeans.modules.cnd.gotodeclaration.element.providers.MacroProvider,
ElementProvider | public interface ElementProvider (Code) | | An Element Provider participates in the Goto Function or Variable
(Go to Elemet) dialog by searching elements by their name
ad returning the list of elements that suit
The Elements Providers are registered via Lookup.
author: Vladimir Kvashin |
Method Summary | |
void | cancel() Cancel the current operation, if possible. | void | cleanup() Is called when the Go to Element dialog is dismissed. | String | getDisplayName() | Collection<? extends ElementDescriptor> | getElements(Project project, String text, SearchType type, boolean first) Provide a list of ElementDescriptor
that match the given search text for the given search type. | boolean | isSuitable() Used to determine whether the action should be enable or not
Returns true if there is a chance that this provider will return data,
otherwise false. | String | name() |
cancel | void cancel()(Code) | | Cancel the current operation, if possible.
Is called when user has typed something or just cancelled the dialog
|
cleanup | void cleanup()(Code) | | Is called when the Go to Element dialog is dismissed.
Should perform necessary cleanup.
|
getDisplayName | String getDisplayName()(Code) | | Describe this provider for the user,
in case we want to offer filtering
capabilities in the Go To Element dialog
A display name describing the types being provided by this ElementProvider,such as "Java Types", "C/C++ Types", etc. |
getElements | Collection<? extends ElementDescriptor> getElements(Project project, String text, SearchType type, boolean first)(Code) | | Provide a list of ElementDescriptor
that match the given search text for the given search type.
This might be a slow operation.
The
ElementProvider.cancel might be called during the operation,
in this case the method should return as soon as possible
(the results will be inclimplete in this case)
The method is called for the current project,
the for each open project other then current one.
Parameters: project - limits the search to the given project. Parameters: text - The text to be used for the search; e.g. when type=SearchType.PREFIX,text is the prefix that all returned types should start with. Parameters: type - A type of search to be performed, such as prefix, regexp or camel case. Parameters: first - true if this is 1-st call for the given search text(usually provider is called in cycle for projects) A collection of ElementDescriptors that match the given search criteria |
isSuitable | boolean isSuitable()(Code) | | Used to determine whether the action should be enable or not
Returns true if there is a chance that this provider will return data,
otherwise false.
|
name | String name()(Code) | | Describe this provider with an internal name,
in case we want to provide
some kind of programmatic filtering
An internal String uniquely identifying this type provider, such as "c/c++" or "java" |
|
|