Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 370270 - [UI] Generated Source View
Summary: [UI] Generated Source View
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.3.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 enhancement (vote)
Target Milestone: M7   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-31 15:27 EST by Sven Efftinge CLA
Modified: 2017-10-31 10:57 EDT (History)
1 user (show)

See Also:
sven.efftinge: juno+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Efftinge CLA 2012-01-31 15:27:12 EST
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.
Comment 2 Sven Efftinge CLA 2012-02-26 14:31:32 EST
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.
Comment 3 Michael Clay CLA 2012-03-01 15:51:17 EST
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.
Comment 4 Sven Efftinge CLA 2012-03-12 04:05:01 EDT
looks very good so far. :-)

It should be possible to show line numbers.
Also annotations for warnings and errors should be displayed.
Comment 5 Sven Efftinge CLA 2012-03-12 04:21:06 EDT
An "Open in Editor" action would be helpful, in cases where you want to try things out, or set a breakpoint on Java level.
Comment 6 Michael Clay CLA 2012-03-14 16:58:18 EDT
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.
Comment 7 Sven Efftinge CLA 2012-04-03 04:07:25 EDT
- 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
Comment 8 Sven Efftinge CLA 2012-04-03 04:08:18 EDT
(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.
Comment 9 Michael Clay CLA 2012-04-12 15:33:47 EDT
pushed remaining issues
Comment 10 Eclipse Webmaster CLA 2017-10-31 10:46:10 EDT
Requested via bug 522520.

-M.
Comment 11 Eclipse Webmaster CLA 2017-10-31 10:57:25 EDT
Requested via bug 522520.

-M.