Modding in Eclipse

Rochambeau
Member
 
Posts: 68
Joined: Tue Sep 23, 2014 11:37

Modding in Eclipse

by Rochambeau » Fri Jul 31, 2015 09:50

Hi,

is there a lua library that can be imported into Eclipse to use autocompletion with minetest api methods?

The library might need to look like described in this post:

https://www.eclipse.org/forums/index.php/t/651455/
 

Rochambeau
Member
 
Posts: 68
Joined: Tue Sep 23, 2014 11:37

Re: Modding in Eclipse

by Rochambeau » Fri Aug 14, 2015 08:10

By now I've found several ways to add minetest specific custom autocompletion to eclipse.

1. Lua Execution Environment
EEs like described here are too complicated for me. I don't have the time, nor the know how of doing it.

2. Editor Templates
That would be more my thing because it's entirely based on xml and could be provided pretty easily.

Now, what I'm looking for is a good source for all lua api functions with their parameters to do some jEdit magic and create an all-in-one xml template.

Possible sources I know of:


None of the above has a fixed structure that makes copy'n'paste easy.
Is there another source/list of all lua api functions?

Attached, there is a very alpha example of what a eclipse editor template looks like. It's created of the comments of l_env.h (source nr 1). Problem with this source in general is, that not every function is thoroughly commented (params).
Attachments
templates.zip
(982 Bytes) Downloaded 83 times
 

User avatar
Sane
Member
 
Posts: 103
Joined: Tue Jun 17, 2014 09:31
GitHub: mt-sane
In-game: Sane

Re: Modding in Eclipse

by Sane » Fri Aug 14, 2015 16:15

Trying to stay me.
 

Rochambeau
Member
 
Posts: 68
Joined: Tue Sep 23, 2014 11:37

Re: Modding in Eclipse

by Rochambeau » Sun Aug 16, 2015 16:40

It's ugly, it's buggy, but it's something to build upon!

Installation:

1. Start Eclipse
2. Install LDT (Lua plugin for Eclipse)
3. In eclipse go to Window -> Preferences -> Lua -> Editor -> Templates -> Import
Choose templates.xml

Usage:

Type the first few letters of a minetest function and press Control + Space
Voila: Autocompletion!

There are still some difficulties with "mintetest.xxx" functions. It seems the dot causes some problems. Time will tell while I'm working with it.

[Edit: @ Sane: Thank you very much. Your link tip helped a lot!]
Attachments
template.zip
(19.02 KiB) Downloaded 85 times
 


Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 9 guests

cron