Open HeikoKlare opened 1 year ago
Extend the Eclipse File Search to include the ability to search within dependencies.
Existing Java Search Method:
Attempt at a Workaround:
Effort vs Reward:
Limitation of Direct Extension:
The path to extending the Eclipse File Search to include searching within dependencies, though conceivable, presents substantial challenges in terms of implementation and efficiency. There is not apparent easy solution using existing functionality provided by the Java Search to achieve a similar workaround solution. A viable solution would require much in depth work, especially in understanding and adapting the File Search Engine.
Current Behavior
The Eclipse full-text search search does only provide the ability to search in files within the workspace. It does not provide the ability to search within, e.g., included libraries either placed as JARs within a project or provided via the target platform.
Expected Behavior
It shall be possible to search for contents of Java files within references libraries of a Java / plug-in project via the full-text search. Important scopes for us are:
To this end, there shall be an additional
Search In
option within theFile Search
that allows to search within additional resources referenced by a project, such as libraries used by a Java or plug-in project. What exactly shall be included in these referenced resources is a matter of the type of project and matter of further discussion when providin the feature as a PR. Also the name of this search option has to be defined is mocked as "project-referenced resources" in the follow image:The semantics of that option shall be that for all projects contained within the search scope, their references resources shall be searched as well. To this end, a
Project
has to be extended to provide itsreferenced resources
(or it has to be provided via a project nature). Basically, this should be everything that is represented under the project in the project tree (such as the project explorer). As an example, a Java project should provide everything referenced via the classpath, and a plug-in project should provide the plug-in dependencies provided via the target platform.The search within these referenced resource should behave as if they were contained as folders within the project tree, as also defined for searching within archives in #18. This feature should thus depend on #18 and reuse the functionality for searching within archives for, e.g., searching within referenced Java libraries.
Problem Analysis
The problem can be split up into two parts:
18
This issue requires the first part as a preliminary realized by #18 and focuses on realizing the second part on top of it.
Solution Increments
Additional Information
There is a project that has already developed a search function that potentially covered the explained use case: https://github.com/ajermakovics/eclipse-instasearch