Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Lua Development Tools » Metalua integration with LDT(Code analysis integration code with metalua)
Metalua integration with LDT [message #1224946] Sat, 28 December 2013 07:40 Go to next message
Paul K is currently offline Paul KFriend
Messages: 2
Registered: December 2013
Junior Member
Hi All,

I have a quick question on Code analysis and Completion Enhancements. I've been working on similar changes for ZeroBrane Studio Lua IDE and am interested in the code that integrates metalua with the rest of the functionality that provides code analysis and completion. Could someone give me pointers to the integration code that provides this functionality? Thank you.

Paul.
Re: Metalua integration with LDT [message #1228175 is a reply to message #1224946] Mon, 06 January 2014 15:27 Go to previous messageGo to next message
Simon Bernard is currently offline Simon BernardFriend
Messages: 345
Registered: July 2009
Senior Member
Hi,

Currently we use metalua to build a model of a lua file.
lua file = (metalua) => ast => (ldt models builder) => models

To call lua files from a java code, we use JNLua
project: http://code.google.com/p/jnlua/

The ast is created using metalua:
documentation : https://github.com/fab13n/metalua/blob/master/doc/manual/metalua-manual.pdf
source code : http://git.eclipse.org/c/koneki/org.eclipse.koneki.metalua.git/

Here an example of how we use metalua from Lua in LDT:
https://github.com/eclipse/koneki.ldt/blob/master/libraries/luaformatter/luaformatter.lua

Here an example on how we call metalua using JNLua in LDT:
http://git.eclipse.org/c/koneki/org.eclipse.koneki.ldt.git/tree/plugins/org.eclipse.koneki.ldt.metalua/src/org/eclipse/koneki/ldt/metalua/AbstractMetaLuaModule.java
The super class: http://git.eclipse.org/c/koneki/org.eclipse.koneki.ldt.git/tree/plugins/com.naef.jnlua-lua51/src/com/naef/jnlua/eclipse/AbstractLuaModule.java

Some discutions about the model here (which is not exactly up to date) :
https://wiki.eclipse.org/Koneki/LDT/Developer_Area/User_Assistance
https://wiki.eclipse.org/Koneki/LDT/Developer_Area/Lua_API_Model_2
https://wiki.eclipse.org/Koneki/LDT/Developer_Area/Lua_Comment_Model
https://wiki.eclipse.org/Koneki/LDT/Developer_Area/Lua_Internal_Model

Here the code used to create models :
http://git.eclipse.org/c/koneki/org.eclipse.koneki.ldt.git/tree/libraries/modelsbuilder/models

The type resolution for autocompletion is implemented here :
http://git.eclipse.org/c/koneki/org.eclipse.koneki.ldt.git/tree/plugins/org.eclipse.koneki.ldt/src/org/eclipse/koneki/ldt/core/internal/ast/models/LuaASTUtils.java
http://git.eclipse.org/c/koneki/org.eclipse.koneki.ldt.git/tree/plugins/org.eclipse.koneki.ldt.ui/src/org/eclipse/koneki/ldt/ui/internal/editor/completion/LuaCompletionEngine.java


Maybe you will not really reuse our code but it could be nice if you support the documentation syntax.

Do not hesitate to give us feedback about it Smile

[Updated on: Tue, 07 January 2014 09:52]

Report message to a moderator

Re: Metalua integration with LDT [message #1228211 is a reply to message #1228175] Mon, 06 January 2014 17:18 Go to previous messageGo to next message
Paul K is currently offline Paul KFriend
Messages: 2
Registered: December 2013
Junior Member
Hi Simon,

Very useful; thank you for all the details! This is just what I was looking for. One small correction: one of the URLs returns 404 because of the different capitalization; this is the right one to use (removing https:// as I can't post external links yet): github.com/eclipse/koneki.ldt/blob/master/plugins/org.eclipse.koneki.ldt.metalua/src/org/eclipse/koneki/ldt/metalua/AbstractMetaLuaModule.java.
Re: Metalua integration with LDT [message #1228467 is a reply to message #1228211] Tue, 07 January 2014 09:52 Go to previous message
Simon Bernard is currently offline Simon BernardFriend
Messages: 345
Registered: July 2009
Senior Member
I fixed this. Smile
Previous Topic:How to compile LUA scripts with Koneki?
Next Topic:How to set remote system for remote debug
Goto Forum:
  


Current Time: Thu Mar 28 08:22:41 GMT 2024

Powered by FUDForum. Page generated in 0.02156 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top