[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[xtext-dev] EMF Index - first shot
|
Hi,
I've checked in a first version of the EMF Index into the Xtext
repository.
Currently, it roughly works as follows:
Backend:
- We store information on EPackages and EClasses, as well as
Resources, EObjets and CrossReferences.
- We never store/return elements but rather descriptors that enable
instantiation. E.g., an EObject can be instantiated from the
EObjectDescriptor.getFragmentURI().
- The index storage backend (IIndexStore) is pluggable. Currently
there is a single implementation for an in-memory index that is not
persisting any information between workbench starts. Other backends
should be easy to implement (Database, CDO,...)
- The information that is extracted for indexing is configurable by
factories. The way these factories are registered is likely to change.
- The IIndexStore consists of one DAO per descriptor type that can be
used to create generic queries. These generic queries can be
configured using some kind of fluent API.
- Particular queries needed by the backend have extra creation methods
in their respective DAOs, such that an IIndexStore implementor can
provide optimized versions. A utility class maps these custom queries
to generic ones, providing a default implementation for that query.
- An IndexFeeder is used to feed the information into the index store.
UI:
- A nature has to be added to all "watched projects"
- A builder updates the index on file changes. Deletion of files is
not handled yet.
- An example UI action shows how to search for EClasses.
- At startup, the EPackage.Registry is indexed as well as all projects
that have the EMF Index nature.
Issues:
- Lots of them :-)
- It currently has a dependency to Xtext, as we need the classpath URI
protocol aware XtextResourceSet.
- The feeder needs more testing.
Next steps:
- Performance / memory analysis
- Integration Xtext services, such as with ScopeProvider, Navigation,
etc.
I've also sent a mail to the EMO, requesting the creation review for
the EMF Index project.
Best regards
Jan
--
Dr. Jan Köhnlein
Senior Software Architekt
Telefon: +49 (0) 431 / 5606-337
Mobile: +49 (0) 151 / 17396687
Telefax: +49 (0) 431 / 5606-339
http://www.itemis.de
jan.koehnlein@xxxxxxxxx
itemis AG
Niederlassung Kiel
Schauenburgerstr. 116
24118 Kiel
http://www.itemis.de/
Rechtlicher Hinweis:
Registergericht: Amtsgericht Dortmund HRB 20621
Sitz der Gesellschaft: Lünen
Vorstand: Wolfgang Neuhaus, Jens Wagener, Dr. Georg Pietrek
Aufsichtsrat: Prof. Dr. Burkhard Igel (Vorsitzender), Stephan
Grollmann, Michael Neuhaus