Versions Compared

Key

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

...

You will need the Java SDK (not just the JRE), and Daffodil requires Java 8 (aka 1.8) at least.

The daffodil tree includes a sub-directory called eclipse-projects. The actual daffodil submodules can all be imported to Daffodil by importing this directory, and using the wizard to search for nested projects and detect and configure project natures. No need to import the actual eclipse-project folder.

An Eclipse 'Linked Resource' named DAFFODIL_ROOT must be defined to be the path to the clone of the git repository for Daffodil. This can be done via General > Workspace > Linked Resources.

Setup Eclipse Projects

You will need the sbtEclipse plugin. Version 2.5.4 is known to work.

Then just invoke

Code Block
sbt updateClassifiers compile eclipse updateEclipseClasspaths

This will create an Eclipse .project, .classpath and .settings within each sub-project.

Then in Eclipse...

  1. First turn off automatic build
    1. Project menu at top, ensure "Build Automatically" is unchecked.
  2. Import all the daffodil projects
    1. File -> Import, Projects from Git, Existing local repository,
    2. select the daffodil directory -> next -> Import existing Eclipse projects -> Next.
    3. All projects should be pre-selected for you. -> Next.
    4. You should now have a collection of project folders displayed in the package explorer.
  3. Fix daffodil-lib
    1. resource_managed/main folder: right-click Build-Path → add as source folder.
    2. src_managed/main folder also add as source folder
  4. Fix daffodil-japi: Edit daffodil-japi/.settings/org.scala-ide.sdt.core.prefs
    1. Delete the line that begins with "XPlugin="
    2. Delete the line that begins with "P="
  5. Select and refresh all projects.

You can now build all projects, and run tests in the ordinary Eclipse way.

These projects are all set up to use a common lib_managed project directory that is an Eclipse link to the DAFFODIL_ROOT/lib_managed which is populated using sbt. See the note below about "pre-build with sbt".

...

Before starting Eclipse, you must issue the 'sbt updateClassifiers compile' command. This pulls down all libraries needed, and puts them into lib_managed where the eclipse projects are setup to find them. This also pulls down all the source and javadoc jars for convenient access. The compile command forces some code-generator steps to run which create source code in the daffodil-lib module.

...

Before building the rest of the Daffodil modules, you must first build daffodil-macro-lib. This defines macros that are used in the other modules.

You'll need to add the below as Compiler Options for Scala. This will allow the other modules to use macros

...

This 'sbt updateClassifiers compile' must be repeated any time the daffodil-propgen module is changed.


Eclipse Settings for DFDL Schema Authoring/Editing

...

  1. Window > Preferences > Validation
    1. turn off XML Schema Validator
    2. turn off DTD Validator and HTML Validator
    3. click the ... settings box to the right of XML Validator
      1. Select Include Group
      2. Click Add Rule
      3. Select File Extension
      4. Click Next
      5. Add extensions tdml
      6. Click Finish
      7. Repeat steps i-vi, replacing tdml with dfdl.xsd
  2. Window > Preferences > General > Content Types
    1. Select Text > XML
    2. Click Add...
    3. Set Content type to *.dfdl.xsd
    4. Repeat steps b-c with content type set to *.tdml
  3. Window > Preferences > XML > XML Files > Editor
    1. Uncheck Format comments
  4. File > Import > XML > XML Catalog
    1. Choose daffodil-lib/src/main/resources/eclipse-xml-catalog.xml

Graphics Problems on Linux/Fedora

...