This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 224662 - HTML "rename" element (F2)
Summary: HTML "rename" element (F2)
Alias: None
Product: web
Classification: Unclassified
Component: HTML Editor (show other bugs)
Version: 7.3
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Assignee: Marek Fukala
Depends on:
Reported: 2013-01-09 17:27 UTC by pekarna
Modified: 2013-08-27 13:39 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description pekarna 2013-01-09 17:27:57 UTC
Most often, if a HTML element's tag name is rewritten, it is done on both sides - start tag and end tag.

It would be very nice if NetBeans allowed navigating to the tag, press F2 and allow to rename both start and end tags.

It would work the same as renaming java variables.

 | == caret
 [...] = selection / frame



Comment 1 pekarna 2013-01-09 17:40:09 UTC
Actually, more refactoring concepts could be used here.
If the DOM would be well-formed, NetBeans could also allow

* deleting, 
* perhaps copy/cut and paste, selecting whole element including inner content,
* move up/down, which would swap the element with it's parent / 1st child,

Just for inspiration :)
Comment 2 pekarna 2013-01-09 17:43:08 UTC
* deleting the element but leaving inner content,

And all these actions could also nicely bind to actions in Navigator - drag&drop, deleting, shift-del, ctrl-c / ctrl-v...
Comment 3 Marek Fukala 2013-08-27 13:39:31 UTC
1) instant rename allows to edit the element's open/end tag simultaneously as you propose. Use Ctr/Cmd-R when in open/close tag.

2) select/deselect code block actions (Ctrl-Shift-, Ctrl-Shift-.) allows you to select a text/surrounding element/its parent/...

3) surround with tag/remove surrounding tag fixes for selection are available then.

Does this satisfy your needs?