On the other hand, IF the insertion point in fact CAN be determined unambigously, couldn't IDEA put it there? Ever since I started using IDEA, I never write import statements myself, so, at least in "new" projects, where ALL import statements are added by IDEA, it could theoretically always unambigously determine the insertion point. If not, just do what you do now: put it at the bottom of the correct block.
Best Regards. -Thomas > -----Original Message----- > From: Valentin Kipiatkov [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, December 19, 2001 2:26 AM > To: [EMAIL PROTECTED] > Subject: Re: [Eap-list] Import ordering broken? > > > Yes, actually import insertion does not respect alphabetical > ordering, only > the ordering in the Code Style options. The reason is that it > would not be > possible to unambigously choose the insertion point when > imports are not > intially ordered alphabetically. > The alphabetical sorting is performed by optimize imports only. > > Best regards, > Valentin Kipiatkov > ----------------------------------------------------------- > IntelliJ Software, http://www.intellij.com/ > "Develop with pleasure" > ----------------------------------------------------------- > > ----- Original Message ----- > From: "Erb" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, December 18, 2001 8:13 PM > Subject: Re: [Eap-list] Import ordering broken? > > > > OK, I found one scenario (using enclosed style), thopugh I > think this > > does not have to > > do with the style, as you will see. > > > > Create a new class, type a line that includes "JLabel", and > alt-enter to > > add the import. > > Then type a line using "JDialog", and include that import. It is > > included below the JLabel import. > > But Optimize Imports then alphabetizes them. I'll have to > see if I can > > find another case > > other than alphabetical order. > > > > > > Valentin Kipiatkov wrote: > > > > > I checked this and could not reproduce it. Could you > please provide some > way > > > to reproduce this? For example, send your code.style.xml > settings and a > > > small example when the imports are inserted in a wrong order. > > > > > > Best regards, > > > Valentin Kipiatkov > > > ----------------------------------------------------------- > > > IntelliJ Software, http://www.intellij.com/ > > > "Develop with pleasure" > > > ----------------------------------------------------------- > > > > > > ----- Original Message ----- > > > From: "Erb" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Friday, December 14, 2001 7:01 PM > > > Subject: Re: [Eap-list] Import ordering broken? > > > > > > > > > > > >>I have also noticed that the import rules are not > respected when IDEA > > >>auto-creates > > >>an import statement. I have often run Optimize Imports, > then added some > > >>code > > >>that caused imports to be inserted, then did Optimize > Imports again, and > > >> > > > the > > > > > >>imports changed their ordering. Perhaps Ariadna release > could address > > >> > > > this. > > > > > >>Marc Palmer wrote: > > >> > > >> > > >>>2.5 build #535 > > >>> > > >>>My imports don't seem to be obeying the import ordering > rules set out > in > > >>>IDE Options. The default settings too... Any others, > java, javax... I > > >>> > > > had > > > > > >>>a list like this: > > >>> > > >>>import org.... > > >>>import org.... > > >>>import org.... > > >>> > > >>>import java. > > >>> > > >>>import px.... > > >>> > > >>>...and a reformat / save did not fix it. I changed the > options in the > > >>> > > > IDE > > > > > >>>to use java, javax, then any others, and still no change > after reformat > > >>> > > > / > > > > > >>>save. > > >>> > > >>>Am I missing something? > > >>> > > >>>Cheers > > >>> > > >>> > > >>> > > >>>_______________________________________________ > > >>>Eap-list mailing list > > >>>[EMAIL PROTECTED] > > >>>http://www.intellij.com/mailman/listinfo/eap-list > > >>> > > >>> > > >>> > > >> > > >>-- > > >> > > >>Erb > > >> > > >>============================================================== > > >>"The only time I like in the morning is afternoon." > > >> - Russell D. Cooper > > >> > > >>"If you do everything, then you're all done." > > >> - Melissa F. Cooper > > >> > > >>"Most of you are familiar with the virtues of a programmer. > > >>There are three, of course: laziness, impatience, and hubris." > > >> - Larry Wall > > >>============================================================== > > >> > > >> > > >>_______________________________________________ > > >>Eap-list mailing list > > >>[EMAIL PROTECTED] > > >>http://www.intellij.com/mailman/listinfo/eap-list > > >> > > > > > > > > > _______________________________________________ > > > Eap-list mailing list > > > [EMAIL PROTECTED] > > > http://www.intellij.com/mailman/listinfo/eap-list > > > > > > > > > > > > -- > > > > Erb > > > > ============================================================== > > "The only time I like in the morning is afternoon." > > - Russell D. Cooper > > > > "If you do everything, then you're all done." > > - Melissa F. Cooper > > > > "Most of you are familiar with the virtues of a programmer. > > There are three, of course: laziness, impatience, and hubris." > > - Larry Wall > > ============================================================== > > > > > -------------------------------------------------------------- > -------------- > ---- > > > > <?xml version="1.0"?> > > > > <application> > > <component class="com.intellij.psi.codeStyle.CodeStyleManager"> > > <option name="LINE_SEPARATOR" value=" " /> > > <option name="INDENT_SIZE" value="4" /> > > <option name="CONTINUATION_INDENT_SIZE" value="2" /> > > <option name="KEEP_LINE_BREAKS" value="true" /> > > <option name="KEEP_FIRST_COLUMN_COMMENT" value="true" /> > > <option name="TAB_SIZE" value="4" /> > > <option name="USE_TAB_CHARACTER" value="false" /> > > <option name="KEEP_CONTROL_STATEMENT_IN_ONE_LINE" > value="true" /> > > <option name="BRACE_STYLE" value="1" /> > > <option name="CLASS_BRACE_STYLE" value="1" /> > > <option name="METHOD_BRACE_STYLE" value="1" /> > > <option name="ELSE_ON_NEW_LINE" value="true" /> > > <option name="WHILE_ON_NEW_LINE" value="false" /> > > <option name="CATCH_ON_NEW_LINE" value="true" /> > > <option name="FINALLY_ON_NEW_LINE" value="true" /> > > <option name="INDENT_CASE_FROM_SWITCH" value="true" /> > > <option name="SPECIAL_ELSE_IF_TREATMENT" value="true" /> > > <option name="ALIGN_MULTILINE_PARAMETERS" value="true" /> > > <option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" > value="false" /> > > <option name="ALIGN_MULTILINE_FOR" value="true" /> > > <option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="1" /> > > <option name="KEEP_BLANK_LINES_IN_CODE" value="2" /> > > <option name="BLANK_LINES_BEFORE_PACKAGE" value="1" /> > > <option name="BLANK_LINES_AFTER_PACKAGE" value="1" /> > > <option name="BLANK_LINES_BEFORE_IMPORTS" value="1" /> > > <option name="BLANK_LINES_AFTER_IMPORTS" value="1" /> > > <option name="BLANK_LINES_AROUND_CLASS" value="1" /> > > <option name="BLANK_LINES_AROUND_FIELD" value="0" /> > > <option name="BLANK_LINES_AROUND_METHOD" value="1" /> > > <option name="BLANK_LINES_AFTER_CLASS_HEADER" value="1" /> > > <option name="SPACE_AROUND_ASSIGNMENT_OPERATORS" value="true" /> > > <option name="SPACE_AROUND_LOGICAL_OPERATORS" value="true" /> > > <option name="SPACE_AROUND_EQUALITY_OPERATORS" value="true" /> > > <option name="SPACE_AROUND_RELATIONAL_OPERATORS" value="true" /> > > <option name="SPACE_AROUND_BITWISE_OPERATORS" value="true" /> > > <option name="SPACE_AROUND_ADDITIVE_OPERATORS" value="true" /> > > <option name="SPACE_AROUND_MULTIPLICATIVE_OPERATORS" > value="true" /> > > <option name="SPACE_AROUND_SHIFT_OPERATORS" value="true" /> > > <option name="SPACE_AFTER_COMMA" value="true" /> > > <option name="SPACE_BEFORE_COMMA" value="false" /> > > <option name="SPACE_AFTER_SEMICOLON" value="true" /> > > <option name="SPACE_BEFORE_SEMICOLON" value="false" /> > > <option name="SPACE_WITHIN_PARENTHESES" value="false" /> > > <option name="SPACE_WITHIN_METHOD_CALL_PARENTHESES" > value="false" /> > > <option name="SPACE_WITHIN_METHOD_PARENTHESES" value="false" /> > > <option name="SPACE_WITHIN_IF_PARENTHESES" value="false" /> > > <option name="SPACE_WITHIN_WHILE_PARENTHESES" value="false" /> > > <option name="SPACE_WITHIN_FOR_PARENTHESES" value="false" /> > > <option name="SPACE_WITHIN_CATCH_PARENTHESES" value="false" /> > > <option name="SPACE_WITHIN_SWITCH_PARENTHESES" value="false" /> > > <option name="SPACE_WITHIN_SYNCHRONIZED_PARENTHESES" > value="false" /> > > <option name="SPACE_WITHIN_CAST_PARENTHESES" value="false" /> > > <option name="SPACE_WITHIN_BRACKETS" value="false" /> > > <option name="SPACE_AFTER_TYPE_CAST" value="false" /> > > <option name="SPACE_BEFORE_METHOD_CALL_PARENTHESES" > value="false" /> > > <option name="SPACE_BEFORE_METHOD_PARENTHESES" value="false" /> > > <option name="SPACE_BEFORE_IF_PARENTHESES" value="true" /> > > <option name="SPACE_BEFORE_WHILE_PARENTHESES" value="false" /> > > <option name="SPACE_BEFORE_FOR_PARENTHESES" value="false" /> > > <option name="SPACE_BEFORE_CATCH_PARENTHESES" value="false" /> > > <option name="SPACE_BEFORE_SWITCH_PARENTHESES" value="false" /> > > <option name="SPACE_BEFORE_SYNCHRONIZED_PARENTHESES" > value="false" /> > > <option name="SPACE_BEFORE_CLASS_LBRACE" value="true" /> > > <option name="SPACE_BEFORE_METHOD_LBRACE" value="true" /> > > <option name="SPACE_BEFORE_IF_LBRACE" value="true" /> > > <option name="SPACE_BEFORE_ELSE_LBRACE" value="true" /> > > <option name="SPACE_BEFORE_WHILE_LBRACE" value="true" /> > > <option name="SPACE_BEFORE_FOR_LBRACE" value="true" /> > > <option name="SPACE_BEFORE_DO_LBRACE" value="true" /> > > <option name="SPACE_BEFORE_SWITCH_LBRACE" value="true" /> > > <option name="SPACE_BEFORE_TRY_LBRACE" value="true" /> > > <option name="SPACE_BEFORE_CATCH_LBRACE" value="true" /> > > <option name="SPACE_BEFORE_FINALLY_LBRACE" value="true" /> > > <option name="SPACE_BEFORE_SYNCHRONIZED_LBRACE" value="true" /> > > <option name="CLASS_TEMPLATE" value="/* * $NAME$ > $Revision: $ > $Date:$ * * Copyright, 2001 LN Holdings > Corporation. All Rights > Reserved. * Liquidnet Holdings, Inc. * > 498 Seventh Ave, New York, New York 10018 * * > UNPUBLISHED -- > Rights reserved under the copyright laws of * The > United States. Use > of a copyright notice is precautionary * only and does not imply > publication or disclosure. * * This documentation contains > proprietary and confidential * information of LN > Holdings Corporation. > use, disclosure, or * reproduction is prohibited > without the prior > express written * permission of LN Holdings > Corporation. * > * */ package $PACKAGE_NAME$; public class > $NAME$ { }" > /> > > <option name="ADJUST_CLASS_TEMPLATE" value="true" /> > > <option name="INTERFACE_TEMPLATE" value="/* * > $NAME$ $Revision: > $ $Date: $ * * Copyright, 2001 LN Holdings Corporation. All > Rights Reserved. * Liquidnet Holdings, > Inc. * > 498 Seventh Ave, New York, New York 10018 * * > UNPUBLISHED -- > Rights reserved under the copyright laws of * The > United States. Use > of a copyright notice is precautionary * only and does not imply > publication or disclosure. * * This documentation contains > proprietary and confidential * information of LN > Holdings Corporation. > use, disclosure, or * reproduction is prohibited > without the prior > express written * permission of LN Holdings > Corporation. * > * */ package $PACKAGE_NAME$; public interface $NAME$ > }" /> > > <option name="ADJUST_INTERFACE_TEMPLATE" value="true" /> > > <option name="FIELD_NAME_PREFIX" value="_" /> > > <option name="STATIC_FIELD_NAME_PREFIX" value="_" /> > > <option name="PARAMETER_NAME_PREFIX" value="" /> > > <option name="LOCAL_VARIABLE_NAME_PREFIX" value="" /> > > <option name="FIELD_TYPE_TO_NAME"> > > <value /> > > </option> > > <option name="STATIC_FIELD_TYPE_TO_NAME"> > > <value /> > > </option> > > <option name="PARAMETER_TYPE_TO_NAME"> > > <value> > > <pair type="int" name="i" /> > > <pair type="byte" name="b" /> > > <pair type="char" name="c" /> > > <pair type="long" name="l" /> > > <pair type="short" name="i" /> > > <pair type="boolean" name="b" /> > > <pair type="double" name="v" /> > > <pair type="float" name="v" /> > > <pair type="java.lang.Object" name="o" /> > > <pair type="java.lang.String" name="s" /> > > <pair type="*Exception" name="x" /> > > <pair type="*Event" name="event" /> > > </value> > > </option> > > <option name="LOCAL_VARIABLE_TYPE_TO_NAME"> > > <value> > > <pair type="int" name="i" /> > > <pair type="byte" name="b" /> > > <pair type="char" name="c" /> > > <pair type="long" name="l" /> > > <pair type="short" name="i" /> > > <pair type="boolean" name="b" /> > > <pair type="double" name="v" /> > > <pair type="float" name="v" /> > > <pair type="java.lang.Object" name="o" /> > > <pair type="java.lang.String" name="s" /> > > <pair type="*Event" name="event" /> > > </value> > > </option> > > <option name="USE_FQ_CLASS_NAMES" value="false" /> > > <option name="USE_SINGLE_CLASS_IMPORTS" value="true" /> > > <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="7" /> > > <option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND"> > > <value /> > > </option> > > <option name="IMPORT_LAYOUT_TABLE"> > > <value> > > <package name="java" withSubpackages="true" /> > > <emptyLine /> > > <package name="javax" withSubpackages="true" /> > > <emptyLine /> > > <package name="com.smartsockets" withSubpackages="true" /> > > <emptyLine /> > > <package name="junit" withSubpackages="true" /> > > <emptyLine /> > > <package name="com.liquidnet" withSubpackages="true" /> > > <emptyLine /> > > <package name="com.liquidnet.trader" > withSubpackages="true" /> > > <emptyLine /> > > <package name="com.liquidnet.trader.swing" > withSubpackages="true" > /> > > <emptyLine /> > > <package name="com.liquidnet.member" > withSubpackages="true" /> > > <emptyLine /> > > <package name="com.liquidnet.member.swing" > withSubpackages="true" > /> > > <emptyLine /> > > <package name="" withSubpackages="true" /> > > </value> > > </option> > > <option name="FIELDS_ORDER_WEIGHT" value="1" /> > > <option name="METHODS_ORDER_WEIGHT" value="3" /> > > <option name="CONSTRUCTORS_ORDER_WEIGHT" value="2" /> > > <option name="INNER_CLASSES_ORDER_WEIGHT" value="4" /> > > </component> > > </application> > > > > > > > _______________________________________________ > Eap-list mailing list > [EMAIL PROTECTED] > http://www.intellij.com/mailman/listinfo/eap-list > ************************************ If this email is not intended for you, or you are not responsible for the delivery of this message to the addressee, please note that this message may contain ITT Privileged/Proprietary Information. In such a case, you may not copy or deliver this message to anyone. You should destroy this message and kindly notify the sender by reply email. Information contained in this message that does not relate to the business of ITT is neither endorsed by nor attributable to ITT. ************************************ _______________________________________________ Eap-list mailing list [EMAIL PROTECTED] http://www.intellij.com/mailman/listinfo/eap-list
