Versions Compared

Key

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

How can I debug into EMF in Eclipse
Download an SDK archive of the appropriate version of eclipse EMF containing EMF and XSD (and Eclipse's SDO 1.0 impl which can be ignored) from http://www.eclipse.org/modeling/emf/downloads/#archivesImage Added (currently 2.2.3 and likely to remain that way until SDO is not constrained to work with Java 1.4.2). The archive contains source code for each jar in zip files. Extract this archive onto your file system somewhere. You can associate a jar with a source zip in two ways. Either ...

  1. wait until you debug into an EMF class file that doesn't have a source association and then click the "Attach Source ..." button, or ...
  2. in the package explorer pane, open up the "Referenced Libraries" part of a projects source hierarchy and right click on one of the referenced libraries. Select Properties, and click on the Java Source Attachment tab.

Now you have the opportunity to define a variable for eclipse to provide an starting root location in the file system which can be extended in order to locate the source code (this allows for easy transport of eclipse projects between environments, since only the small set of environment variables need to be updated in order to make the project build again in the new environment.) Define a "New..." variable (mine is EMF_SRC) and make it point to a location above all the source file zips. The variable's value will be something like C:/Dev/downloads/emf-sdo-xsd-SDK-2.2.3/eclipse/plugins/. Now create an extension to that variable by clicking on "Extension...". Select your new variable, and open up the hierarchy to find the source zip file. For example

/EMF_SRC/org.eclipse.emf.source_2.2.3.v200705141058/src/org.eclipse.emf.ecore_2.2.3.v200705141058/src.zip

Be sure to select the zip file, and not a folder above the file. Close all the dialogs. Now your source file attachment is made and you will be able to debug through any file in that jar. You'll need to make more associations for the other jars by extending the existing EMF_SRC variable for those jars.

What is the connection between static XSDHelper calls when definition and load could be using different XSDHelpers for the same instance in the same VM. For example:

...