Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Eclipse CDT (C/C++ Development Tool) is well suited to IOC development, and easily customized for editing .db/.template/.substitutions files. Even if you never touch the C code, you can do most of your IOC development with this tool. It includes more generally useful features like search and replace in a directory tree for file names or contents (Ctrl-H), regex search/replace, CVS access, make, and launching external tools like edm and vdct. Feel free to try the installation at /afs/slac/u/re/gwbrown/afsbin/eclipse/eclipse. This is not maintained as a site installation. It's easy to download and install your own configuration, where you can try out plugins etc. and untar a clean uninstall if it causes problems. Make sure you've requested a big afs quota.

Anchor
Download and Install Eclipse CDT
Download and Install Eclipse CDT

Download and Install Eclipse CDT

...

Other settings can be transferred similarly, but copying the entire .metadata directory tree will cause problems
Or
Go to Window -> Preferences, expand General->Content Types, expand Text -> Makefile, click Add...
and add everything in configure directory, *.db, *.substitutions, *.template, st.cmd

Anchor
EDM
EDM

EDM

You can have Eclipse launch external tools and editors. If you find a way of passing command line options, update this. It runs an executable with the selected file name as the only argument. As a workaround, instead of trying to pass command line options to edm, create a launch script that has command line options. Here's an example, ~gwbrown/scripts/eclipseEdm:

...

Window -> Preferences -> General -> Editors -> File Associations, Add... File type *.edl, to that Add... Associated editor of your launch script as n External program.

Anchor
VDCT launcher
VDCT launcher

VDCT launcher

Both Eclipse and VDCT are good about picking up on changes made by other programs to the files you have open, so you can use both at once. You can have Eclipse launch VDCT as an external tools. Navigate from the Run menu -> External Tools -> External Tools Configurations... . Click the rectangle with a + icon ("New launch configuration"), name it something meaningful like vdct, for Location: use /afs/slac/lcls/tools/script/vdct, for Working Directory: use ${project_loc}, and click Apply.

...

When you start Eclipse, it asks for a workspace. A workspace is just a directory. Give it a directory name, and it will create it if it isn't there already. It will put hidden metadata files and possibly project directories in the workspace directory.

Anchor
New Project
New Project

New Project:

An Eclipse workspace contains projects. Generally a project is tied to the top directory of a buildable unit, like one IOC or module. Projects are of a certain type, which tells Eclipse what type of content to expect, like a C++ makefile project which can be compiled and indexed, or a general project which is just a place for files. Though Eclipse will let you create a project pointing to any directory, e.g. /afs/slac, it's generally a good idea to keep them small. Not only will that speed up searching, compiling, and indexing, but some plugins such as CVS have caused big problems when they find files they're associated with in an existing subdirectory. Never create a project that has someone else's cvs controlled directory under it!

...

Start Eclipse. Click File -> New -> Makefile Project with existing code. Pick a name and directory path. Do not select GNU Autotools Toolchain (other than that, does the toolchain setting matter?)

Anchor
CVS
CVS

CVS:

Eclipse supports CVS, Subversion, GIT, and various others through plugins. They tend to share a common look and functionality.

...

Or Check Out As... to specify other options, like a project name different from the cvs directory name, or making it a C/C++ project

Anchor
General vs. C/C++ projects
General vs. C/C++ projects

General vs. C/C++ projects

Saves resources and some headaches if it's not configured as a C/C++ project, but limits features.
Making it a C/C++ project gives you: building in Eclipse, smart code editing features, debugging

...

Click project name, right click -> New -> Convert to a C/C++ Project
Select Project type "Makefile project", then Toolchains Cross GCC and Linux GCC. Click "Finish".

Anchor
Building the IOC
Building the IOC

Building the IOC:

Click the hammer icon to run "make"
Check the console tab for errors. The "Problems" tab isn't very reliable.

...


Click the project name, right click -> Clean Project to run "make distclean"
Check the console tab for errors. The "Problems" tab isn't very reliable.

Anchor
Other Installations at SLAC
Other Installations at SLAC

Other Installations at SLAC:

...