Integrating IntelliJ IDEA

From BaseX Documentation

Jump to: navigation, search

This article is part of the Getting Started Section. It describes how to run XPath/XQuery code from within the IntelliJ IDEA IDE.

Contents

[edit] Installation

The following steps apply to all operating systems:

This article focuses on Grzegorz Ligas' XQuery Support plugin.

After installing IDEA and BaseX, install the XQuery Support plugin by one of the following methods:

[edit] From the Start Screen

  1. Start IDEA and select ConfigurePlugins.
  2. In the Plugins window select Browse Repositories.
  3. In the Browse Repositories window, search for (or scroll to) XQuery Support.
  4. You will be prompted to restart IDEA to load the new plugin.

[edit] From the File Menu

  1. Select Settings.
  2. In the Settings window select Plugins.
  3. In the Plugins window select Browse Repositories.
  4. In the Browse Repositories window, search for (or scroll to) XQuery Support.
  5. You will be prompted to restart IDEA to load the new plugin.

[edit] Setting Up

[edit] File Extensions and XQuery Flavor

[edit] Configuring The Processor

You can set up the plugin as a standalone processor or client.

[edit] Standalone

  1. Start IDEA and navigate to Settings (OS dependent).
  2. In the settings window select Other SettingsXQuery Data Sources
  3. Select BaseX (native embedded).
  4. Check the User defined XQJ Driver radio box.
  5. Using the +, add the following jars: BaseX.jar, basex-api-8.6.1.jar, basex-xqj-8.6.jar, and xqj2-0.2.0.jar from your BaseX distribution.

[edit] Client

This assumes that you already have a database named factbook.

  1. Start IDEA and navigate to Settings (OS dependent).
  2. In the settings window select Other SettingsXQuery Data Sources
  3. Using the +, select BaseX as your data source
  4. Fill in the appropriate connection details; e.g. default values:
    • Host = localhost
    • Port = 1984
    • Database name = factbook
    • Username = admin
    • Password = admin
  5. Select Apply, then OK and your BaseX factbook database is ready to query.
Personal tools
Namespaces
Variants
Actions
Navigation
Print/export