Changes

Jump to navigation Jump to search
243 bytes added ,  16:09, 24 January 2019
no edit summary
* In the project view, create a new XQuery file, either by right-clicking on the project name and choosing ''New''→''XQuery File'' or by selecting ''New''→''XQuery File'' from the File menu. Enter a file name and click ''OK''.
* Type in your query.
[[File:Intellij-query.png]]
* Click the green ''Run'' button below the IntelliJ IDEA menu bar.
* In the ''Edit Configuration'' dialog choose one of the two data source from the dropdown box, either "BaseX" or "BaseX (native embedded)". If you select "BaseX", make sure that BaseX is up and running.
==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.
* 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.:
** <code>Implementation = BaseX</code>
** <code>Dialect for XQuery 3.0 = BaseX</code>
** <code>Dialect for XQuery 3.1 = BaseX</code>
[[File:Intellij-xquery-settings-2.png‎]]
* Click ''Apply'' to store your XQuery settings and then ''OK'' to exit the dialog.
* Enter a name and location for your project.
* Click the ''Add Configuration'' button below the IntelliJ IDEA menu bar.
[[File:Intellij-add-configuration.png]]* Expand In the ''Run/Debug Configurations'' dialog expand the Templates list and choose the ''XQuery'' entry.* In the ''Run/Debug Configurations'' dialog click Click on the three dots {{Code|...}} next to the ''Query Processor'' dropdown box.
* In the ''Manage Query Processors'' dialog click on the {{Code|+}} button.
* In the ''New Query Processor Instance" dialog, set the following preferences:
** <code>Username = admin</code>
** <code>Password = admin</code>
[[File:Intellij-new-query-processor.png]]
* Click ''OK'' to exit the ''New Query Processor Instance" dialog.
* In the ''Manage Query Processors'' now choose the "BaseX 9.1.1 (BaseX)" entry and click ''OK''.
* The query processor should be preset to "BaseX 9.1.1 (BaseX)".
* In the ''Script File'' field enter the path to your query file.
[[File:Intellij-xquery-configuration.png]]
* Click ''Apply'' and then ''OK'' to close the ''Run/Debug Configurations'' dialog.
* Now, the green ''Run'' button should be available below the IntelliJ IDEA menu bar.
[[File:Intellij-run-button.png]]* Make sure that BaseX is up and running and click the ''Run'' button to execute your query.
administrator, editor
162

edits

Navigation menu