Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Koneki » Code Assist prototype feedback
Code Assist prototype feedback [message #871111] Thu, 10 May 2012 17:33 Go to next message
Daan Broekhof is currently offline Daan Broekhof
Messages: 2
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. Smile
Re: Code Assist prototype feedback [message #871113 is a reply to message #871111] Thu, 10 May 2012 17:46 Go to previous messageGo to next message
Daan Broekhof is currently offline Daan Broekhof
Messages: 2
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 #871406 is a reply to message #871111] Sun, 13 May 2012 08:13 Go to previous messageGo to next message
Benjamin Cabé is currently offline Benjamin Cabé
Messages: 151
Registered: July 2009
Location: Toulouse, France
Senior Member

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 fixed already, and should not be a problem anymore in the upcoming release.
Re: Code Assist prototype feedback [message #871701 is a reply to message #871406] Mon, 14 May 2012 13:44 Go to previous messageGo to next message
Simon Bernard is currently offline Simon Bernard
Messages: 154
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 explanations or discussions 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 #881825 is a reply to message #871701] Tue, 05 June 2012 06:14 Go to previous message
Simon Bernard is currently offline Simon Bernard
Messages: 154
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 17 11:31:31 EDT 2014

Powered by FUDForum. Page generated in 0.02608 seconds