This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 407821 - Docbook outline shows only titled elements
Summary: Docbook outline shows only titled elements
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: 1.1.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.1.0 M2   Edit
Assignee: Florian Thienel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-12 11:56 EDT by Carsten Hiesserich CLA
Modified: 2013-09-15 10:54 EDT (History)
1 user (show)

See Also:


Attachments
Proposed icon set for the Vex Outline View (1.37 KB, application/x-zip-compressed)
2013-09-13 02:50 EDT, Holger Voormann CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carsten Hiesserich CLA 2013-05-12 11:56:01 EDT
The outline for docbook documents shows only a very little subset of the documents elements. Only elements that are assumed to have an 'title' are shown.

I think most users (including me) expect a XML editor to show the complete outline, that also would make document navigation much easier.

The filter is in line 96 of DocBookOutlineProvider:
  if (titledElements.contains(child.getLocalName())) {
    children.add(child);
  }

Everything works just fine if the if-statement is removed. Only comments are not shown then, but this would be an other issue.
Comment 1 Florian Thienel CLA 2013-05-19 04:06:49 EDT
I would prefer to show only "structural" elements, i.e. elements that are used to structure the document (down to paragraphs). I think having all inline elements in the outline makes it confusing for documents with a lot of textual content (what esp. DocBook documents are). 

What do you thing about this?
Comment 2 Carsten Hiesserich CLA 2013-05-20 06:51:39 EDT
Ok, inline elements isn't a must have in the outline (though i would prefer an option to display them anyway.
I don't really like the seperate OutlineProvider in the DocBook package, it somehow breaks the universal approach. Maybe a universal Outline provider that uses the CSS to decide what to display would be a better solution.
Comment 3 Florian Thienel CLA 2013-05-21 13:04:03 EDT
The universal outline provider sounds like a good idea. There is already one (org.eclipse.vex.ui.internal.outline.DefaultOutlineProvider) which should be enhanced.

There are a couple of other features that should be supported:
- custom and i18n-able names for the XML elements of a given DTD or schema
- DND support for structural elements
- ...
Comment 4 Carsten Hiesserich CLA 2013-08-22 06:49:52 EDT
The Docbook specific OutlineProvider is now replaced with a new default outline provider. The new default includes an option to show/hide inline elements ans introduces a new CSS property '_vex-outline-content' to select the text content displayed in the outline.
Comment 5 Holger Voormann CLA 2013-09-13 02:46:55 EDT
In the outline tree I propose to use two different icons instead of the single element icon: an icon for block elements and another for inline elements. The inline element icon could be used for the toolbar to show/hide tree nodes of inline elements.
Comment 6 Holger Voormann CLA 2013-09-13 02:50:30 EDT
Created attachment 235454 [details]
Proposed icon set for the Vex Outline View
Comment 7 Florian Thienel CLA 2013-09-13 15:34:13 EDT
https://git.eclipse.org/r/#/c/16424/