Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

This page contains some coding conventions for the Groovy-Eclipse project.

Copying code from Eclipse and JDT

In general, we want to avoid copying code from JDT and Eclipse. Instead, the preferred way to extend or borrow Eclipse functionality is to use sub-classing and reflection. Where this approach is not possible or it is unwieldy, it may be reasonable to copy an entire file. Here are the guidelines for doing this:

  • Add the copied file to the jdt_patch source folder in the plugin. (If this doesn't exist yet, then create it.)
  • Change the package name by prefixing 'greclipse." to the package.
  • First line of the file should describe where it comes from (fully qualified name, plugin, etc).
  • Start all changes with // GROOVY start and all changes with // GROOVY end
  • No need to do this for imports and package declarations

Code formatting, templates, and code cleanups

Please import the following files into your Eclipse preferences and use these when making changes to the GRECLIPSE project.

GRECLIPSE code formatting
Code cleanups
Code templates

  • No labels