Integrating IntelliJ IDEA

From BaseX Documentation

(Difference between revisions)
Jump to: navigation, search
Line 2: Line 2:
* The [https://plugins.jetbrains.com/plugin/8612-xquery-intellij-plugin xquery-intellij-plugin] by Reece H. Dunn.
* The [https://plugins.jetbrains.com/plugin/8612-xquery-intellij-plugin xquery-intellij-plugin] by Reece H. Dunn.
-
* The [https://plugins.jetbrains.com/plugin/9757-xquery-support--marklogic-debugger XQuery Support + MarkLogic Debugger] plugin by Grzegorz Ligas.
+
* The [https://plugins.jetbrains.com/plugin/7262-xquery-support XQuery Support] plugin by Grzegorz Ligas.
* '''Note:''' BaseX itself is a highly compliant XQuery 3.1 processor. We strongly encourage you to use the [[Graphical_User_Interface#Text_Editor|XML editor]] integrated into the BaseX GUI to edit and query your XML data!<br/><br/>
* '''Note:''' BaseX itself is a highly compliant XQuery 3.1 processor. We strongly encourage you to use the [[Graphical_User_Interface#Text_Editor|XML editor]] integrated into the BaseX GUI to edit and query your XML data!<br/><br/>
Line 86: Line 86:
* Click the ''Run'' button to execute your query.
* Click the ''Run'' button to execute your query.
-
=XQuery Support + MarkLogic Debugger=
+
=XQuery Support=
-
This section focuses on Grzegorz Ligas' [https://plugins.jetbrains.com/plugin/9757-xquery-support--marklogic-debugger XQuery Support plugin].  
+
This section focuses on Grzegorz Ligas' [https://plugins.jetbrains.com/plugin/7262-xquery-support XQuery Support plugin].  
==Installation==
==Installation==
Line 98: Line 98:
* Start IntelliJ IDEA and select ''Configure''→''Plugins''.
* Start IntelliJ IDEA and select ''Configure''→''Plugins''.
-
* In the Plugins window, select the tab ''Marketplace''.
+
* In the ''Plugins'' window, select the tab ''Marketplace''.
-
* Type "XQuery Support" into the ''Search plugins in marketplace'' field.
+
* Type "XQuery" into the ''Search plugins in marketplace'' field and press Enter.
-
* Click the ''Install'' button below the ''XQuery Support + MarkLogic Debugger'' plugin.
+
* Click the ''Install'' button below the ''XQuery Support'' plugin or click on the ''XQuery Support'' link to get more information on the plugin before installing it.
* You will be prompted to restart IDEA to load the new plugin.
* You will be prompted to restart IDEA to load the new plugin.
===From the IntelliJ IDEA Menu===
===From the IntelliJ IDEA Menu===
-
* Select ''Settings'' (Windows)/''Preferences'' (macOS) in the ''IntelliJ IDEA'' menu.
+
* Select ''Settings'' (Windows)/''Preferences'' (macOS) from 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'' panel, select the tab ''Marketplace''.
-
* Type "XQuery Support" into the ''Search plugins in marketplace'' field.
+
* Type "XQuery" into the ''Search plugins in marketplace'' field and press Enter.
-
* Click the ''Install'' button below the ''XQuery Support + MarkLogic Debugger'' plugin.
+
* Click the ''Install'' button below the ''XQuery Support'' plugin or click on the ''XQuery Support'' link to get more information on the plugin before installing it.
* You will be prompted to restart IDEA to load the new plugin.
* You will be prompted to restart IDEA to load the new plugin.
Line 125: Line 125:
===Standalone===
===Standalone===
* In the ''Settings'' (Windows)/''Preferences'' (macOS) 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.
* In the right-hand column, check the ''User defined XQJ Driver'' check box.
* In the right-hand column, check the ''User defined XQJ Driver'' check box.

Revision as of 09:44, 8 March 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

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

XQuery Support

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

Personal tools
Namespaces
Variants
Actions
Navigation
Print/export