[ZeroBrane Studio] Re: Change the tooltip formatting via interpreter? How to distribute interpreter & api?

  • From: jan@xxxxxxxxxxx
  • To: zerobrane@xxxxxxxxxxxxx
  • Date: Sat, 18 Oct 2014 12:05:53 +0200

One option you may consider is to have a separate "documentation"
panel that uses the editor component to display the API documentation.
In this case you'd have full control over the content and the
formatting. I'd need to add a method (for example, onEditorCallTip),
which would give you the token that calltip is generated for and the
auto-complete text itself; you'd then show it in the "documentation"
panel (and suppress the "default" tooltip). It gets a bit trickier for
tooltips shown for expressions during debugging and things like that,
but I think the current implementation is find for those cases.


This sounds really good. I am used to having a permanent documentation window open (which always shows the documentation of the current cursor position) from NetBeans. An incredibly useful feature that is lacking from most other IDEs. If this could be achieved with a plugin, we might really do this. Is it possible yet, somehow (with any link to an example which creates a panel? :D ) or will you have to add that "onEditorCallTip" first?

At least for our case, debugging is not a problem as it won't be possible anyway - we're embedding LuaJIT and calling scripts from C++ while other C++ threads (graphics, physics,..) are still active. I don't think such an environment allows live Lua debugging.


Another option is to provide only some documentation in the IDE and
have more complete documentation available online and then reference
it using context menu as is done in Show Lua Reference plugin
(https://github.com/pkulchenko/ZeroBranePackage/blob/master/showluareference.lua)
or in more general Show Reference plugin
(https://github.com/pkulchenko/ZeroBranePackage/blob/master/showreference.lua).


May be an option, yes, but I'd prefer the 1st method.


Other related posts: