History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEA-16334
Type: New Feature New Feature
Status: Open Open
Assignee: Dmitry Avdeev
Reporter: Taras Tielkes
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
IDEA: Feedback

highlight unused namespace declarations

Created: 14 Nov 07 00:09   Updated: 02 Feb 08 17:00
Component/s: XML editing

Build: 7,549
Severity: Low


 Description  « Hide
The XML editor could highlight unused namespace declarations (using grey color).

In addition, intention to remove usused namespace declaration could be added.
"Usages" from xsi:schemaLocation attribute should be ignored I presume.



 All   Comments   Work Log   Change History      Sort Order:
Sascha Weinreuter - 14 Nov 07 01:07
This has to be handled with care because the declared prefix could be used by some non-native xml mechanism, like in XSLT where you need an "ordinary" namespace declaration to use a prefix in an XPath expression but which would appear as unused.

Of course this could be solved by providing a proper API to track declarations and their usages, including those from plugins - which would hopefully also introduce the ability to rename namespace prefixes...


Taras Tielkes - 14 Nov 07 02:15
Indeed, I postponed creating this issue in the past because of such edge cases.

+1 for prefix renaming.
Prefix highlighting would also be nice, however I also like the current "prefix+tagname" based resolving.
Perhaps highlighting could work at least from namespace declaration? (at the moment the text-based highlighting is not quite useful if the prefix is short - or worse, only a single character like the "c" taglib in JSPX)