Skip to content
Tiago Martinho edited this page Jan 6, 2019 · 5 revisions

Overview:

This is a Java Search component meant to be integrated with PIDESCO for the Advanced Programming course project. It allows users to search for method, constructor, field, type and package declarations inside java files. It also provides its own service with listeners for other components to use. Users can also provide their own search implementation.

Functionality and provided services:

The functionality of the component is provided as a service called SearchService. Use of the SearchListener service is detailed in section 2. How to listen to the service. The following services are provided in the SearchService interface:

  • searchType(String input, PackageElement dir) - Searches type declarations in the current workspace for the given input and directory.

  • searchMethod(String input, PackageElement dir) - Searches method / constructor declarations in the current workspace for the given input and directory.

  • searchField(String input, PackageElement dir) - Searches field declarations in the current workspace for the given input and directory.

  • searchPackage(String input, PackageElement dir) - Searches package declarations in the current workspace for the given input and directory.

  • addListener(SearchListener listener) - Adds a Search listener. If the listener already exists, does nothing.

  • removeListener(SearchListener listener) - Removes a Search listener. If the listener is not registered, does nothing.

Clone this wiki locally