Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 122038

Summary: [editor] Allow "Show Source Of Selected Element Only" mode for XML, DTD, ...
Product: [WebTools] WTP Source Editing Reporter: Patrice Maldague <patrice.maldague>
Component: wst.xmlAssignee: Nitin Dahyabhai <thatnitind>
Status: RESOLVED WONTFIX QA Contact: Nitin Dahyabhai <thatnitind>
Severity: enhancement    
Priority: P3 CC: b.muskalla, for.work.things, nsand.dev
Version: 1.0Keywords: helpwanted
Target Milestone: Future   
Hardware: All   
OS: All   
Whiteboard:

Description Patrice Maldague CLA 2005-12-23 18:50:46 EST
The "Show Source Of Selected Element Only" mode (in Editor Presentation toolbar) does not work for XML, DTD, ...
Comment 1 Amy Wu CLA 2006-01-04 12:06:50 EST
Interesting.  I thought the "Show Source of Selected Element Only" mode was only Java editor-specific.  Guess not.
Comment 2 Nitin Dahyabhai CLA 2006-01-08 23:28:39 EST
While it may not be specific to the Java editor, I would think it has far less applicability given that the Selected Element is so much more granular in XML than in Java.
Comment 3 Patrice Maldague CLA 2006-01-09 15:49:24 EST
I don't think it's Java editor-specific since it is defined as a retargetable action (see action org.eclipse.ui.edit.text.toggleShowSelectedElementOnly in org.eclipse.ui.workbench.texteditor plugin).

The behaviour I was thinking about is to show the content scoped by the selection range indicator (= the XML subtree rooted by the element selected in the outline), not just the tag and attributes of the selected element (which would not be very useful). In my opinion, it can really help to improve the "signal-to-noise ratio" when navigating big XML files via the outline.
Comment 4 Amy Wu CLA 2008-02-04 12:58:07 EST
mass reassignment of my bugs to xml-inbox
Comment 5 Nitin Dahyabhai CLA 2011-07-14 19:05:28 EDT
Resolving as won't fix.  The selected Node changes far more frequently in XML and my thoughts in comment 2 haven't changed.  We'd only show you the one node and its children, and then clicking on a child node would retarget the selection to just that one child.  It works for Java because it never gets down to the single statement level.