Bug 54453 - ant formatter should format comment blocks
Summary: ant formatter should format comment blocks
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Ant-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-11 08:57 EST by John-Mason P. Shackelford CLA
Modified: 2009-08-30 02:15 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John-Mason P. Shackelford CLA 2004-03-11 08:57:14 EST
The formatter should format comment blocks such as appear in the comment below.
This means aligning the block itself (done), aligning the text within the block
and making sure that each line of the comment is the same length.

We could do this a couple of different ways:
1. The comment block width is determined by the text within the block (upto a
certain length at which point wrapping begins), or
2. The comment block is always a standard width (specified via a preference) and
additional text is wrapped inside the block.

Some allowance should be made for a comment block before the project element
which is full page width.
Comment 1 John-Mason P. Shackelford CLA 2004-03-11 08:57:52 EST
Comment from bug 40255. (This ought to be posted to the text newsgroup).
---
One of the things I am trying to do with the comment formatter is clean up block
comments just as the one below.

<!-- - - - - - - - -->
<!-- my target     -->
<!-- - - - - - - - -->

One difficulty I've had in doing so is that the partition scanner places each
comment (e.g. <!-- --> ) into its own partition. This requires my
FormattingStrategy to glue partitions together or work with them together--which
is rather awkward since the CommentFormatter2 API and ContextFormatttingStrategy
APIs assume that only one partition is formatted together and that they are
formatted relatively independently from one another. This works fine if the same
basic rules apply to each partition, but if--for example--the length the block's
top and bottom comment lines were driven by the length of text inside the middle
comment, it begins to feel like I am working against the API. 

My questions are then #1. Does it make sense to redefine our comment partition
as beginning with a <!-- and ending after the last --> in a sequence of comments
and whitespace with no intervening XML_TAG partitions?  #2. Is is possible to
define such a partition with the existing rules framework?
Comment 2 John-Mason P. Shackelford CLA 2004-03-11 08:58:22 EST
I'll do this for M9.
Comment 3 John-Mason P. Shackelford CLA 2004-05-15 15:28:03 EDT
> Is is possible todefine such a partition with the existing rules framework?

It is possible to write a partition scanner this way as I learned in the fix for
bug 51215, unfortunately this isn't going to happen in time for 3.0
Comment 4 Denis Roy CLA 2009-08-30 02:15:27 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.