Integrating IntelliJ IDEA

From BaseX Documentation

(Difference between revisions)
Jump to: navigation, search
Line 21: Line 21:
After installing IntelliJ IDEA and BaseX, install the xquery-intellij-plugin by one of the following methods:
After installing IntelliJ IDEA and BaseX, install the xquery-intellij-plugin by one of the following methods:
-
===From the Start Screen===
+
 
 +
'''From the Start Screen'''
[[File:intellij-startbildschirm.png]]
[[File:intellij-startbildschirm.png]]
Line 31: Line 32:
* 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) in the ''IntelliJ IDEA'' menu.
* In the Settings/Preferences window, select ''Plugins''.
* In the Settings/Preferences window, select ''Plugins''.
Line 99: Line 100:
* Click the ''Run'' button to execute your query.
* Click the ''Run'' button to execute your query.
-
=XQuery Support=
+
=XQuery Support Plugin=
This section focuses on Grzegorz Ligas' [https://plugins.jetbrains.com/plugin/7262-xquery-support XQuery Support plugin].  
This section focuses on Grzegorz Ligas' [https://plugins.jetbrains.com/plugin/7262-xquery-support XQuery Support plugin].  
Line 124: Line 125:
==Setting Up==
==Setting Up==
-
===File Extensions and XQuery Flavor===
+
'''File Extensions and XQuery Flavor'''
* Start IntelliJ IDEA and navigate to ''Settings'' (Windows)/''Preferences'' (macOS) 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.

Revision as of 11:27, 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

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