Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Koneki » Limited autocomplete issue(@return statement doesn't seem to work)
Limited autocomplete issue [message #1113893] Sat, 21 September 2013 18:39 Go to next message
anto gerva is currently offline anto gerva
Messages: 1
Registered: June 2012
Location: Canada, Québec
Junior Member
Hi there,
If I take the following sample from this documentation:

--- A module that allow to manage geometry shapes
-- @module geometry
local M = {}
 
--- A rectangle 
-- @type rectangle
-- @field [parent=#rectangle] #number x horizontal position, 0 by default
-- @field [parent=#rectangle] #number y vertical position, 0 by default
-- @field [parent=#rectangle] #number width, 100 by default
-- @field [parent=#rectangle] #number height, 100 by default
local R = {x=0, y=0, width=100, height=100, }
 
--- Move the rectangle
-- @function [parent=#rectangle] move
-- @param #rectangle self
-- @param #number x
-- @param #number y
function R.move(self,x,y)
	self.x = self.x + x
	self.y = self.y + y
end
 
--- Create a new rectangle
-- @function [parent=#geometry] newRectangle
-- @param #number x
-- @param #number y
-- @param #number width
-- @param #number height
-- @return #rectangle the created rectangle
function M.newRectangle(x,y,width,height)
	local newrectangle = {x=x,y=y,width=width,height=height}
 
	-- set to new rectangle the properties of a rectangle
	setmetatable(newrectangle, {__index = R})
	return newrectangle
end
 
return M


And I save it as "geometry.lua".

Then in an another lua file I try to use it:

geo=require('geometry');
myRectangle = geo.newRectangle(1,1,1,1); --autocomplete work fine here
myRectangle. --??? autocomplete doesn't work anymore

or
geo=require('geometry');
geo.newRectangle(1,1,1,1). --??? autocomplete doesn't work either

Even in geometry.lua if I use newRectangle, it seem that the autocomplete won't be able to reach the variable and move method.

Alhought,
In the local scope of "geometry.lua"
R.y --autocomplete work fine here


Did I do something wrong?
I use Lua 5.1 with Koneki standalone 1.0
Re: Limited autocomplete issue [message #1114855 is a reply to message #1113893] Mon, 23 September 2013 05:59 Go to previous message
Simon Bernard is currently offline Simon Bernard
Messages: 118
Registered: July 2009
Senior Member
Hi,
The first one looks like a bug. I just test it and it does not work for me too. If you use local variable it should work.

  local geo=require('geometry');
  local myRectangle = geo.newRectangle(1,1,1,1); --autocomplete work fine here
  myRectangle. --??? autocomplete doesn't work anymore


The second one is not implemented. Currently, after a function call we are not able to propose autocompletion.

I open 2 bugs.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=417793
https://bugs.eclipse.org/bugs/show_bug.cgi?id=417792
Previous Topic:LDT debugger
Next Topic:Unable to connect OMA-DM simulator with funambol dm server 3.7
Goto Forum:
  


Current Time: Mon Oct 07 19:53:58 EDT 2013

Powered by FUDForum. Page generated in 0.01524 seconds