Integrating IntelliJ IDEA

From BaseX Documentation

(Difference between revisions)
Jump to: navigation, search
Line 77: Line 77:
[[File:Intellij-new-query-processor.png]]
[[File:Intellij-new-query-processor.png]]
* Click ''OK'' to exit the ''New Query Processor Instance'' dialog.
* Click ''OK'' to exit the ''New Query Processor Instance'' dialog.
-
* In the ''Manage Query Processors'' dialog, now choose the "BaseX 9.1.1 (BaseX)" entry and click ''OK''.
+
* In the ''Manage Query Processors'' dialog, now choose the "BaseX [''Version] (BaseX)" entry and click ''OK''.
-
* The ''Query Processor'' dropdown box in the ''Run/Debug Configurations'' dialog should now also display "BaseX 9.1.1 (BaseX)". If not, select it from the dropdown box.
+
* The ''Query Processor'' dropdown box in the ''Run/Debug Configurations'' dialog should now also display "BaseX [''Version''] (BaseX)". If not, select it from the dropdown box.
* Click ''Apply'' and then ''OK'' to close the ''Run/Debug Configurations'' dialog.
* Click ''Apply'' and then ''OK'' to close the ''Run/Debug Configurations'' dialog.
Line 90: Line 90:
* Choose the "XQuery" template you configured earlier.
* Choose the "XQuery" template you configured earlier.
* Enter a name, e.g. "BaseX", into the ''Name'' field.
* Enter a name, e.g. "BaseX", into the ''Name'' field.
-
* The query processor should be preset to "BaseX 9.1.1 (BaseX)".
+
* The query processor should be preset to "BaseX [''Version''] (BaseX)".
* In the ''Script File'' field, enter the path to your query file.
* In the ''Script File'' field, enter the path to your query file.
[[File:Intellij-xquery-configuration.png]]
[[File:Intellij-xquery-configuration.png]]

Revision as of 07:23, 6 May 2019

This article is part of the Getting Started Section. It describes how to run XPath/XQuery code from within the IntelliJ IDEA IDE. There are currently two XQuery plugins for IntelliJ IDEA on the market:

Contents

Preparations

The following steps apply to all operating systems and both plugins:

xquery-intellij-plugin

This section focuses on Reece H. Dunn's xquery-intellij-plugin.

Installation

After installing IntelliJ IDEA and BaseX, install the xquery-intellij-plugin by one of the following methods:

From the Start Screen

Intellij-startbildschirm.png

From the IntelliJ IDEA Menu

Configuring The Processor

Intellij-xquery-settings-2.png

Querying Your Data

Create a New Project

Customize the XQuery Module

Intellij-add-configuration.png

Intellij-new-query-processor.png

Create a Query File

Create a New Configuration

Intellij-xquery-configuration.png

Intellij-run-button.png

Execute Your Query

XQuery Support Plugin

This section focuses on Grzegorz Ligas' XQuery Support plugin.

Installation

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

From the Start Screen

From the IntelliJ IDEA Menu

Setting Up

File Extensions and XQuery Flavor

Intellij-xquery-settings.png

Configuring The Processor

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

Standalone

Client

This assumes that you already have a BaseX database named factbook.

Intellij-basex-data-source.png

Querying Your Data

Create a New Project

Customize the XQuery Module

Intellij-add-configuration.png

Create a Query File

Intellij-query.png

Create a New Configuration

Intellij-xquery-configuration2.png

Intellij-run-button.png


Execute Your Query

Personal tools
Namespaces
Variants
Actions
Navigation
Print/export