Download
(408 Kb)
Download
Updated: 03/24/24 11:02 AM
Compatibility:
Scions of Ithelia (9.3.0)
Endless Archive (9.2.5)
base-game patch (9.1.5)
Necrom (9.0.0)
Scribes of Fate (8.3.5)
Firesong (8.2.5)
Lost Depths (8.1.5)
High Isle (8.0.0)
Updated:03/24/24 11:02 AM
Created:06/03/20 11:59 AM
Monthly downloads:129
Total downloads:6,174
Favorites:19
MD5:
9.3.0
ESOUI lua API autocompletion for JetBrains IntelliJ IDEA IDE (EmmyLua plugin) & esoui sources search  Updated this week!  Popular! (More than 5000 hits)
Version: 101041_2
by: Baertram [More]
ESOUI lua API autocompletion for "JetBrains IntelliJ IDEA" IDE - using the "EmmyLua" plugin & esoui source code as SDK + search through

This is a description how to enable the ESOUI lua API autocompletion for the developer IDE "IntelliJ IDEA" by JetBrains, using the plugin "EmmyLua".

IntelliJ IDEA Community Edition is free to use: https://www.jetbrains.com/idea/download

I also provide the esoui API autocompletion files as ZIP archive here, which you need to download and extract somewhere on your harddrive to a folder that will not change, and can be used within IntelliJ IDEA settings as standard "external libraries" for your lua file related projects.



Prerequisites:
a) You need to install JetBrains IntelliJ IDEA (https://www.jetbrains.com/idea/) version 2019 or newer.
The type of the edition does not matter (community, education, ultimate, etc.).
Just follow the instructions of the website and the installer and install the software properly.
Start and configure it to your needs at the menu "File" -> "Settings" e.g.

b) You need to install the plugin "EmmyLUA" (https://plugins.jetbrains.com/plugin/9768-emmylua) inside the IntelliJ IDEA.
Attention: Check the compatibility of EmmyLua with the IntelliJ IDEA version here: https://plugins.jetbrains.com/plugin...mylua/versions
Some updates of IntelliJ IDEA will occur where EmmyLUA is not compatible, so do not update then until EmmyLUA is compatible again!

It will provide lua script support for variables, code checks and enable the auto completion file usage and variable declaration "jumpto" via CTRL+<left
mouse click> e.g. via own created lua files in your project structure and external libraries.

You can either use the IntellIj IDEA plugin manager or install it manually.
Here is an installation description, for both ways, by the plugin creators: https://emmylua.github.io/installation.html

This is how I did it:
b1: Start IntelliJ IDEA and open the menu "File"- > "Settings" -> "Plugins" -> Search for "EmmyLua" in the search input box at the top.
If you find more than 1 result: The author of the correct plugin is "tangzx".


b2: Click on the "Install" button at the line of the "EmmyLua" plugin. Follow the information shown in the popus and dialogs of the plugin manager.

b2 - alternative: You might also download the plugin via the plugin's website manually, using the "Get" button there.
Please refer to manual plugin installation within IntelliJ IDEA's documentation for plugins (https://www.jetbrains.com/help/idea/plugins-settings.html) and look for "Install Plugin from Disk".

b3: After the installation restart the IDE and invalidate the cache via menu "File" -> "Invalidates caches / restarts"!

b4: After the IntelliJ IDEA IDE was restarted open the settings once again via menu "File" -> "Settings" and navigate to the "Languages and Frameworks" category, where you choose the new shown entry "EmmyLua".
Change the lua version used to 5.1 as ESO only internally uses a ZOs changed lua 5.1!

Save the changes to the EmmyLua settings afterwards via the "Apply" button at the settings dialog.



HowTo enable the auto completion within IntelliJ IDEA IDE:

This list below shows the steps to take to enable the auto completion in the IntelliJ IDE.
If step description texts are related to other steps the "<relating step number>)" tag will be shown in italic style inside the description text of the step ( e.g. 2) ) .
If step description texts are related to a number shown inside an image, the "image<Imagenumber>[<numberShownInThisImage>]" tag will be shown in italic style inside the description text of the step ( e.g. image1[2]) )
  1. Download the ZIP archive for the needed ESOUI APIversion from this website here (see download link or "Other files" for older versions).
  2. Extract the ZIP archive to a folder which will not change, and where you are able to link to from within IntelliJ IDEA settings. In the further description here this folder where you have extracted the ZIP file contents to will be refered to as "ESOUI API autoCompletion files".
  3. Start IntelliJ.
  4. You need to close all open projects first via the menu "File" -> "Close project".
    If any other IntelliJ IDEA window is opened close the projects there as well until you get the "Welcome to IntelliJ IDEA" project selection dialog shown.

    Edit: IntelliJ IDEA removed the configure -> "Structure for new projects" from this popup!
    You need to click on "New project" now, create an empty project.
    Within the IntelliJ view of the new project click on the menu "File" ->"Project structure"

  5. The project structure dialog will be shown where you are able to configure the structure of new projects.
    Image1
  6. Click on Platform settings -> SDK image1[1]
    Then click on the + image1[2] and choose "Add lua SDK".
    A popup will ask you for the folder of the new lua SDK. Choose Any folder you want to have as the home directory of your SDK:

    You will be able to change that at the "LUA SDK home path" line later on, clicking at the folder icon and choosing "Select lua SDK home from disk"


    After that chose a name like "ESOUI lua live" (live e.g. for you live server lua SDK, and PTS e.g. for your PTS lua esoui src files as they could differ) as description image1[3]
    Click on the + image1[4] at the "Classpath" tab to add a folder where you have extracted the "ESOUI API autoCompletion files" at step 2).
    The selected folder will show in the list at image1[5] afterwards.
  7. Save the project structure and you are able to open your lua AddOns with IntelliJ and use this project structure "ESOUI lua" on them.
  8. You need to use the new created "ESOUI lua" project structure for your lua projects then in order to make the auto completion work.
    Your new projects contain a subfolder "External Libraries" where you are able to see the ESOUI API files and folders then:
  9. Existing projects will not automatically update their structure! You might either need to rebuild the projects by creating them new in the same folders and if the dialog asks you if exisitng project files should be overwritten accept it. Or you need to manually change the project structure files OF EACH project by opening it and selecting menu "File" -> "Project structure". Then choose/Add the SDK like described above for the project.


ESOUI source code browsing in Intelli & Defining 2 SDKs, 1 for ESO live and 1 for the PTS
You can download the most actual ESOUI source codes from GitHub once it was updated:
live:
https://github.com/esoui/esoui/tree/master/esoui
PTS:
Click on the "master" branch selection dropdown and select the most actual PTS entry:

-> To download the whole folder as a zip file navigate to the "esoui/esoui" main folder and use the "Code" button at the right, click it to show a context menu and choose "Download ZIP":

Extract the zip file to any local folder and just differ between live and PTS sources so you can store 2 different source code packages!
e.g. extract the live ZIP file to c:\ESO_SRC\live and the PTS ZIP file to c:\ESO_SRC\PTS

Within IntelliJ IDEA:
I did define a lua SDK for the projects using the esoui src for live, and one for PTS. If you create a project set the appropriate module (choose the SDK in there) (live on live, PTS if you want to test PTS stuff) and then you can see them as "External files" at the bottom (just like my esoui auto completion) and are able to put the cursor on that external entry, press CTRL+SIFT+F to search in all files and you'll find the ZO_* whatever you search easily that way + are able to navigate through the sources via CTRL+left click to find declarations etc.

To do that define both, live and PTS (or the one needed for your purpose) as a SDK:
IntelliJ IDEA Menu -> File -> Project structure -> SDK (1). Click on the + (2) icon, add the entry (3) e.g. "Lua (ESO) live", click on the + (4) icon to add the patch and choose the patch for the extarcted live zip files:

Repeat the same if you want to have a PTS SDK as well!

Then as you have created a project (e.g. pChat) use the same menu file -> project structure and choose the entry "Module" (1) -> Select the SDK from the list (2):

Click "Apply" and you'll find it at the external entries of the project afterwards (it might take a bit as the index of the files will be rebuild the -> see statusbar of IntelliJ IDEA):

Click the folder e.g. esoui/app and press CTRL+SHIFT+F to search all files inside that folder.
It's easy to find some source codes that way + use CTRL+left click to navigate through the ZOs source code files.



Running lua code within IntelliJ IDEA IDE:
First of all: ESOUI source code is NOT running offline in your IntelliJ IDEA IDE! You MUST be logged in and try the addons and code ingame.
There is no way to test ESOUI related source code just in your IDE.
You can try your non ESOUI related scripts offline in a normal lua environment though (like testing if a standard string function works etc.) but you cannot use ANY of the Zos added functions like d() etc. You MUST use standard functions like print then.

If you want to run lua code within IntelliJ you can read here how to setup the configurations and templates:

https://www.jetbrains.com/help/idea/2020.1/run-debug-configurations-dialog.html?utm_campaign=IU&utm_content=2020.1&utm_medium=link&utm_source=product

You need a lua.exe of the desired lua version (ESO is using 5.1) installed somewhere.
Download lua 5.1 exe binaries here: https://sourceforge.net/projects/luabinaries/files/5.1.4/
In the IntelliJ IDEA menu "Run" -> "Edit configurations" you can configure how and where the lua.exe file is located that should be used to run your scripts.

You need to expand the category "Templates" and choose the entry "Lua Application".
At the right side you are able to change the program path of the lua.exe file and some other parameters like the working directory (OBLIGATORY, e..g use your project's folder).
After you have setup everything click at the top right on the link "Create configuration" and your template will be added to the list of "Lua Application" at the left side:


It will use this template config then for any Lua Application "Run" in the future.
Unfortunately it will NOT pass in the currently run filename's path and filename (e.g. "test.lua", see below) as parameter "Entry file".
So the lua.exe will just run but nothing is passed to it
I'd mark the checkbox "Show this dialog" in your saved Lua application template so you can enter the run directory (= your project dir) and the "Entry file" (= your .lua file) there then as you run it.

I've e.g. added a new lua file "test.lua" to my project and added a standard lua print("hey!") command to it:

The green triangle run button is available and if I press it the lua5.1.exe file will compile it.

After this it will be able to run your lua code via the selected lua.exe file:



XML auto completion for keybindings and normal ESOUI XML files
Sirinsidiator created XSD files for the ESOUI XML files. Here is the link to siri's description:
https://sir.insidi.at/or/2018/07/10/...i-xml/#more-39

And the link to the XSD files for keybinds and normal xml within esoui:
http://sir.insidi.at/or/schema/esobindings.xsd
http://sir.insidi.at/or/schema/esoui.xsd

In your XML files's head line you need to change this to make the XSD autocompletion work:
Code:
<GuiXml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sir.insidi.at/or/schema/esoui.xsd">
Or for keybindings:
Code:
<Bindings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sir.insidi.at/or/schema/esobindings.xsd">
Within IntelliJ IDEA you can add the XSD files like described in the documentation:
https://www.jetbrains.com/help/idea/...-and-dtds.html


Troubleshooting:
  • Invalidate caches and restart: If anything is not working as intended try to use the menu "File" -> "Invalide caches / restart" to restart the IntelliJ IDEA IDE and clear the caches. This fixes most of the problems like not working auto completions etc.


All files can be found at github:
ESODocumentation_Pxx.txt parser script original by reaby
ESODocumentation_Pxx.txt parser script modified by Baertram
Releases for auto completion and variables (parsed results + manual added files) per ESO APIversion
101041 (2024-03-24)
API 101041 release 2

101040 (2023-11-01)
API 101040 release 2

101040 (2023-10-08)
API 101040 release 1

101038_2 (2023-06-07)
Necrom files released values 2

101038 (2023-04-18)
Necrom files released values 1

101037_3 & 4 (2023-03-16)
Fixed typo in manually generated lua file

101037_2 (2023-03-15)
Scribes of Fate files released values 2

101037_1 (2023-02-01)
Scribes of Fate files released values 1

101036_1 (2022-11-14)
Firesong files released values 1

101035_1 (2022-08-22)
Lost Depths files released values 1

101034_2 (2022-05-10)
High Isle files with "PTS" released values 2

101034_1 (2022-04-20)
High Isle files with "PTS" released values

101032_1 (2021-11-13)
Deadlands files with "live" released values

101031_2 (2021-08-23)
Waking Flame files with "live" released values

101031_1 (2021-08-20)
Waking Flame files

100035_2 (2021-06-03)
Blackwood files

100033_1 (2020-31-12)
Markath files + updated static file

100031_3 (2020-06-22)
-Updated some functions and objects like Chat
-Updated a few missing events about reticles

100031_2 (2020-06-12)
Updated the file "eso-api_base_Manual_NonGenerated.lua" with some of of the global ZOs "classes" and function names (ZOs libraris etc.).
Archived Files (19)
File Name
Version
Size
Uploader
Date
101040_2
406kB
Baertram
11/01/23 11:20 AM
101040
406kB
Baertram
10/08/23 10:11 AM
101038_2
395kB
Baertram
06/06/23 05:25 PM
101038
395kB
Baertram
04/17/23 04:54 PM
101037_4
392kB
Baertram
03/16/23 09:41 AM
101037_2
392kB
Baertram
03/15/23 08:20 AM
101037_1
392kB
Baertram
02/01/23 06:55 AM
101036_1
390kB
Baertram
11/14/22 11:26 AM
101035_1
387kB
Baertram
08/22/22 04:56 AM
101034_2
383kB
Baertram
05/10/22 02:18 PM
101034_1
380kB
Baertram
04/20/22 07:41 AM
101032_1
371kB
Baertram
11/12/21 05:21 PM
101031_2
371kB
Baertram
08/23/21 03:45 PM
101031_1
361kB
Baertram
08/20/21 05:55 AM
100035_2
489kB
Baertram
06/03/21 02:22 PM
100033_1
352kB
Baertram
12/31/20 02:38 PM
100031_3
479kB
Baertram
06/21/20 04:24 PM
100031_2
478kB
Baertram
06/11/20 10:05 PM
100031
451kB
06/03/20 11:59 AM


Post A Reply Comment Options
Unread 04/24/22, 06:16 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4912
File comments: 5988
Uploads: 78
Yes, the most recent IntelliJ IDEA Version was not compatible with the EmmyLua addon, thanks for the info!
I've added that to the description at the EmmyLua plugin.
Last edited by Baertram : 04/24/22 at 06:18 AM.
Report comment to moderator  
Reply With Quote
Unread 04/24/22, 04:41 AM  
smmalmansoori
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 1
Uploads: 1
For anyone trying this, check which IntelliJ version is the EmmyLua plugin compatible with by visiting this page. Otherwise the plugin won't show up if you search in the IntelliJ IDE's plugin section and even if you try installing manually it will not allow you.
Report comment to moderator  
Reply With Quote
Unread 06/12/20, 03:16 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4912
File comments: 5988
Uploads: 78
Nope, not in this tool. The json and xml are for manual lookup.

But sirinsidiator added it on his website.
Check the other dev tools here on esoui.
https://www.esoui.com/downloads/info...ocomplete.html

You can add the xlst files to intellij xml validator entries in the settings.
And there is one line to set in the xml files as well, have it somewhere, can at it later here.

Here is the link to siri's description:
https://sir.insidi.at/or/2018/07/10/schema-definition-for-esoui-xml/#more-39

And the link to the xlst files for keybinds and normal xml within esoui:
http://sir.insidi.at/or/schema/esobindings.xsd
http://sir.insidi.at/or/schema/esoui.xsd

In the XML files's head line you need to add this to make the autocompletion work:
Code:
<GuiXml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sir.insidi.at/or/schema/esoui.xsd">
Or for keybindings:
Code:
<Bindings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sir.insidi.at/or/schema/esobindings.xsd">
Last edited by Baertram : 06/13/20 at 06:24 AM.
Report comment to moderator  
Reply With Quote
Unread 06/12/20, 02:51 PM  
QuantumPie
AddOn Author - Click to view AddOns

Forum posts: 32
File comments: 21
Uploads: 2
Is there XML auto completion by chance? I noticed the json and js file and copied it over but that didn't do anything.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.