Getting Started with Ekeko
This tutorial walks you through the steps necessary to start querying an Eclipse workspace.
Ensure that plugin dependencies org.eclipse.jdt.astview and Counterclockwise are already installed.
Install the prebuilt Ekeko plugin from the Eclipse update site: http://soft.vub.ac.be/~cderoove/eclipse/
Ekeko has been tested against Eclipse Kepler (4.4)
See Installing New Software for help on installing Eclipse plugins from an update site.
See the Eclipse FAQ How do I increase the heap size available to Eclipse? to ensure Ekeko and its dependencies will not run out of memory, especially when whole-program analyses have to be run.
See the screen recording:
-
Select the projects to query:
Right-click on each project, choose "Configure > Include in Ekeko Queries". -
Start an Ekeko-hosted REPL:
Choose "Ekeko > Start nRepl" from the main Eclipse menu. A dialog shows the port on which the nRepl server listens. -
Connect to the Ekeko-hosted REPL: Choose "Window > Connect to REPL" to connect to this port. A Counterclockwise REPL view now opens.
-
Switch the REPL to the damp.ekeko namespace:
Evaluate the following expressions in the bottom pane of the REPL view:
(use 'damp.ekeko)
(in-ns 'damp.ekeko)
- Launch a query: Evaluate the following expression to launch a query that will find each argument ?arg to every method invocation ?inv in the selected Eclipse JDT projects:
(ekeko* [?inv ?arg]
(ast :MethodInvocation ?inv)
(child :arguments ?inv ?arg))
A new view opens that enables inspecting the results of the query. See the [http://soft.vub.ac.be/SOUL/home/querying-from-eclipse/running-and-inspecting-a-query/](Barista documentation) for more information about this view.
See Example-Ekeko-Queries for other queries to try.