What is Search Console
Search console is an Eclipse-based search framework with enhanced user experience and extensibility capabilities. It aims to provide the Next-generation search framework of Eclipse. It is expected that search console will ultimately support both existing org.eclipse.search extensions, and “native” Search Console extensions.
How to install search console
We recommend using the latest milestone release of the E4 update site.
It can be found in the "0.12 Stream Stable Builds" section at http://download.eclipse.org/e4/downloads/ .
From the Eclipse Install manager, select the category "E4 Search". You can individally install the Search Console framework, the example search contributor, and the "Compatibility" feature (latter is explained below). Source features are also available on the site from build I20110809-2000 afterwards, and will be available in the 4.2 Milestone 2 Build.
Those who want the bleeding edge, can consume the latest integration build of E4:
http://download.eclipse.org/e4/downloads/ -> 0.11 Stream Integration Builds -> Select the latest build you see there.(If 404 not found is returned, select next latest build). Click on "online p2 repo link" - that is the update site.
How to get search console source code
You can either install the source features from the update site (suitable if you want to develop an extension for search console), or fetch the sources from the Git repo, if you want to modify the sources / contribute back to the community.
Here are the links to our repository:
The source code of an example search provider is under folder /examples in our repo. This can prove very useful if you want to implement a search provider.
Filing a bug
Developer guide is available at https://bugs.eclipse.org/bugs/attachment.cgi?id=180106
What are the version / distribution requirements
Search console only depends on the core Eclipse SDK plugins. It has been tested, and is supported, on Eclipse SDK versions 3.7 and later. This includes versions 4.1, 4.2 and later of Eclipse SDK.
Search console does not depend on the org.eclipse.core.resources bundle.
Since Search Console has no explicit version requirements, it may run successfully on Eclipse SDK 3.5 and 3.6. However this is not officially supported and tested.
I wish to contribute
You're welcome! Follow the standard drill. It's easiest to open a bug with a patch on component E4/Search, or write directly to firstname.lastname@example.org .
General coding guidelines
- There must be clear separation between business and user interface logic. The search console makes use of the Model-view-presenter pattern where the user interface is a passive component managed by a controller.
- Good coding practices must be followed:
- SOLID principles
- Code duplication is avoided (DRY principle)
- Methods and classes are short with cyclomatic complexity below 2
- Names of methods, classes and interfaces describe the intended behavior; code is self-documented and readable
- Classes are recommended to communicate with each other via interfaces. This results in loose coupling and makes testing easier
- Javadoc for public API is mandatory
- Each feature must be complemented by automated tests which provide code coverage of above 70% (the more, the better)
- Test driven development is the preferred implementation style
- All tests must be automated
- Tests are isolated (prefer unit tests over integration tests)
- Mocking frameworks are used when implementing tests. Existing tests use Jmock 1.2, EasyMock, Mockito (all available in Orbit). Having experience with all these three frameworks, we recommend Mockito
- User interface tests
- Use SwtBot to simulate user interaction
- Make use of the page object paradigm in order to isolate test implementation from the UI test framework (SwtBot). See package org.eclipse.platform.discovery.ui.test.comp.internal.pageobjects for examples of page objects
- Use a dedicated test shell to embed the user interface under test
- Productive code guidelines have to be kept for test code as well
Why am i seeing search types that do nothing?
Because it's work in progress. These are the compatibility search types, which adapt the extensions contributed to the org.eclipse.search.searchPages extension point, to the Search console framework.
There is a prototype of the compatibility layer in the prototype branch. If interested, you can check it out, run it inside a runtime worbench, and give your feedback. You can post comments in in https://bugs.eclipse.org/bugs/show_bug.cgi?id=331581
How can I disable the compatibility search types?
Just deselect the Compatibility feature when installing. This is available from integration build I20110630-1005 afterwards.