Difference between revisions of "Integrating IntelliJ IDEA"
Jump to navigation
Jump to search
(Started IDEA documentation) |
(update Setting Up section) |
||
Line 25: | Line 25: | ||
=Setting Up= | =Setting Up= | ||
+ | |||
+ | ==File Extensions and XQuery Flavor== | ||
+ | * Start IDEA and navigate to ''Settings'' (OS dependent). | ||
+ | * In the Settings window select ''Other Settings''→''XQuery'' and choose which XQuery flavor you would like to use, as well as new file extensions. (see attached screenshot) | ||
+ | |||
+ | ==Configuring The Processor== | ||
+ | You can set up the plugin as a standalone processor or client. | ||
+ | |||
+ | ===Standalone=== | ||
+ | # Start IDEA and navigate to ''Settings'' (OS dependent). | ||
+ | # In the settings window select ''Other Settings''→''XQuery Data Sources'' | ||
+ | # Select ''BaseX (native embedded)''. | ||
+ | # Check the ''User defined XQJ Driver'' radio box. | ||
+ | # Using the '''+''', add the following {{code|jars}}: BaseX.jar, basex-api-8.6.1.jar, basex-xqj-8.6.jar, and xqj2-0.2.0.jar from your BaseX distribution. | ||
+ | |||
+ | ===Client=== | ||
+ | This assumes that you already have a database named {{code|factbook}}. | ||
+ | # Start IDEA and navigate to ''Settings'' (OS dependent). | ||
+ | # In the settings window select ''Other Settings''→''XQuery Data Sources'' | ||
+ | # Using the '''+''', select ''BaseX'' as your data source | ||
+ | # Fill in the appropriate connection details; e.g. default values: | ||
+ | * {{code|Host = localhost}} | ||
+ | * {{code|Port = 1984}} | ||
+ | * {{code|Database name = factbook}} | ||
+ | * {{code|Username = admin}} | ||
+ | * {{code|Password = admin}} | ||
+ | # Select ''Apply'', then ''OK'' and your BaseX {{code|factbook}} database is ready to query. |
Revision as of 22:43, 28 February 2017
This article is part of the Getting Started Section. It describes how to run Xpath/XQuery code from within the IntelliJ IDEA IDE.
Contents
Installation
The following steps apply to all operating systems:
- Install either version of IntelliJ IDEA: the Community or Ultimate edition.
- Download your favorite BaseX distribution (JAR, ZIP, EXE): [1].
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:
From the Start Screen
- Start IDEA and select Configure→Plugins.
- In the Plugins window select Browse Repositories.
- In the Browse Repositories window, search for (or scroll to) XQuery Support.
- You will be prompted to restart IDEA to load the new plugin.
From the File Menu
- Select Settings.
- In the Settings window select Plugins.
- In the Plugins window select Browse Repositories.
- In the Browse Repositories window, search for (or scroll to) XQuery Support.
- You will be prompted to restart IDEA to load the new plugin.
Setting Up
File Extensions and XQuery Flavor
- Start IDEA and navigate to Settings (OS dependent).
- In the Settings window select Other Settings→XQuery and choose which XQuery flavor you would like to use, as well as new file extensions. (see attached screenshot)
Configuring The Processor
You can set up the plugin as a standalone processor or client.
Standalone
- Start IDEA and navigate to Settings (OS dependent).
- In the settings window select Other Settings→XQuery Data Sources
- Select BaseX (native embedded).
- Check the User defined XQJ Driver radio box.
- 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.
Client
This assumes that you already have a database named factbook
.
- Start IDEA and navigate to Settings (OS dependent).
- In the settings window select Other Settings→XQuery Data Sources
- Using the +, select BaseX as your data source
- Fill in the appropriate connection details; e.g. default values:
*{{{1}}}
*{{{1}}}
*{{{1}}}
*{{{1}}}
*{{{1}}}
- Select Apply, then OK and your BaseX
factbook
database is ready to query.