Integrating IntelliJ IDEA

From BaseX Documentation

(Difference between revisions)
Jump to: navigation, search
Line 32: Line 32:
===From the IntelliJ IDEA Menu===
===From the IntelliJ IDEA Menu===
-
* Select ''Settings/Preferences'' in the ''IntelliJ IDEA'' menu.
+
* Select ''Settings'' (Windows)/''Preferences'' (macOS) in the ''IntelliJ IDEA'' menu.
* In the Settings/Preferences window, select ''Plugins''.
* In the Settings/Preferences window, select ''Plugins''.
* In the Plugins window, select the tab ''Marketplace''.
* In the Plugins window, select the tab ''Marketplace''.
Line 42: Line 42:
===File Extensions and XQuery Flavor===
===File Extensions and XQuery Flavor===
-
* Start IntelliJ IDEA and navigate to ''Settings/Preferences'' either using the ''Configure'' button on the start screen or the ''IntelliJ IDEA'' menu.
+
* Start IntelliJ IDEA and navigate to ''Settings'' (Windows)/''Preferences'' (macOS) either using the ''Configure'' button on the start screen or the ''IntelliJ IDEA'' menu.
* In the Settings/Preferences window, expand the ''Languages & Frameworks'' item, select ''XQuery'' and choose which default file extensions and which XQuery flavor you would like to use.
* In the Settings/Preferences window, expand the ''Languages & Frameworks'' item, select ''XQuery'' and choose which default file extensions and which XQuery flavor you would like to use.
* Click ''Apply'' to store your XQuery settings.
* Click ''Apply'' to store your XQuery settings.
Line 52: Line 52:
===Standalone===
===Standalone===
-
* In the Settings/Preferences window, expand the ''Languages & Frameworks'' item and select ''XQuery Data Sources''.
+
* In the ''Settings'' (Windows)/''Preferences'' (macOS) window, expand the ''Languages & Frameworks'' item and select ''XQuery Data Sources''.
* Click on the {{Code|+}} button in the middle column, to add a new data source.
* Click on the {{Code|+}} button in the middle column, to add a new data source.
* Select ''BaseX (native embedded)'' from the dropdown box.
* Select ''BaseX (native embedded)'' from the dropdown box.
Line 65: Line 65:
===Client===
===Client===
This assumes that you already have a BaseX database named {{code|factbook}}.
This assumes that you already have a BaseX database named {{code|factbook}}.
-
* In the Settings/Preferences window, expand the ''Languages & Frameworks'' item and select ''XQuery Data Sources''.
+
* In the ''Settings'' (Windows)/''Preferences'' (macOS) window, expand the ''Languages & Frameworks'' item and select ''XQuery Data Sources''.
* Click on the {{Code|+}} button in the middle column to add a new data source.
* Click on the {{Code|+}} button in the middle column to add a new data source.
* Select ''BaseX'' from the dropdown box.
* Select ''BaseX'' from the dropdown box.
Line 104: Line 104:
===From the IntelliJ IDEA Menu===
===From the IntelliJ IDEA Menu===
-
* Select ''Settings/Preferences'' in the ''IntelliJ IDEA'' menu.
+
* Select ''Settings'' (Windows)/''Preferences'' (macOS) in the ''IntelliJ IDEA'' menu.
* In the Settings/Preferences window, select ''Plugins''.
* In the Settings/Preferences window, select ''Plugins''.
* In the Plugins window, select the tab ''Marketplace''.
* In the Plugins window, select the tab ''Marketplace''.
Line 112: Line 112:
==Configuring The Processor==
==Configuring The Processor==
-
* Start IntelliJ IDEA and navigate to ''Settings/Preferences'' either using the ''Configure'' button from the start screen or the ''IntelliJ IDEA'' menu.
+
* Start IntelliJ IDEA and navigate to ''Settings'' (Windows)/''Preferences'' (macOS) either using the ''Configure'' button from the start screen or the ''IntelliJ IDEA'' menu.
* In the Settings/Preferences window, expand the ''Languages & Frameworks'' item and select ''XQuery''.
* In the Settings/Preferences window, expand the ''Languages & Frameworks'' item and select ''XQuery''.
* Make the choices for your system from the dropdown boxes, e.g.:
* Make the choices for your system from the dropdown boxes, e.g.:

Revision as of 09:43, 25 January 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 Support + MarkLogic Debugger

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

Intellij-startbildschirm.png

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

Intellij-query.png

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

From the IntelliJ IDEA Menu

Configuring The Processor

Intellij-xquery-settings-2.png

Querying Your Data

Intellij-add-configuration.png

Intellij-new-query-processor.png

Intellij-xquery-configuration.png

Intellij-run-button.png

Personal tools
Namespaces
Variants
Actions
Navigation
Print/export