| Summary: | [Outline] Regression: Link with Editor is broken | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Sebastian Zarnekow <sebastian.zarnekow> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | jan |
| Version: | 1.0.0 | Flags: | sebastian.zarnekow:
helios+
|
| Target Milestone: | SR1 | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
|
Description
Sebastian Zarnekow
see also https://bugs.eclipse.org/bugs/show_bug.cgi?id=297473 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=322435 XtextContentOutlinePage now uses the regions of its ContentOutlineNodes to find the best node for a text selection and no longer uses the ContentOutlineNodeAdapter. It should thereby be able to cope much better with lazily initialized outline trees. Nevertheless, "link with editor" will cause the outline tree to be constructed entirely on the first change of the text selection. I also added a guard that avoids changing the outline selection when the text selection has not changed, therefore avoiding cycles when link with editor is enabled. This should also fix bug 322435 and bug 297473. One problem remains: The region of an outline node refers to the region returned by the ILocationInFileProvider, which normally is the region describing the name of an object, instead of the entire text belonging to the object. So selecting a text area that does not belong to an object's name, e.g. a keyword, will not select the respective outline node any more. The easiest fix would be to change the region of the outline node to be the entire text of the object, but that would be a significant change of semantics. Given we are very likely reimplementing the outline in the next release, we should be able to live with that in the meantime. Addendum: If you know more about the structure of your outline tree, you might want to implement your own IContentOutlineNodeForTextSelectionFinder that stops digging deeper into the node hierarchy if possible and thereby avoids creating nodes eagerly. Closing bug which were set to RESOLVED before Eclipse Neon.0. |