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 208339 - Html formatting can not be changed
Summary: Html formatting can not be changed
Status: RESOLVED DUPLICATE of bug 144164
Alias: None
Product: web
Classification: Unclassified
Component: HTML Editor (show other bugs)
Version: 7.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks: 208404
  Show dependency tree
 
Reported: 2012-02-13 13:31 UTC by _ wadechandler
Modified: 2012-10-15 13:11 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
File to use for format testing (9.37 KB, text/html)
2012-02-15 17:10 UTC, _ wadechandler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ wadechandler 2012-02-13 13:31:41 UTC
To reproduce:
1) Go to Tools|Options|Editor|Formatting
2) Notice in the language drop down there is not HTML
Comment 1 Geertjan Wielenga 2012-02-13 13:48:27 UTC
What kind of formatting changes would you like to be able to make?
Comment 2 Petr Jiricka 2012-02-14 16:39:38 UTC
-> enhancement
Comment 3 _ wadechandler 2012-02-15 16:18:03 UTC
(In reply to comment #1)
> What kind of formatting changes would you like to be able to make?

I have worked on projects where some like to format tables like:
table
   tr td td td
   tr ...

and others (which I prefer)

table
   tr
      td
      td
      td
   tr
      ...

Though when comparing rows of some applications output being able to configure the above is handy because it aligns them where they can be compared or better for readability in the editor; two different use cases depending on what phase one is in on a project (development versus debug session or current application study and temporary files which a good IDE helps with as well)

HTML5, if that is being worked on, has other layout containers which will need specific formatting requirements too.

XML (XHTML can fall into this too), I think being able to configure how it will "pretty print" is very handy. For instance, I might want:

root
   container
      child
      child
      child

or

root
   container child child child

where child is the bottom of the tree (this specific designation is important)

root
   container
      child
   container
      child

root
   container child
   container child

and

root
   container
      child
      child
   container
      child

Though one may want the following, and I can see that in some cases

root
   container child child container child

perhaps more elegant for

root
   container
      big-child child child child
   container
      big-child child child child

Which seems to insinuate a need for being able to tell the system that for specific element types to format them specifically versus just being able to format generic parent child relationships. For instance, inventory rows versus customer rows when viewing application output etc. It also makes me wish I was able to save named formatting rules which I could then apply to a specific file as needed or even register that the project always format a specific file the same way yet for others use the general options I have set for the file type. So, certainly XML and HTML are something where more options will be handy.

JSON has similar needs as XML and HTML. Perhaps a generic base for building formatters on some type of a markup language, but I haven't given such an API enough thought to make it useful to the conversation at this point, but it did come to mind when thinking about this.

I will attach a file from another issue which has a crazy long table. If you tidy it with different options using:
http://infohound.net/tidy/

and compare that to what the IDE is doing, you can get a good feel for how limited the HTML reformatting in the IDE is currently.
Comment 4 _ wadechandler 2012-02-15 16:20:36 UTC
In HTML, there are specific tags which make up the keywords versus the keywords of something like Java. I think those things need to be factored in such as lists, tables, etc which insinuate various formatting. They need to be handled differently in different cases. HTML 5 has other special tags which fall into this type category too.
Comment 5 _ wadechandler 2012-02-15 17:10:00 UTC
Created attachment 115776 [details]
File to use for format testing

This is a file with a really long table. HTML format will not break this up currently. I must leave the IDE, use a tidy tool, and paste back to the IDE to reformat this file into something more manageable. The particular set of HTML may not be realistic, but similar realistic logic exists, and that is the important thing to keep in mind.
Comment 6 Marek Fukala 2012-10-15 13:11:33 UTC

*** This bug has been marked as a duplicate of bug 144164 ***