Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 58668 - Allow marking of parts of file that are not formatted after format (Ctrl+Shift+F) command
Allow marking of parts of file that are not formatted after format (Ctrl+Shif...
Status: RESOLVED WONTFIX
Product: editor
Classification: Unclassified
Component: Formatting & Indentation
5.x
All All
: P3 (vote)
: TBD
Assigned To: Dusan Balek
issues@editor
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-05-08 02:02 UTC by _ sandipchitale
Modified: 2016-07-07 07:28 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ sandipchitale 2005-05-08 02:02:34 UTC
This is along the lines of <pre></pre> tag of html. This is because sometimes 
I layout the gridbag layout constraints in a tabular from for easy reading. I 
can supply an example if required.

A fold with a special tag/attribute could be used for this.
Comment 1 Jiri Prox 2006-06-06 10:03:49 UTC
I'm afraid I don't understand it very well, can you provide some examples.
Comment 2 _ sandipchitale 2006-06-06 14:17:44 UTC
Here is an example:

Sometimes I have long lines of code (array initilization) which need to stay 
on same line for tabular view i.e. not wrap. To make maximum use of the 
visible part editor I do not want to indent those lines and I want to start 
them in the left margin like so:

public class Census {

    public long calculateAveragePopulation() {
//<--- left margin. code intentionally at the left margin
String[] states     = { "Alabama", "Arizona", "Alaska", ... 50 state names };
long[] populations  = { 237456293, 13762782,  4567820,  ... 50 populations };

    }
}

Now if I invoke the reformat command the two lines will get indented like this

public class Census {

    public long calculateAveragePopulation() {

        String[] states     = { "Alabama", "Arizona", "Alaska", ... 50 state 
names };
        long[] populations  = { 237456293, 13762782,  4567820,  ... 50 
populations };

    }
}
Granted this is a contrieved example. The point is that some times there is 
some intrinsic meaning that is conveyed by the layout of the code and I want 
to preserve it even if I reformat rest of code using "Format Code" action.

Makes sense?
Comment 3 Martin Balin 2016-07-07 07:28:44 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo