Descent 0.5

February 4th, 2008 | by Aldacron |

Ary has announced a new version of the Descent, the Eclipse plugin for D. From the NG post:

- Full autocompletion, which also writes the imports for you. No need to remember where that class or function you are looking for is located. Just start writing the name of it, press ctrl+space, select the suggestion, and the import is added at the top of the module automatically (no need to critic Tango anymore :-P). External variables does not participate in import-adding, because there are *so* many public ones…
- Go to definition. It even works for opCall and magic array functions. :-)
- Semantic highlighting: you can choose to color aliases, typdefs, classes, structs, interfaces, unions, templates, local variables, functions and function calls, etc., with different colors.
- Showing of semantic errors. By default, some semantic errors are shown, like undefined identifiers or unresolved types. You can turn this off, or you can enable full semantic error reporting (but it will probably lie in some cases, that’s why the default is “some”). It is recommended to turn this off for existing big projects, as it may cause more trouble than help.
- Compile-time evaluation of functions and other properties: hovering over an element while holding ctrl+shift shows it’s compile-time value. You can use this for built-in properties like init, min, max, sizeof, alignof, stringof, mangleof, length, constants, enum values and function calls (try writing a factorial function, then invoke it with a constant value somewhere in the code, and ctrl+shift+hover over the call). If the result of the evaluation is a string, and it is likely a declaration, it will have syntax highlighting and will be formatted according to your formatter preferences. This is useful for seeing the string passed to a mixin.
- Graying out of inactive code: shows in gray code that is not reachable because of debug or version levels/identifiers and static ifs that evaluate to false.
- Improved occurrences finder: selecting a token highlights all other tokens with the same semantic meaning. Then, pressing ctrl+2, r, allows you to rename all those occurrences. Very useful for renaming local variables, functions and types.
- Declaration view: shows the source of the element under the cursor.

For current users: after you update the plugin, go to Windows -> Preferences, D -> Compiler, and change any setting. It will ask you to rebuild everything. You’ll need to do this since I’ve changed the format of the indexes for searching stuff. Otherwise you’ll get errors, or some things won’t work.

I still haven’t used this yet, but it’s sounding really nice. Do let me know in the comments what your opinions of it are if you use it.

Technorati Tags: ,

6 Responses to “Descent 0.5”

  1. By Yuan WANG on Feb 4, 2008

    I tried it today. It’s really great

  2. By gerleim on Feb 5, 2008

    No update from inside Eclipse.

  3. By goshki on Feb 5, 2008

    That’s right - no update with Eclipse Update Manager. I’ve even tried to uninstall previous version of the plugin and now I have no Descent at all… :/

  4. By Robert Fraser on Feb 5, 2008

    Oops; our bad! Try again now; I think Ary fixed it.

  5. By Ary on Feb 5, 2008

    Yes, it’s fixed now, please try again.

  6. By goshki on Feb 5, 2008

    Yes, now everything is fine. :D Thanks!

Post a Comment