Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "LDT/User Area/New Noteworthy/New Noteworthy 0.8"

(Code Documentation)
 
(No difference)

Latest revision as of 10:53, 16 July 2014

Switch to DLTK4

To benefit for numerous bug fixes and improvement in DLTK, LDT is now using DLTK 4.

Remote Debugger

It is now possible to visually debug Lua applications from the Eclipse workbench. Most of the debugging features that you would expect are available: conditional breakpoints, variables inspection, support for coroutines, interactive console, expressions evaluation ...

Debugger.png

Code Formatter

It is now possible to automatically format Lua source code. You can adjust some formatting parameters in the Lua > Formatter preference page.

Unformatted.png

Code Templates

It is now possible to type most common code patterns (for loops, while loops, pcalls, ...) very quickly thanks to the new code templates.

CodeTemplate.png

Online Help

The user guide of LDT is accessible directly from the Eclipse online help mechanism. Do no hesitate to contribute to the documentation effort by reviewing or completing the User Guide on the Eclipse wiki.

Quick Outline

Using CTRL O (or Cmd-O on MacOSX) you can display a pop-up which contains the outline for the current file. It can be used to go very quickly to a variable or function declaration.

Code Documentation

As of RC1, LDT supports documentation of Lua source code using a language similar to LDoc. It allows to document Lua source code (and especially Lua modules), with the support of a Markdown syntax (to get nice content formatting), that not only allows to get nice HTML documentation (in the Luadoc view or when hovering on an element), but also drives the development environment in providing smarter code completion and navigation.

The documentation language format is described on the LDT wiki.

Documented-code.png

Luadoc View

When a properly documented Lua file is selected in the Script Explorer, or when the cursor is on a documented element in the Lua editor, the new Luadoc view will display a nice HTML version of the documentation.

Luadoc-view.png

Semantic-aware code completion

We have greatly improved the construction of the AST, and are using the information provided in the Lua documentation to propose an advanced content-assist feature. One of the first benefit will be for you to be able to have content-assist for the Lua standard library.

Content-assist-lua.png

Execution Environments

Often, when developing a Lua application, you are targetting a specific runtime, be it the regular Lua 5.x VM, or an homebrew embedded framework, a mobile framework, etc. Lua Development Tools now provides a way to reuse the same execution environment definition across different projects (think of how JDT allows to configure custom JREs, or how PDE allows to define Target Platforms).

Also, when creating a new Lua project, you can associate it with a specific Execution Environment.

Ee-in-script-explorer.png Ee-new-project.png

Semantic Highlighting

It is now possible to display local and global variables using different colors. Not only does it make the source code easier to read, but it is also very handy to spot possible scoping problems.

The Lua > Syntax coloring preference page allows you to change the colors assigned to both local and global variables.

SemanticHighlighting.png

Occurrence Highlighting

Thanks to the improved AST, whenever your cursor is on a local (including loops iteration variables) or global variable, all its occurrences in the current file will be highlighted so as you can spot them at a glance.

Occurrence-highlighting.png

Tasks in comments

Ever wanted to add some TODOs, FIXMEs, or things like that in your Lua comments, and benefit from the nice Eclipse "Tasks" view. Guess what? It is now supported by LDT! Whenever a task keyword (default list is: FIXME, TODO, and XXX but it is customizable in the preferences) is found in your source code comments, it automatically creates a new entry in the Tasks view so as you can easily navigate between pending tasks.

Ldt-tasks.png

Back to the top