Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EMF Search---Quick Start Guide"

(Generate Search Wizard)
(Generate Model, Edit & Editor)
Line 27: Line 27:
  
 
In order to avoid generated MoviesDb Search infrastructure being useless you need first to get Movies Db Model, Edit, Editor plugins generated from GenModel Editor like any other usual EMF projects.
 
In order to avoid generated MoviesDb Search infrastructure being useless you need first to get Movies Db Model, Edit, Editor plugins generated from GenModel Editor like any other usual EMF projects.
 +
 +
[[Image:GenerateMoviesDbModelEditAndEditorPlugins.png|450px|Generate Model, Edit, Editor Plugins from GenModel Editor]]
  
 
(Note that you could be able to generate search stuff without these plugins existing, but the demo need these 3 Movies Db plugins at runtime).
 
(Note that you could be able to generate search stuff without these plugins existing, but the demo need these 3 Movies Db plugins at runtime).
 
 
  
 
==== Generate Search Wizard ====
 
==== Generate Search Wizard ====

Revision as of 18:07, 21 April 2008

This quick start guide will explain :

  • Steps to generate textual search infrastructure for arbitrary Ecore model (Here MoviesDb)
  • Generated Code and relations to EMF Search framework architecture
  • Explain Extensibility in context of this example
  • Hints for code customizations


Movies DB Example

Fisrt, you need to grab org.eclipse.emf.search.tests plugin from CVS :

connection : pserver
host : dev.eclipse.org
repository : /cvsroot/modeling
module : org.eclipse.emf/org.eclipse.emf.search/tests/org.eclipse.emf.search.tests
login/pwd : anonymous/anonymous

EMF Search Tests CVS Module

Here is the full directory structure to get in order to be able to replay this "tutorial" :

MoviesDb Containing Plugin


Generate Model, Edit & Editor

In order to avoid generated MoviesDb Search infrastructure being useless you need first to get Movies Db Model, Edit, Editor plugins generated from GenModel Editor like any other usual EMF projects.

Generate Model, Edit, Editor Plugins from GenModel Editor

(Note that you could be able to generate search stuff without these plugins existing, but the demo need these 3 Movies Db plugins at runtime).

Generate Search Wizard

Once you generated the Movies Db Model, Edit & Editor plugins, you can right click on the moviesDb.genmodel in the package explorer and invoke "EMF Search > Generate Textual Search Infrastructure"

As a result you get a Wizard proposing all EString/String Eattributes coming from the 3 existing packages : db, order, customer. You need to select at least one of these textual features prior proceeding with code generation for Core and/or UI Search infrastructure.

Movies Db Launch Configuration

In order to see your newly generated Movies DB Search in action, you need to create a new launch configuration :

Be sure the following pluins are checked in the "plugins" tab :

org.eclipse.emf.search.tests.movies
org.eclipse.emf.search.tests.movies.edit
org.eclipse.emf.search.tests.movies.editor
org.eclipse.emf.search.tests.movies.search
org.eclipse.emf.search.tests.movies.search.ui

Open Movies DB Search Page

Now you can open the Movies Db Search Page :

As a result your custom Movies Db Search Page is displayed in a multi tab dialog :

Note that participant tabs have been created for each of db, customer, order packages plus an additional one containing the union of all the classifiers coming from these 3 packages.

Run A Textual Query On Customer Element

Once you got the cutomer participant tab selected, you could selected Customer element partcipant to get a textual query only qpplied on EString Attribute selected for generation.

As a result you get the customers which textual query matched with previously selected EString attributes.

Back to the top