Title: Message
This would be nice, but I would only find such a feature useful if I had some ability to control where IDEA breaks lines, so that it fits into the coding conventions of the project I happen to be working on. For example, if I had a method invocation in a line that surpassed the maximum columns such as:
 
    MyObject myResult = (MyObject) myMethod(myParam1, myParam2, myParam3, myParam4);
 
If this line needs to be broken up so as to fit within my maximum column setting, my project's coding conventions might suggest any of the following ways to break up the line. I've used the "|" character to represent where my maximum column lines up. My apologies if this email comes across in a variable width font that screws up the formatting.
 
    MyObject myResult =                                              |
      (MyObject) myMethod(myParam1, myParam2, myParam3, myParam4);   |
                                                                     |
    MyObject myResult = (MyObject) myMethod(                         |
        myParam1, myParam2, myParam3, myParam4);                     |
                                                                     |
    MyObject myResult = (MyObject) myMethod(myParam1, myParam2,      |
        myParam3, myParam4);
 
Because I work on many different projects each with different coding conventions, I would only use automatic wrapping of long lines if I had the ability to configure the preferred place to break long lines. Options such as (a) before/after operator (b) before/after typecast (c) before method parameters, etc. would be helpful.
 
Of course I haven't thought about all the complexities that could result from this kind of layout option, so it may be incredibly hard to define all the options. I would perfectly understand if the IntelliJ developers decided it wasn't worth the effort. They should understand, however, that some of us would never use automatic line wrapping unless we had some control of how lines were wrapped.
 
- Tim
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Patrik Andersson
Sent: Thursday, January 17, 2002 12:44 PM
To: '[EMAIL PROTECTED]'
Subject: SV: [Eap-list] new Code Layout feature for Adriana

I would like to have the Code Layout feature also be able to arrange all code to keep inside
a certain column. Mostly column 80.
 
regards,
Patrik Andersson
-----Ursprungligt meddelande-----
Fr�n: Liu, Mike [mailto:[EMAIL PROTECTED]]
Skickat: den 17 januari 2002 19:21
Till: '[EMAIL PROTECTED]'
�mne: [Eap-list] new Code Layout feature for Adriana

Hi,

I was wondering if the following Code Layout feature can be considered for Adriana:

Original Code Snippet:
... ...

public void blah() throws com.yada.YadaException
{
        ... ... ...
}


After Code Layout:
... ...
import com.yada.YadaException;
... ...

public void blah() throws YadaException
{
        ... ... ...
}


Since it was known that Exception class is fully known as com.yada.YadaException, it should be fairly straight-forward for IDEA to auto-optimize the import statements as well.  What do you guys think?


Thanks,
Mike Liu


Reply via email to