Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

As of July 2010, this project has been renamed "DDT", and moved here:

http://code.google.com/a/eclipselabs.org/p/ddt/

Please preserve these entries for historical purposes.

Mmrnmhrm

Mmrnmhrm (pronounced mer-nem-herm) is a Eclipse D IDE, partially based on Descent, aimed at bringing semantic IDE functionality (such as code completion, find definition, find references, etc.) to D. It was developed by Bruno Medeiros (see MmrnmhrmDeveloperNotes), and is now more or less under hiatus status.

Latest release: 0.3.1 (changelog)
Eclipse Update Site: http://svn.dsource.org/projects/descent/downloads/mmrnmhrm/update-site/

IDE features

  • Rich JDT-like project model
    • Supporting DMD+Phobos compiler install location and Standard Lib
  • D Editor:
    • Syntax Highlighting (with preference page)
    • Content Outline and rich Quick-Outline
    • Folding, bracket matching
    • Find Definition (with hyperlinking and formatted DDoc text hovers (pic))
    • Code Completion (pic1, pic2, pic-defunits)
  • Open-Type dialog (pic)
  • Semantic Search
    • Search for definitions based on a text pattern
    • Search for all references to a given definition (pic)
  • Type Hierarchy View and Type Hierarchy Popup ((only super type viewing is working now, waiting for further DLTK improvements))
  • Integrated builder support
  • Basic launch support (Descent's debugger can be used together)

This video of a DTLK TCL demo demonstrates similar functionality also available in Mmrnmhrm (except, at the moment, for Call Hierarchy, or Code Templates).

Installation

Requirements: You will need a Java 1.6 JVM or greater, and Eclipse 3.5.0 or greater.

  1. Go to http://download.eclipse.org/eclipse/downloads/ .
  2. Click the build under "Latest release", and download the Platform Runtime Binary for your computer platform. You can of course download Eclipse builds with more stuff, but "Platform Runtime Binary" is the minimum.
  3. Start Eclipse, go to "Help -> Install New Software..."
  4. Click the "Add..." button on the right, and enter http://svn.dsource.org/projects/descent/downloads/mmrnmhrm/update-site/ URL for the site's Location, and any Name you wish.
  5. Select that site in the "Work with:" dropdown. Now a "Mmrnmhrm IDE" feature should appear.
  6. Select the IDE feature, click Next in the wizard. A few dependencies should show up, namely DLTK which should be version 1.0 or compatible. Click Next and finish the wizard.
  7. Restart Eclipse. You should now add a D compiler installation (see below).

Descent may or may not be installed as well, although if it is, its editor may take priority in opening .d files.

Configuration

First of all configure an installed D compiler on the preference pages ('Dee (Mmrnmhrm) / Compilers'). They are called 'interpreters' by the DLTK framework in most of the IDE. Click "Add..", then "Browse.." and then navigate and select the dmd executable for the D compiler installation. Now the "system library" location should be filled automatically. Only DMD is supported at the moment. Configuring a D compiler installation allows the standard library to be part of the project's build path (see build path below) which is important for the IDE to work properly (for code-completion, the builder, etc.).
Tango can be supported if after selecting the dmd executable, you change the location of the system library (that's the same thing as the standard library).

Usage

Basics: A new D Mmrnmhrm project can be created with the 'New D Project' wizard. The D perspective should open after creation. Use the Script Explorer view to work with the projects, (the Project Explorer View is not yet properly supported). Also, you may wish to customize the perspective's actions, so that the Launch Action Set appears (open the context menu on the perspective icon, "Customize", "Commands", enable "Launch" on the "Available command groups").
If you have Descent installed, its editor will take precedence when opening .d files on the views other than the Script Explorer. (You can configure the default .d editor in Eclipse Preferences, General, Editors, File Associations. Add a .d file type there, and the list of associated editors will show up below. Select Mmrnmhrm as the default. )

Build Path: The build path is the set of folders and libraries that contain the D files that constitute the D project. The imports on semantic features (such as code completion) will only see the files contained in the build path. If you already know how JDT works, it's all very similar. The managed build also works according to the project build path. The build path can be configured in the "D Build Path (Mmrnmrhm)" project property page, or in several context menu actions of the Script Explorer view. The simplest element of the build path is a source folder, which is a folder that contains D files (.d or .di), whose module/package declaration must match the filesystem directory hierarchy, rooted at the source folder.
Project references (ie, references between projects) are not yet support as build path entries, nor are zipped folder/libraries.

Find Definition: The Find Ref functionality is invoked by pressing F3 when in the Mmrnhrm D editor, or by clicking the Find Ref button placed in the toolbar. When using the toolbar button, Find Ref will work for in any text editor (including Descent's), however it won't be able to follow imports across modules, if the file is not on the build path of a Mmrnmhrm project. Find-ref is also available in the form of editor hyperlinking (hold Ctrl and select a reference with the mouse) and in the editor context menu.
This functionality Locates any definition unit: Module, class, struct/union, variable, function parameter, template, template parameter, alias, typedef, named enums, enum members, unnamed enum members, named mixins, import aliases, import selections. (FIXME)Unsupported:

  • Searching inside unnamed mixins, and the scope of the with() statement.
  • Special reference targets: goto labels, version/debug identifiers.
  • Most expression reference nodes (including function calls).
  • Special references (new, delete, this, super).
  • Some native references (int, void, arrays, functions, etc.).
  • Function or template overload resolution (if there are several matches, lists all homonyms).

Text Hover: Text hover shows a text popup with some info (signature + DDoc) over the reference or definition under the mouse cursor. The hover will interpret DDoc macros in rich way.

Code Completion: Has the same semantic power as find-ref to determine completions. May not work 100% correctly (if at all) when a file has syntax errors. It does try to recover for some common syntax errors however. Does not yet consider name shadowing.

Open-Type dialog: Invoke with Ctrl-Shift-T. Works the same as JDT, you can use all-caps to search for camel case names, ie, NPE will search for NullPointerException and other with the same initials.

Open Hierarchy View, Open Hierarchy Popup:

Type Hierarchy View is available by pressing F4, Type Hierarchy Pop-up is available by pressing Ctrl-T. Supertype hierarchy viewing should work ok, but subtype hierarchy is not, needs further work on part of DLTK.

Semantic Search: The search dialog allows searching for definitions based on a text pattern (Main menu: Search/D...). It is also possible to search for all references to a given definition. Select a definition unit, and use the editor's context menu to search for references (shortcut: Ctrl-Shift-G). This can also be invoked on references, in which all references to the same target definition will be search for.

Builder and launch: There is some support for integrated builder functionality, namely, the IDE can automatically manage some of the build settings according to the IDE's D project configuration. The build settings can be accessed on the "D Compile Options (Mmrnmhrm)" project properties page. Here's how it works: Mmrnmhrm will create a build.rf file in the project root folder and then invoke a builder according to the "Build Command:" configuration entry. You can, and should, specify arguments to the build command here, such as the response file "build.rf". The contents of the build.rf file will be the same as the "Managed Response File" configuration entry, except that some special tokens will be replaced according to the IDE's project configuration. With this functionality it should be possible to use any builder, such as rebuild, bud, or even DMD itself (not recommend for large projects). New D projects have a default builder configuration set up for usage with rebuild, which should work out of the box if you have rebuild on the path. The available replace tokens are:

  • $DEEBUILDER.OUTPUTPATH - Project relative output path
  • $DEEBUILDER.OUTPUTEXE - Project relative output executable path
  • $DEEBUILDER.SRCLIBS.-I - Absolute path of all source libs, each prefixed by "-I" and separated by newlines
  • $DEEBUILDER.SRCFOLDERS.-I - Project relative path of all source folder, each prefixed by "-I" and separated by newlines
  • $DEEBUILDER.SRCMODULES - All source modules (.d files) found in the project's source folders, separated by newlines

There is also a substitution token performed for the builder command line ('Build Command:' option) :

  • $DEEBUILDER.COMPILERPATH - Full directory path to the dmd compiler exe defined in the project's interpreter entry (directory only, no executable file).

Also, the IDE will run the build command with a modified path: The DMD compiler path will be added as the first entry in the proccess PATH environment variable [This is because rebuild doesn't have an option to specify the compiler and bud's -DCPATH is currently broken]. This path is obtained from the configured "interpreter" of the D project.
When run, the builder will print its output on the Eclipse console. If by any reason you have problems with the builder, it can be disabled on the Builders page of the project properties.

Launch support merely Runs the executable file associated with a D project, so it's almost like an External Tool launch mode. There is no Debug support but you can use Descent's debugger with a minor degree of integration (you can manage Descent's breakpoints in Mmrnmhrm's editor).

Future directions

  • Continuous integration with DTLK upcoming features.
  • Improvements on the find-ref semantic engine.
  • Improvements on the parser error recovery?
  • Further integration with Descent?

See also: