| Summary: | [debugger] Install source information into bytecode (replace references to Java) | ||
|---|---|---|---|
| Product: | [Tools] Xtend | Reporter: | Sven Efftinge <sven.efftinge> |
| Component: | Core | Assignee: | Project Inbox <xtend-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | alex.tugarev, moritz.eysholdt |
| Version: | 2.4.0 | Flags: | sven.efftinge:
kepler+
|
| Target Milestone: | M4 | ||
| Hardware: | Macintosh | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 384062, 387677 | ||
|
Description
Sven Efftinge
I've pushed a first version to 'master': http://git.eclipse.org/c/tmf/org.eclipse.xtext.git/commit/?id=68b9c11258816778bcc88e0bea0cab7c7b82a49e In the compiler preferences for a specific output folder, you'll find a checkbox named "Use DSL files only (and not Java files) as sources for debugging". You'll need to enable this to test this feature. If enabled, Xtext uses the ASM bytecode manipulation library to replace the SourceFile and LineNumberTable attributes in the java class file. These attributes then point to the DSL files instead of the Java file. These is one remaining problem: The Eclipse Debugger opens the Java File form the bin folder instead of the one from the source folder. This seems to be because JDT copies .xtend files to the bin folder and the bin folder is earlier on the search path. For SMAP support, this was "fixed" by using a project-relative file name. Th however, doesn't seem to be supported by the Eclipse Debugger for the primary source files. Correction: There is one remaining problem: The Eclipse Debugger opens the XTEND File form the... workaround: go to project preferences -> Java -> Compiler -> Building -> OutputFolder -> and add "*.xtend" to the list of filtered resources. Maybe we should do this automatically for Xtend projects. The configuration is programmatically accessible via org.eclipse.jdt.core.JavaCore.CORE_JAVA_BUILD_RESOURCE_COPY_FILTER. Now, *.xtend is added to the JDT Builder Resource Copy Filter when the Xtend constructor is created. See http://git.eclipse.org/c/xtend/org.eclipse.xtend.git/commit/?id=8ceaceffb0333d2cbb835cf52156f884321adbdf I'm doing this via a Guice eager binding and not in the plugin activator, since our activator is in src-gen and I didn't feel like subclassing it. Requested via bug 522520. -M. Requested via bug 522520. -M. |