Changes

Jump to navigation Jump to search
1,009 bytes added ,  14:07, 24 January 2019
no edit summary
This article is part of the [[Getting Started]] Section. It describes how to run XPath/XQuery code from within the [https://www.jetbrains.com/idea IntelliJ IDEA IDE].
=InstallationPreparations=
The following steps apply to all operating systems:
* Install either version of IntelliJ IDEA: [https://www.jetbrains.com/idea/#chooseYourEdition the Community or Ultimate edition].
* Download your favorite [http://basex.org/download BaseX distribution ] (JAR, ZIP, EXE): http://basex.org/download/* Start BaseX (see [[Startup]]).* Create a BaseX database (see [[Databases]]).
This article focuses on Grzegorz Ligas' [https://plugins.jetbrains.com/idea/plugin/7262-xquery-support =XQuery Support plugin]. + MarkLogic Debugger=
This section focuses on Grzegorz Ligas' [https://plugins.jetbrains.com/plugin/9757-xquery-support--marklogic-debugger 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===
 [[File:intellij-startbildschirm.png]] # Start IntelliJ IDEA and select ''Configure''→''Plugins''.# In the Plugins window select the tab ''Marketplace''.# Type "XQuery Support" into the ''Browse RepositoriesSearch plugins in marketplace''field.# In Click the ''Install'' button below the Browse Repositories window, search for (or scroll to) ''XQuery Support+ MarkLogic Debugger''plugin.
# You will be prompted to restart IDEA to load the new plugin.
===From the File IntelliJ IDEA Menu===# Select ''Settings/Preferences''in the ''IntelliJ IDEA'' menu.# In the Settings /Preferences window select ''Plugins''.# In the Plugins window select the tab ''Browse RepositoriesMarketplace''.# In Type "XQuery Support" into the ''Search plugins in marketplace'' field.# Click the ''Install'' button below the Browse Repositories window, search for (or scroll to) ''XQuery Support+ MarkLogic Debugger''plugin.
# You will be prompted to restart IDEA to load the new plugin.
==File Extensions and XQuery Flavor==
* Start IntelliJ IDEA and navigate to ''Settings/Preferences'' (OS dependent)either using the ''Configure'' button from the start screen or the ''IntelliJ IDEA'' menu.* In the Settings /Preferences window select , expand the ''Other SettingsLanguages & Frameworks''item, select ''XQuery'' and choose which default file extensions ans which XQuery flavor you would like to use, as well as new file extensions. (see attached screenshot)* Click ''Apply'' to store your XQuery settings. [[File:intellij-xquery-settings.png]]
==Configuring The Processor==
===Standalone===
# Start IDEA and navigate to ''Settings'' (OS dependent).# In the settings Settings/Preferences window select , expand the ''Other SettingsLanguages & Frameworks''item and select ''XQuery Data Sources''.# Click on the {{Code|+}} button in the middle column, to add a new data source.# Select ''BaseX (native embedded)''from the dropdown box.# Check In the right-hand column, check the ''User defined XQJ Driver'' radio check box.# Using Use the ''' {{Code|+''', }} button below the check box to add the following {{code|jars}}from your BaseX distribution: #* {{Code|basex/BaseX.jar, }}#* {{Code|basex/lib/basex-apiapj-89.61.1.jar, }}#* {{Code|basex/lib/basex-xqj-89.60.jar, and }}#* {{Code|basex/lib/xqj2-0.2.0.jar from }}# Click ''Apply'' to store your BaseX distributionsettings.
===Client===
This assumes that you already have a BaseX database named {{code|factbook}}.# Start IDEA and navigate to ''Settings'' (OS dependent).# In the settings Settings/Preferences window select , expand the ''Other SettingsLanguages & Frameworks''item and select ''XQuery Data Sources''.# Using Click on the '''{{Code|+'''}} button in the middle column, select to add a new data source.# Select ''BaseX'' as your data sourcefrom the dropdown box.# Fill In the right-hand column, fill in the appropriate connection details; e.g. default values:
#* <code>Host = localhost</code>
#* <code>Port = 1984</code>
#* <code>Password = admin</code>
# Select ''Apply'', then ''OK'' and your BaseX {{code|factbook}} database is ready to query.
 
[[File:Intellij-basex-data-source.png]]
administrator, editor
162

edits

Navigation menu