Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Koneki » Code Assist prototype feedback
Code Assist prototype feedback [message #1416417] Thu, 10 May 2012 21:33 Go to next message
Daan Broekhof is currently offline Daan BroekhofFriend
Messages: 4
Registered: May 2012
Junior Member
Some feedback after having tried out the Koneki code assist prototype as available from wiki.eclipse.org/Koneki/LDT/Technical_Discussions/User_Assistance
(pff not allowed to post links..)

Issues:

- The lua code outline in your own project files no longer list your own (undocumented?) functions. This isn't really handy during development, or if you just use code-assist for the standard library completion.

- By trial and error I found that only files somehow referenced in the global.lua in the 'root' of the build path are parsed. It would have better to scan all '.lua' files for module / func definitions?

- It does not seem possible to create fields in the global module that start with a capital letter. (auto-complete once successfully, seconds time fails)

A good effort, but was hard to really test, without the normal auto-complete also working. :)
Re: Code Assist prototype feedback [message #1416418 is a reply to message #1416417] Thu, 10 May 2012 21:46 Go to previous messageGo to next message
Daan Broekhof is currently offline Daan BroekhofFriend
Messages: 4
Registered: May 2012
Junior Member
Code examples I used:

global.lua
-------------------------------------------------------------------------------
-- Lua global functions.
-- The basic library provides some core functions to Lua.
-- @module global

---------------------------------------------------------
-- Test
-- @field [parent = #global] test#test test

-------------------------------------------------------------------------------
-- Test 2
-- @field [parent = #global] Test2#Test2 Test2

return nil

test.lua
-------------------------------------------------------------------------------
-- Something testy
-- @module test

-------------------------------------------------------------------------------
-- Function cow
-- @function [parent=#test] moooo0
-- @param x

return nil

Test2.lua
-------------------------------------------------------------------------------
-- Something testoiers
-- @module Test2

-------------------------------------------------------------------------------
-- Function sheep
-- @function [parent=#Test2] blaat
-- @param x

return nil

(test will autocomplete, Test2 will not.)
Re: Code Assist prototype feedback [message #1416419 is a reply to message #1416417] Sun, 13 May 2012 12:13 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for the very valuable feedback Daan!
Most of the dev team is on holiday right now, and back next week. We will answer you in detail soon!

Just a quick reply regarding:
Quote:
> - It does not seem possible to create fields in the global module that start with a capital letter. (auto-complete once successfully, seconds time fails)

this has been https://github.com/SierraWireless/org.eclipse.koneki.ldt/commit/c245dfe99d5ee087208f3b3564dc7a0209c776b8 already, and should not be a problem anymore in the upcoming release.
Re: Code Assist prototype feedback [message #1416425 is a reply to message #1416419] Mon, 14 May 2012 17:44 Go to previous messageGo to next message
Simon Bernard is currently offline Simon BernardFriend
Messages: 345
Registered: July 2009
Senior Member
Hi,
a few answers to your remarks:

Quote:
> The lua code outline in your own project files no longer list your own (undocumented?) functions. This isn't really handy during development, or if you just use code-assist for the standard library completion.

We know that and we agree, it's a limitation (even a regression compared to the previous version). In this version you only see first level local variables and elements extracted from documentation (module, function, field ..).

This limitation is because we decided in a first time to extract API information only from documentation, to be able to support any way to implement a module.
You could see some http://wiki.eclipse.org/Koneki/LDT/Technical_Discussions/User_Assistance or https://bugs.eclipse.org/bugs/show_bug.cgi?id=370583 about this choice.
We hope all the advantages (better HTML documentation, usable content-assist, semantic-highlight ...) will counteract this outline problem.
In the future, we would like to add some code analysis to propose outline and content assist even for undocumented code.


Quote:
> By trial and error I found that only files somehow referenced in the global.lua in the 'root' of the build path are parsed. It would have better to scan all '.lua' files for module / func definitions?

All the files in the buildpath are parsed.
We support local variable completion for all files.
We support module completion for all files (if it has been loaded with the lua 5.2 recommended way : local m = require 'mymodule')
For global variable, it's a bit more complicated, because it's hard to know if a global var is available and so if we could propose content-assist. Furthermore, the use of global var is not really recommended, so supporting it is not a priority for us.
There is an exception, the global var already loaded by the Lua VM at startup. Those must be always available in content-assist. So the purpose of the file global.lua is to describe those globals.(In our next version we will provide the notion of Execution Environment and all of this will make more sense)
Re: Code Assist prototype feedback [message #1416473 is a reply to message #1416425] Tue, 05 June 2012 10:14 Go to previous message
Simon Bernard is currently offline Simon BernardFriend
Messages: 345
Registered: July 2009
Senior Member
I opened a bug about that : https://bugs.eclipse.org/bugs/show_bug.cgi?id=381671
Previous Topic:Lua Function Templates query
Next Topic:Installing LDT on Aptana Studio - Mac OS 10.7 64bit
Goto Forum:
  


Current Time: Thu Apr 25 00:20:24 GMT 2024

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

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

Back to the top