Section C.5. Open-Source IDEs and Development Tools

C 5 Open Source IDEs and Development Tools

It is not practical to do object-oriented development with an ordinary text editor. Object-oriented development involves working with many classes and many more files (headers and sources). Writing code in an edit window is just a small part of the development process. A good programmers editor or IDE (integrated development environment) should support many of the following features:

An open-source option for Win32 users is Dev C++[9] from Bloodshed Software, which works quite well with MinGW and cygwin.

[9] http://www.bloodshed.net/devcpp.html

KDE users can use KDevelop3,[10] a feature-rich, open-source IDE with excellent C++ and code navigation features. It has built-in support for importing Qts qmake project files. Simply select Project -> Import Existing Project from the menu and choose the .pro file you wish to work with.

[10] http://www.kdevelop.org

For all platforms, there is Eclipse,[11] a free Java-based open-source IDE. You can download plugins for C++ development,[12] as well as Qt/KDE development.[13] The latter allows you to import qmake .pro files into Eclipse as projects directly.

[11] http://www.eclipse.org

[12] http://www.eclipse.org/cdt/

[13] http://kde-eclipse.pwsp.net/index.php

Maximum Code Reuse KDevelop

An interesting thing about KDevelop is that it embeds stand-alone applications and "plugs them in" to the QMainWindow as dock widgets. If you already use KDE and some of the common *nix development tools, you will find some familiar apps already available inside the dock windows. In the case of KDevelop:

  • The debugger is a KDE front end to gdb, similar to kdbg.
  • For CVS browsing, KDevelop has integrated cervisia.
  • By default, KDevelop uses Kate[14] (the "KDE Advanced Text Editor") for editing.
  • The designer for creating widgets is a customized version of Qts Designer.
  • The command-line shell is a dockable window inside KDevelop. Its the regular KDE Konsole[15] xterminal.

Because KDevelop is built on top of KDE libraries, and KDE libraries are based on Qt, using KDevelop will unable you to become more accustomed to how various Qt widgets work. See Figure C.2.

Figure C.2. KDevelop

[14] http://kate.kde.org/

[15] http://konsole.kde.org/

C.5.1. UML Modeling Tools

For creating diagrams in this book using the Unified Modeling Language, we use two open-source tools, Umbrello[16] and Dia.[17] Each tool uses an XML dialect as its native file format.

[16] http://uml.sourceforge.net/index.php

[17] http://www.gnome.org/projects/dia/

Umbrello is the KDE UML Modeler. It can directly import C++ code, making it very easy to drag and drop imported classes into diagrams, as shown in Figure C.3.

Figure C.3. Umbrello screenshot

Dia is a more general-purpose diagram tool with some UML features. There are many plugins and utilities that let you import code and export diagrams to and from Dia to other languages and formats.

C.5.2. jEdit

jEdit[18] is a mature, open-source, programmers text editor. Because it is written entirely in Java, it works on all platforms. Its keyboard configurability is very flexibleany action can be bound to a primary and an alternate shortcut.

[18] http://www.jedit.org

To install it, first download a recent (5.0) version of the Java Development Kit (JDK) from http://java.sun.com, and then download the latest development version of jEdit.

Before using it very much, it is recommended you install some additional programs for development in C++:

Figure C.4. jEdit screenshot

Check the keyboard configurability, Global Options -> Shortcuts. Notice that all the plugins and macros have their own shortcut-able actions. And after you have included some plugins, check out the Global Options -> Docking and dock some of the plug-ins dockables to the sides of your edit window.

Категории