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:
- Tree-like structured navigation to object/members in any file
- Refactoring assistance for moving/renaming members
- Integrated debugger
- Context-sensitive help linked to API documentation
- A built-in command-line shell window so you can run programs without leaving your environment
- A project manager to help manage groups and subgroups of related files
- Editing modes in other programming languages
- Easy keyboard customizationthe ability to make any keystroke perform any task (cursor movement especially, but also window movement)
- An open plug-in architecture so you can add other components
- Integration with a version-control facility is desirable, especially in windows environments. Look for CVS,[6] Subversion,[7] or Darcs[8].
[6] https://www.cvshome.org/
[7] http://subversion.tigris.org/
[8] http://darcs.net/
- Learnable, scriptable macros
- Easy language-aware navigation to your different files (with shortcuts such as "find declaration," "find definition," and "find references")
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
[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++:
- Plugins: Navigator, Project Viewer, Optional, FastOpen, Info Viewer, Console, Code Browser, XML
- Exuberant ctags version 5.5 or later (for use with Code Browser)
- ToggleHeaderSource version 0.4[19] or later for (easy switching between header/source)
[19] http://community.jedit.org/?q=filestore/browse/34
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. |
Категории