Community
Participate
Working Groups
A generated source view should represent the derived text files correposnding to the DSL file in the currently active editor. This view is based on information provided by org.eclipse.xtext.generator.trace.ITraceInformation. A sync mode should highlight the ranges corresponding to the current selection in the active editor. The text should be readonly and use the typical highlighting for the given language.
pushed initial version pls see http://git.eclipse.org/c/tmf/org.eclipse.xtext.git/commit/?id=0874dcf831bad281c592ec68f8d47da38341fe2c and http://git.eclipse.org/c/xtend/org.eclipse.xtend.git/commit/?id=4ceeb09940d3aff91782a0cdc8f3d7627d373e2a
Thanks! A good start, please consider the following: An element in Xtend (or any other language) might have multiple target regions (in one or more files). So we need to use getAllAssociatedLocations not just the best here. To mark them Sebastian suggested to use annotations which seems like a good idea. Maybe we can reuse the annotations used by search results or mark occurrences. If the selection has traces to multiple files those should be shown in a combo box at the top of the view. The combo box should not be rendered if there's only one target. Actually I think the combo box should list all files derived from the file in the active editor, not just those of the current selection. AbstractSourceView seems to have a lot of functionality (the node and object stuff) which is not needed here. I think it should go into DeclarationView again. AbstractSourceView should only contain what is really needed by both subclasses.
done. pls have a look at http://git.eclipse.org/c/tmf/org.eclipse.xtext.git/commit/?id=ee2203ecdbc0c3e69e5c51a7e0988aeb812b72b3 and http://git.eclipse.org/c/xtend/org.eclipse.xtend.git/commit/?id=991839848775fdb3bbe2a6bc4e96ef0d422d4a38 (In reply to comment #2) > Thanks! A good start, please consider the following: > > An element in Xtend (or any other language) might have multiple target regions > (in one or more files). > So we need to use getAllAssociatedLocations not just the best here. To mark > them Sebastian suggested to use annotations which seems like a good idea. Maybe > we can reuse the annotations used by search results or mark occurrences. > > If the selection has traces to multiple files those should be shown in a combo > box at the top of the view. > The combo box should not be rendered if there's only one target. Actually I > think the combo box should list all files derived from the file in the active > editor, not just those of the current selection. > > AbstractSourceView seems to have a lot of functionality (the node and object > stuff) which is not needed here. I think it should go into DeclarationView > again. AbstractSourceView should only contain what is really needed by both > subclasses.
looks very good so far. :-) It should be possible to show line numbers. Also annotations for warnings and errors should be displayed.
An "Open in Editor" action would be helpful, in cases where you want to try things out, or set a breakpoint on Java level.
done pls review (In reply to comment #5) > An "Open in Editor" action would be helpful, in cases where you want to try > things out, or set a breakpoint on Java level.
- please change the background color to yellow again (like in JDT's declaration view) - add support for all editor features (but not editing), such as annotations, hovers and navigation
(In reply to comment #7) > - add support for all editor features (but not editing), such as annotations, > hovers and navigation If it's a relatively low hanging fruit.
pushed remaining issues
Requested via bug 522520. -M.