Using Eclipse

We will illustrate how to use Eclipse with the UVic case study contained in the replication package. However, most steps are identical for the MITgcm setup. Differences will be noted below.

  • Startup Eclipse with the installed CP-DSL (see above)
  • Click on File > Import…
  • This opens the Import Wizard
  • Click on the arrow or plus sign in front of the entry General
  • Select Existing Projects into Workspace
  • Click Next>
  • This opens the Import Projects dialog
  • Click on the Browse… button to select the directory of the UVic project.
  • This opens a file dialog.
  • Navigate to the cp-dsl-replication/projects/ directory.
  • Select UVic and click Open.
  • Now there should be one project listed under projects.
  • Click Finish
  • If the welcome pane is still shown, close it by clicking on the X new the label Welcome.
  • Now you should see the IDE with a Model Explorer and an Outline on the left, a large empty area (for the editor) and a Properties and Problem view at the bottom.
  • Click in the Model Explorer on the arrow/plus sign in front of the word UVic. This unfolds the project and you can see 4 files labeled:
    • configuration.oconf
    • control.in.template
    • mk.in.template
    • uvic.decl
  • There might also be a src-gen folder. Ignore that for now.
  • Double clicking on configuration.oconf open the editor for the configuration and parameter selection editor of the CP-DSL. Here you can explore the settings we currently use with UVic.
  • The file uvic.decl contains the declaration of all features, settings and parameters UVic has.
  • The files control.in.template and mk.in.template contain the templates for the control.in and mk.in files used to configure UVic.
  • To translate the configuration.oconf into a valid UVic setup, you can either build the project under the menu Project > Build Project (which might be grayed out when the IDE is set to automatically build the project) or by opening configuration.oconf, editing something (e.g., adding one white space) and saving again (Ctrl-S) which triggers the automatic build.
  • The generated files can be found in src-gen.

MITgcm can be imported in the same way. However, the MITgcm project contains multiple oconf files. The translate in different subdirectories under src-gen.