Versions Compared

Key

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

...

Tips on how to configure Eclipse to contribute to sipXconfig project.

General Remarks

You should feel free to use whatever developement environment suits your needs. If you happen to use NetBeans, emacs or anything else please share your experience. Let sipx-dev@sipfoundry.org us know if you would like to keep configuration files for your environment in sipXconfig subversion repository.

...

  • excellent code browser
  • built-in refactoring support
  • code formatter that can be configured to comply with sipX coding standards
  • unit test support - writing and executing unit test from IDE
  • good subversion plugin - commit, update, diff and graphical merge support
  • other plugins for libraries and technologies used in sipXconfig: SQL Explorer, Spring, Tapestry, XML etc.
  • decent remote debugging support
  • decent GWT debugging support

Installation

Get the latest stable build of Eclipse and install it on the system. Some Linux distributions (Fedora Core 4) include eclipse. However Eclipse install without any problems on Linux, Windows and Mac OS X.

...

Eclipse has a notion of workspaces and project. Workspace is a set of related projects that share common options (compilation, code formatting etc.). From my experience it's best to have one workspace per subversion branch (i.e. a separate workspaces for main, 2.8, 2.6 etc.)

Configuration

Set common configuration options.

Classpath

  1. Go to Windows->Preference screen
  2. Select Java->Build Path->Classpath Variables and add the following

...

Panel

SIPX_PREFIX=path to top install directory
OPENFIRE-ROOT=path to openfire root (usually /opt/openfire)

Java Code Style Options

Go to Windows->Preferences->Java->Code Style

...

Consider configuring Save Actions to clean-up changed files and format changed lines in the file.

Java Compatibility Options

SipXconfig requires Java 1.6:

  1. Go to Windows->Preferences->Java->Compiler and check that the "compiler compliance level" is set to 1.6.
  2. Go to Windows->Preferences->Java->Installed JREs and select a 1.6 JRE. If there is no 1.6 JRE on your computer, then you will need to install one.

Other useful options

Plugins

Installing these plugins is optional, but they do have plenty of features that would simplify developement.

...

Other plugins have to be downloaded and install manually (by copying the plugin to /path/to/eclipse/plugins directory).

Projects

The last step is opening sipXconfig projects. All necessary configuration files are kept in subversion repository (these are .project and .classpath file in sipXconfig subdirectories) - it's easy to open projects in Eclipse by importing them.

...

All projects are automatically compiled in background. You are ready to go.

Using Eclipse for C/C++ projects

Eclipse can be used as a C/C++ development environment. You need to install the C/C++ Development Toolkit (CDT) that can be found at http://www.eclipse.org/cdt/ .
You will need to get Eclipse (version 3.3.0 at least) (http://www.eclipse.org/downloads/) and the Eclipse CDT (download.eclipse.org/tools/cdt/releases/europa).

Please see this document for more details.

Eclipse on Gentoo

  • Read this page http://gentoo-wiki.com/Eclipse
  • Install/select Sun's 1.4 JDK
  • Get recent version of eclipse
    Panel

    echo "dev-util/eclipse-sdk ~x86" >> /etc/portage/package.keywords
    emerge dev-util/eclipse-sdk