Thread Tools Display Modes
04/10/14, 11:45 PM   #1
Tinuviel
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 7
IntelliJ and sylvanaar

Hi there,

As I am a professional developer that works in Visual Studio all day, I guess I'm a bit spoiled by IDE's with a good feature set. Specifically, I missed syntax checking and code completion (intellisense). Because of this, I looked around for a bit and finally found a very good solution. It adds both missing features - and after configuration - full API intellisense. As such, I figured I would share my findings with other developers.





IDE: IntelliJ Community Edition. You can find it here: http://www.jetbrains.com/idea/download/

After IntelliJ is installed, you then need to add LUA support, and luckly someone already made a plugin for this! To install it, open IntelliJ and go to File->Settings->Plugins, click on 'Browse Repositories', search for 'Lua', and click 'Install'. If you want more information about the plugin itself, you can find it here: https://bitbucket.org/sylvanaar2/lua-for-idea/wiki/Home.

Now all that is needed is to add the ESO API into the intellisense. This requires a set of .lua files that define the functions and constants. There was nothing out there I could find in this format, so I created them myself! Simply extract this zip out to a folder and you're ready for the next step:
https://www.dropbox.com/s/4gbmmerpes...lls-online.zip.

These lua files were generated with a set of powershell scripts I created. With those, I copy/paste the api information off the esoui wiki pages into a text document, save the document, then run the powershell scripts. For those interested in those scripts, please PM me.

To enable to API intellisense:
Create a new project, select 'Lua' as your framework, press 'configure', choose 'LuaJ' then press the '+' button on the right. In the dialog that pops up, select the folder you extracted earlier.

Now when you make new projects just select the 'LuaJ' target, and you will have intellisense for the ESO API and your own code!

Last edited by Tinuviel : 04/11/14 at 12:41 PM. Reason: I was super tired when I wrote this, so I just cleaned up a lot of grammar.
  Reply With Quote
04/11/14, 12:13 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 648
Corrected your typo in the title (in sylv's name).

I remember when he made that for WoW...
  Reply With Quote
04/11/14, 10:46 PM   #3
SpecialK
Join Date: Apr 2014
Posts: 6
Well take a look at "Havok Script":
http://www.havok.com/products/script

It's what the game uses.
As you can see it has an IDE with intelliSense, etc.

One could probably get a basic license, maybe an "indie" license, or something for cheap.
  Reply With Quote
04/15/14, 12:29 PM   #4
Iyanga
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 183
Does the syntax checker from IntelliJ just mark lexical errors or grammatical errors, too?

In example, will it tell you that this code is not valid LUA:

if a == false then
local bla = a
else if b == false then
local bla = b
end


(Just wondering if it's worth to switch the IDE, but don't want less features.)
  Reply With Quote
04/15/14, 05:04 PM   #5
Tinuviel
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 7
Originally Posted by Iyanga View Post
Does the syntax checker from IntelliJ just mark lexical errors or grammatical errors, too?

In example, will it tell you that this code is not valid LUA:

if a == false then
local bla = a
else if b == false then
local bla = b
end


(Just wondering if it's worth to switch the IDE, but don't want less features.)
Just looked, and it doesn't.
  Reply With Quote
04/15/14, 05:13 PM   #6
Tyx
 
Tyx's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 23
Thank you for you hard work - is it possible to implement your script in Eclipse too?

I prefer to work with Eclipse because IntelliJ is to slow on my system, and Eclipse offers the usual great debug and work interface (at least in my eyes maybe just used to it)
  Reply With Quote
04/20/14, 03:18 AM   #7
geri
Join Date: Apr 2014
Posts: 1
Thanks Tinuviel, thats helpful!


@Iyanga: What IDE do you use?
  Reply With Quote
04/21/14, 09:35 PM   #8
Wykkyd
Are you Wykkyd Gaming?
 
Wykkyd's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 107
I work all day in Visual Studio.

I should probably use an IDE for Lua too, eh? I've done everything up to this point in Notepad++.
  Reply With Quote
04/21/14, 09:52 PM   #9
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 648
<3 Notepad++
  Reply With Quote
04/22/14, 12:03 AM   #10
stjobe
 
stjobe's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 60
Originally Posted by Wykkyd View Post
I work all day in Visual Studio.

I should probably use an IDE for Lua too, eh? I've done everything up to this point in Notepad++.
Originally Posted by Seerah View Post
<3 Notepad++
Notepad++

IntelliJ + ESO Lua looks interesting though, might have to use it for the next project. Thanks for the tip
  Reply With Quote
04/22/14, 01:30 PM   #11
ins
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 76
Nobody use good old Notepad anymore?

Gonna test this with VS. Hopefully it works in 2010.
  Reply With Quote
04/25/14, 07:35 PM   #12
Tinuviel
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 7
I work in Visual Studio all day as well. I'm a professional .NET developer for trade.
This was just the easiest way to get features I'm used to. Honestly, I've been spoiled rotten by VS2013 and Resharper. (even though I have VS installed at home, I wasn't in the mood to figure out how to set this up)

I use Notepad++ all the time too, but generally for lighter things. A lot of the time it's for manual .csproj / .vbproj editing, one-off quick fixes, viewing XML / nuspec / build logs, etc. When I'm making something more meaty, I like more help.

Last edited by Tinuviel : 04/25/14 at 07:48 PM.
  Reply With Quote
04/25/14, 07:38 PM   #13
Tinuviel
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 7
Originally Posted by Tyx View Post
Thank you for you hard work - is it possible to implement your script in Eclipse too?

I prefer to work with Eclipse because IntelliJ is to slow on my system, and Eclipse offers the usual great debug and work interface (at least in my eyes maybe just used to it)
I found this by looking at WoW solutions and altering them to fit ESO. I would search for that, and look into modifying it to work with Eclipse. I did see some Eclipse plugin somewhere, but I have used Eclypse in the past and there are a bunch of small differences between the Visual Studio methodology that have always irritated me, so I didn't pursue that route.
  Reply With Quote
04/28/14, 08:54 AM   #14
lyravega
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 93
Originally Posted by Wykkyd View Post
...I've done everything up to this point in Notepad++.
Npp
Best thing ever.
  Reply With Quote
04/28/14, 10:04 AM   #15
Stormknight
 
Stormknight's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 128
Nice find! Whilst Notepad++ is pretty good, I've been using Ultra Edit for around 15 years.
  Reply With Quote
04/28/14, 10:47 AM   #16
ins
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 76
Originally Posted by Stormknight View Post
Nice find! Whilst Notepad++ is pretty good, I've been using Ultra Edit for around 15 years.
Uedit32 is great

And fast... Its great to use it to when you want to edit HUUUUUUUUUUUGE files since it handles those quite nicely
  Reply With Quote
04/28/14, 12:05 PM   #17
Wobin
 
Wobin's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 78
Originally Posted by ins View Post
Uedit32 is great

And fast... Its great to use it to when you want to edit HUUUUUUUUUUUGE files since it handles those quite nicely
I've just used gvim for ridiculously large files.
  Reply With Quote
05/02/14, 06:39 AM   #18
Tyx
 
Tyx's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 23
Originally Posted by Tinuviel View Post
I found this by looking at WoW solutions and altering them to fit ESO. I would search for that, and look into modifying it to work with Eclipse. I did see some Eclipse plugin somewhere, but I have used Eclypse in the past and there are a bunch of small differences between the Visual Studio methodology that have always irritated me, so I didn't pursue that route.
I know what you mean. I tried Visual Studio once when I had to work with c++ but it felt somewhat off. So same thing but the other way

Thanks for the tip.
  Reply With Quote
05/05/14, 04:33 AM   #19
DerVagabund
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 12
Originally Posted by Wykkyd View Post
I work all day in Visual Studio.

I should probably use an IDE for Lua too, eh? I've done everything up to this point in Notepad++.
Heh, and I thought I am the only one doing this

I think I will stay with Notepad++ as I do not need to compile LUA before running it, thus I see no real need for a development environment. Sure it would be nice to have auto completion suggestions for code but unless all the ESO internal functions are supported I see no real need, as lua itself is not that much different to all other programming languages
  Reply With Quote
05/05/14, 04:51 AM   #20
Harven
 
Harven's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 135
Hey,
the code copletion feature in IntelliJ looks great. I'm using LuaEdit but I don't know if it's possible to add the eso api to thier code copletion mechanism.
  Reply With Quote

ESOUI » Developer Discussions » Dev Tools » IntelliJ and sylvanaar

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off