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.

View | Details | Raw Unified | Return to bug 208503
Collapse All | Expand All

(-)a/java.source/apichanges.xml (+15 lines)
Lines 108-113 Link Here
108
    <!-- ACTUAL CHANGES BEGIN HERE: -->
108
    <!-- ACTUAL CHANGES BEGIN HERE: -->
109
109
110
    <changes>
110
    <changes>
111
        <change id="class-members-order">
112
             <api name="general"/>
113
             <summary>Added several methods to <code>CodeStyle</code> supporting customization of the generated class members order and other minor formatting enhancements.</summary>
114
             <version major="0" minor="96"/>
115
             <date day="16" month="2" year="2012"/>
116
             <author login="dbalek"/>
117
             <compatibility addition="yes" binary="compatible" deletion="no" deprecation="no" modification="no" semantic="compatible" source="compatible"/>
118
             <description>
119
                 Added <code>CodeStyle.getClassMemberGroups</code>, <code>CodeStyle.getClassMemberInsertionPoint</code>,
120
                 to support customization of the generated class members order, and <code>CodeStyle.wrapAfterDotInChainedMethodCalls</code>,
121
                 <code>CodeStyle.getBlankLinesAfterAnonymousClassHeader</code>, <code>CodeStyle.spaceAroundAnnotationValueAssignOps</code>
122
                 to support minor formatting enhancements.
123
             </description>
124
             <issue number="20672"/>
125
        </change>
111
        <change id="SourceUtils-backgroundScan">
126
        <change id="SourceUtils-backgroundScan">
112
             <api name="general"/>
127
             <api name="general"/>
113
             <summary>Added <code>SourceUtils.waitUserActionTask</code>.</summary>
128
             <summary>Added <code>SourceUtils.waitUserActionTask</code>.</summary>
(-)a/java.source/src/org/netbeans/api/java/source/CodeStyle.java (-3 / +180 lines)
Lines 46-60 Link Here
46
46
47
import java.util.Arrays;
47
import java.util.Arrays;
48
import java.util.Comparator;
48
import java.util.Comparator;
49
import java.util.EnumSet;
50
import java.util.Set;
49
import java.util.prefs.Preferences;
51
import java.util.prefs.Preferences;
52
53
import javax.lang.model.element.Element;
54
import javax.lang.model.element.ElementKind;
55
import javax.lang.model.element.Modifier;
50
import javax.swing.text.Document;
56
import javax.swing.text.Document;
57
58
import com.sun.source.tree.BlockTree;
59
import com.sun.source.tree.ClassTree;
60
import com.sun.source.tree.MethodTree;
61
import com.sun.source.tree.Tree;
62
import com.sun.source.tree.VariableTree;
63
51
import org.netbeans.api.project.Project;
64
import org.netbeans.api.project.Project;
52
import org.netbeans.modules.editor.indent.spi.CodeStylePreferences;
65
import org.netbeans.modules.editor.indent.spi.CodeStylePreferences;
53
import org.netbeans.modules.java.source.parsing.JavacParser;
66
import org.netbeans.modules.java.source.parsing.JavacParser;
54
import org.netbeans.modules.java.ui.FmtOptions;
67
import org.netbeans.modules.java.ui.FmtOptions;
55
68
import static org.netbeans.modules.java.ui.FmtOptions.*;
56
import org.openide.filesystems.FileObject;
69
import org.openide.filesystems.FileObject;
57
import static org.netbeans.modules.java.ui.FmtOptions.*;
58
70
59
/** 
71
/** 
60
 *  XXX make sure the getters get the defaults from somewhere
72
 *  XXX make sure the getters get the defaults from somewhere
Lines 239-245 Link Here
239
    }
251
    }
240
252
241
    public boolean makeParametersFinal() {
253
    public boolean makeParametersFinal() {
242
        return preferences.getBoolean(makeParametersFinal, getDefaultAsBoolean(useFQNs));
254
        return preferences.getBoolean(makeParametersFinal, getDefaultAsBoolean(makeParametersFinal));
255
    }
256
257
    /**
258
     * Returns an information about the desired grouping of class members.
259
     * @since 0.96
260
     */
261
    public MemberGroups getClassMemberGroups() {
262
        return new MemberGroups(preferences.get(classMembersOrder, getDefaultAsString(classMembersOrder)),
263
                preferences.getBoolean(sortMembersByVisibility, getDefaultAsBoolean(sortMembersByVisibility))
264
                ? preferences.get(visibilityOrder, getDefaultAsString(visibilityOrder)) : null);
265
    }
266
    
267
    /**
268
     * Returns an information about the desired insertion point of a new class member.
269
     * @since 0.96
270
     */
271
    public InsertionPoint getClassMemberInsertionPoint() {
272
        String point = preferences.get(classMemberInsertionPoint, getDefaultAsString(classMemberInsertionPoint));
273
        return InsertionPoint.valueOf(point);
243
    }
274
    }
244
275
245
    // Alignment and braces ----------------------------------------------------
276
    // Alignment and braces ----------------------------------------------------
Lines 400-405 Link Here
400
        return WrapStyle.valueOf(wrap);
431
        return WrapStyle.valueOf(wrap);
401
    }
432
    }
402
433
434
    public boolean wrapAfterDotInChainedMethodCalls() {
435
        return preferences.getBoolean(wrapAfterDotInChainedMethodCalls, getDefaultAsBoolean(wrapAfterDotInChainedMethodCalls));
436
    }
437
403
    public WrapStyle wrapArrayInit() {
438
    public WrapStyle wrapArrayInit() {
404
        String wrap = preferences.get(wrapArrayInit, getDefaultAsString(wrapArrayInit));
439
        String wrap = preferences.get(wrapArrayInit, getDefaultAsString(wrapArrayInit));
405
        return WrapStyle.valueOf(wrap);
440
        return WrapStyle.valueOf(wrap);
Lines 511-516 Link Here
511
        return preferences.getInt(blankLinesAfterClassHeader, getDefaultAsInt(blankLinesAfterClassHeader));
546
        return preferences.getInt(blankLinesAfterClassHeader, getDefaultAsInt(blankLinesAfterClassHeader));
512
    }
547
    }
513
548
549
    public int getBlankLinesAfterAnonymousClassHeader() {
550
        return preferences.getInt(blankLinesAfterAnonymousClassHeader, getDefaultAsInt(blankLinesAfterAnonymousClassHeader));
551
    }
552
514
    public int getBlankLinesBeforeFields() {
553
    public int getBlankLinesBeforeFields() {
515
        return preferences.getInt(blankLinesBeforeFields, getDefaultAsInt(blankLinesBeforeFields));
554
        return preferences.getInt(blankLinesBeforeFields, getDefaultAsInt(blankLinesBeforeFields));
516
    }
555
    }
Lines 604-609 Link Here
604
        return preferences.getBoolean(spaceAroundAssignOps, getDefaultAsBoolean(spaceAroundAssignOps));
643
        return preferences.getBoolean(spaceAroundAssignOps, getDefaultAsBoolean(spaceAroundAssignOps));
605
    }
644
    }
606
645
646
    public boolean spaceAroundAnnotationValueAssignOps() {
647
        return preferences.getBoolean(spaceAroundAnnotationValueAssignOps, getDefaultAsBoolean(spaceAroundAnnotationValueAssignOps));
648
    }
649
607
    public boolean spaceBeforeClassDeclLeftBrace() {
650
    public boolean spaceBeforeClassDeclLeftBrace() {
608
        return preferences.getBoolean(spaceBeforeClassDeclLeftBrace, getDefaultAsBoolean(spaceBeforeClassDeclLeftBrace));
651
        return preferences.getBoolean(spaceBeforeClassDeclLeftBrace, getDefaultAsBoolean(spaceBeforeClassDeclLeftBrace));
609
    }
652
    }
Lines 896-901 Link Here
896
        WRAP_NEVER
939
        WRAP_NEVER
897
    }
940
    }
898
    
941
    
942
    public enum InsertionPoint {
943
        LAST_IN_CATEGORY,
944
        FIRST_IN_CATEGORY,
945
        CARET_LOCATION
946
    }
947
    
899
    /**
948
    /**
900
     * Provides an information about the desired grouping of import statements,
949
     * Provides an information about the desired grouping of import statements,
901
     * including group order.
950
     * including group order.
Lines 971-976 Link Here
971
        }
1020
        }
972
    }
1021
    }
973
1022
1023
    /**
1024
     * Provides an information about the desired grouping of class members,
1025
     * including group order.
1026
     * @since 0.96
1027
     */
1028
    public static final class MemberGroups {
1029
1030
        private Info[] infos;
1031
1032
        private MemberGroups(String groups, String visibility) {
1033
            if (groups == null || groups.length() == 0) {
1034
                this.infos = new Info[0];
1035
            } else {
1036
                String[] order = groups.trim().split("\\s*[,;]\\s*"); //NOI18N
1037
                String[] visibilityOrder = visibility != null ? visibility.trim().split("\\s*[,;]\\s*") : new String[1]; //NOI18N
1038
                this.infos = new Info[order.length * visibilityOrder.length];
1039
                for (int i = 0; i < order.length; i++) {
1040
                    String o = order[i];
1041
                    boolean isStatic = false;
1042
                    if (o.startsWith("STATIC ")) { //NOI18N
1043
                        isStatic = true;
1044
                        o = o.substring(7);
1045
                    }
1046
                    ElementKind kind = ElementKind.valueOf(o);
1047
                    for (int j = 0; j < visibilityOrder.length; j++) {
1048
                        int idx = i * visibilityOrder.length + j;
1049
                        String vo = visibilityOrder[j];
1050
                        Info info = new Info(idx);
1051
                        info.ignoreVisibility = vo == null || !"DEFAULT".equals(vo); //NOI18N
1052
                        info.mods = vo != null && !"DEFAULT".equals(vo) ? EnumSet.of(Modifier.valueOf(vo)) : EnumSet.noneOf(Modifier.class); //NOI18N
1053
                        if (isStatic)
1054
                            info.mods.add(Modifier.STATIC);
1055
                        info.kind = kind;
1056
                        this.infos[idx] = info;                        
1057
                    }
1058
                }
1059
            }
1060
        }
1061
1062
        /**
1063
         * Returns the group number of the class member. Elements with the same
1064
         * number form a group. Groups with lower numbers should be positioned
1065
         * higher in the class member list.
1066
         * @param tree the member tree
1067
         * @return the group number
1068
         * @since 0.96
1069
         */
1070
        public int getGroupId(Tree tree) {
1071
            for (Info info : infos) {
1072
                ElementKind kind = ElementKind.OTHER;
1073
                Set<Modifier> modifiers = null;
1074
                switch (tree.getKind()) {
1075
                    case ANNOTATION_TYPE:
1076
                    case CLASS:
1077
                    case ENUM:
1078
                    case INTERFACE:
1079
                        kind = ElementKind.CLASS;
1080
                        modifiers = ((ClassTree)tree).getModifiers().getFlags();
1081
                        break;
1082
                    case METHOD:
1083
                        MethodTree mt = (MethodTree)tree;
1084
                        if (mt.getName().contentEquals("<init>")) { //NOI18N
1085
                            kind = ElementKind.CONSTRUCTOR;
1086
                        } else {
1087
                            kind = ElementKind.METHOD;
1088
                        }
1089
                        modifiers = mt.getModifiers().getFlags();
1090
                        break;
1091
                    case VARIABLE:
1092
                        kind = ElementKind.FIELD;
1093
                        modifiers = ((VariableTree)tree).getModifiers().getFlags();
1094
                        break;
1095
                    case BLOCK:
1096
                        kind = ((BlockTree)tree).isStatic() ? ElementKind.STATIC_INIT : ElementKind.INSTANCE_INIT;
1097
                        break;
1098
                }
1099
                if (info.check(kind, modifiers))
1100
                    return info.groupId;
1101
            }
1102
            return infos.length;
1103
        }
1104
1105
        /**
1106
         * Returns the group number of the class member. Elements with the same
1107
         * number form a group. Groups with lower numbers should be positioned
1108
         * higher in the class member list.
1109
         * @param element the member element
1110
         * @return the group number
1111
         * @since 0.96
1112
         */
1113
        public int getGroupId(Element element) {
1114
            for (Info info : infos) {
1115
                ElementKind kind = element.getKind();
1116
                if (kind == ElementKind.ANNOTATION_TYPE || kind == ElementKind.ENUM || kind == ElementKind.INSTANCE_INIT)
1117
                    kind = ElementKind.CLASS;
1118
                if (info.check(kind, element.getModifiers()));
1119
                    return info.groupId;
1120
            }
1121
            return infos.length;
1122
        }
1123
1124
        private static final class Info {
1125
1126
            private int groupId;
1127
            private boolean ignoreVisibility;
1128
            private Set<Modifier> mods;
1129
            private ElementKind kind;
1130
            
1131
            private Info(int id) {
1132
                this.groupId = id;
1133
            }
1134
1135
            private boolean check(ElementKind kind, Set<Modifier> modifiers) {
1136
                if (this.kind != kind)
1137
                    return false;
1138
                if (modifiers == null)
1139
                    return true;
1140
                if (!modifiers.containsAll(this.mods))
1141
                    return false;
1142
                if (ignoreVisibility)
1143
                    return true;
1144
                EnumSet<Modifier> copy = EnumSet.copyOf(modifiers);
1145
                copy.retainAll(EnumSet.of(Modifier.PUBLIC, Modifier.PRIVATE, Modifier.PROTECTED)); 
1146
                return copy.isEmpty();
1147
            }
1148
        }
1149
    }
1150
974
    // Communication with non public packages ----------------------------------
1151
    // Communication with non public packages ----------------------------------
975
    
1152
    
976
    private static class Producer implements FmtOptions.CodeStyleProducer {
1153
    private static class Producer implements FmtOptions.CodeStyleProducer {
(-)a/java.source/src/org/netbeans/api/java/source/GeneratorUtilities.java (-47 / +27 lines)
Lines 111-119 Link Here
111
import javax.lang.model.type.TypeVariable;
111
import javax.lang.model.type.TypeVariable;
112
import javax.lang.model.type.WildcardType;
112
import javax.lang.model.type.WildcardType;
113
import javax.lang.model.util.Elements;
113
import javax.lang.model.util.Elements;
114
import javax.lang.model.util.Types;
115
import javax.swing.text.Document;
114
import javax.swing.text.Document;
115
import javax.swing.text.JTextComponent;
116
116
117
import org.netbeans.api.editor.EditorRegistry;
117
import org.netbeans.api.java.lexer.JavaTokenId;
118
import org.netbeans.api.java.lexer.JavaTokenId;
118
import org.netbeans.api.lexer.TokenSequence;
119
import org.netbeans.api.lexer.TokenSequence;
119
import org.netbeans.editor.GuardedDocument;
120
import org.netbeans.editor.GuardedDocument;
Lines 162-193 Link Here
162
    public ClassTree insertClassMember(ClassTree clazz, Tree member) {
163
    public ClassTree insertClassMember(ClassTree clazz, Tree member) {
163
        assert clazz != null && member != null;
164
        assert clazz != null && member != null;
164
        int idx = 0;
165
        int idx = 0;
165
        GuardedDocument gdoc = null;
166
        Document doc = null;
166
        SourcePositions sp = null;
167
        int caretPos = -1;
167
        try {
168
        try {
168
            Document doc = copy.getDocument();
169
            doc = copy.getDocument();
169
            if (doc == null) {
170
            if (doc == null) {
170
                DataObject data = DataObject.find(copy.getFileObject());
171
                DataObject data = DataObject.find(copy.getFileObject());
171
                EditorCookie cookie = data.getCookie(EditorCookie.class);
172
                EditorCookie cookie = data.getCookie(EditorCookie.class);
172
                doc = cookie.openDocument();
173
                doc = cookie.openDocument();
173
            }
174
            }
174
175
            if (doc != null && doc instanceof GuardedDocument) {
176
                gdoc = (GuardedDocument)doc;
177
                sp = copy.getTrees().getSourcePositions();
178
            }
179
        } catch (IOException ioe) {}
175
        } catch (IOException ioe) {}
176
        CodeStyle codeStyle = DiffContext.getCodeStyle(copy);
177
        if (codeStyle.getClassMemberInsertionPoint() == CodeStyle.InsertionPoint.CARET_LOCATION) {
178
            JTextComponent jtc = EditorRegistry.lastFocusedComponent();
179
            if (jtc.getDocument() == doc)
180
                caretPos = jtc.getCaretPosition();
181
        }
182
        ClassMemberComparator comparator = caretPos < 0 ? new ClassMemberComparator(codeStyle) : null;
183
        SourcePositions sp = copy.getTrees().getSourcePositions();
180
        TreeUtilities utils = copy.getTreeUtilities();
184
        TreeUtilities utils = copy.getTreeUtilities();
181
        CompilationUnitTree compilationUnit = copy.getCompilationUnit();
185
        CompilationUnitTree compilationUnit = copy.getCompilationUnit();
182
        Tree lastMember = null;
186
        Tree lastMember = null;
183
        for (Tree tree : clazz.getMembers()) {
187
        for (Tree tree : clazz.getMembers()) {
184
            TreePath path = TreePath.getPath(compilationUnit, tree);
188
            TreePath path = TreePath.getPath(compilationUnit, tree);
185
            if ((path == null || !utils.isSynthetic(path)) && CLASS_MEMBER_COMPARATOR.compare(member, tree) < 0) {
189
            if ((path == null || !utils.isSynthetic(path)) && (caretPos < 0
186
                if (gdoc == null)
190
                    && (codeStyle.getClassMemberInsertionPoint() == CodeStyle.InsertionPoint.FIRST_IN_CATEGORY && comparator.compare(member, tree) <= 0
191
                    || comparator.compare(member, tree) < 0) || caretPos >= 0 && caretPos < sp.getStartPosition(compilationUnit, tree))) {
192
                if (doc == null || !(doc instanceof GuardedDocument))
187
                    break;
193
                    break;
188
                int pos = (int)(lastMember != null ? sp.getEndPosition(compilationUnit, lastMember) : sp.getStartPosition( compilationUnit,clazz));
194
                int pos = (int)(lastMember != null ? sp.getEndPosition(compilationUnit, lastMember) : sp.getStartPosition( compilationUnit,clazz));
189
                pos = gdoc.getGuardedBlockChain().adjustToBlockEnd(pos);
195
                pos = ((GuardedDocument)doc).getGuardedBlockChain().adjustToBlockEnd(pos);
190
                if (pos <= sp.getStartPosition(compilationUnit, tree))
196
                long treePos = sp.getStartPosition(compilationUnit, tree);
197
                if (treePos < 0 || pos <= treePos)
191
                    break;
198
                    break;
192
            }
199
            }
193
            idx++;
200
            idx++;
Lines 1015-1061 Link Here
1015
1022
1016
    private static class ClassMemberComparator implements Comparator<Tree> {
1023
    private static class ClassMemberComparator implements Comparator<Tree> {
1017
1024
1025
        private CodeStyle.MemberGroups groups;
1026
1027
        public ClassMemberComparator(CodeStyle cs) {
1028
            this.groups = cs.getClassMemberGroups();
1029
        }
1030
1018
        @Override
1031
        @Override
1019
        public int compare(Tree tree1, Tree tree2) {
1032
        public int compare(Tree tree1, Tree tree2) {
1020
            if (tree1 == tree2)
1033
            if (tree1 == tree2)
1021
                return 0;
1034
                return 0;
1022
            return getSortPriority(tree1) - getSortPriority(tree2);
1035
            return groups.getGroupId(tree1) - groups.getGroupId(tree2);
1023
        }
1024
1025
        private static int getSortPriority(Tree tree) {
1026
            int ret = 0;
1027
            ModifiersTree modifiers = null;
1028
            switch (tree.getKind()) {
1029
            case ANNOTATION_TYPE:
1030
            case CLASS:
1031
            case ENUM:
1032
            case INTERFACE:
1033
                ret = 4000;
1034
                modifiers = ((ClassTree)tree).getModifiers();
1035
                break;
1036
            case METHOD:
1037
                MethodTree mt = (MethodTree)tree;
1038
                if (mt.getName().contentEquals("<init>"))
1039
                    ret = 200;
1040
                else
1041
                    ret = 300;
1042
                modifiers = mt.getModifiers();
1043
                break;
1044
            case VARIABLE:
1045
                ret = 100;
1046
                modifiers = ((VariableTree)tree).getModifiers();
1047
                break;
1048
            }
1049
            if (modifiers != null) {
1050
                if (!modifiers.getFlags().contains(Modifier.STATIC))
1051
                    ret += 1000;
1052
            }
1053
            return ret;
1054
        }
1036
        }
1055
    }
1037
    }
1056
    
1038
    
1057
    private static ClassMemberComparator CLASS_MEMBER_COMPARATOR = new ClassMemberComparator();
1058
1059
    private static class ImportsComparator implements Comparator<Object> {
1039
    private static class ImportsComparator implements Comparator<Object> {
1060
1040
1061
        private CodeStyle.ImportGroups groups;
1041
        private CodeStyle.ImportGroups groups;
(-)a/java.source/src/org/netbeans/modules/java/source/pretty/VeryPretty.java (-5 / +10 lines)
Lines 124-129 Link Here
124
    private int fromOffset = -1;
124
    private int fromOffset = -1;
125
    private int toOffset = -1;
125
    private int toOffset = -1;
126
    private boolean containsError = false;
126
    private boolean containsError = false;
127
    private boolean insideAnnotation = false;
127
128
128
    private final Map<Tree, ?> tree2Tag;
129
    private final Map<Tree, ?> tree2Tag;
129
    private final Map<Object, int[]> tag2Span;
130
    private final Map<Object, int[]> tag2Span;
Lines 672-678 Link Here
672
            }
673
            }
673
        }
674
        }
674
	if (!emptyClass) {
675
	if (!emptyClass) {
675
	    blankLines(cs.getBlankLinesAfterClassHeader());
676
	    blankLines(enclClassName.isEmpty() ? cs.getBlankLinesAfterAnonymousClassHeader() : cs.getBlankLinesAfterClassHeader());
676
            if ((tree.mods.flags & ENUM) != 0) {
677
            if ((tree.mods.flags & ENUM) != 0) {
677
                printEnumConstants(tree.defs, false);
678
                printEnumConstants(tree.defs, false);
678
            }
679
            }
Lines 1356-1369 Link Here
1356
    public void visitAssign(JCAssign tree) {
1357
    public void visitAssign(JCAssign tree) {
1357
        int col = out.col;
1358
        int col = out.col;
1358
	printExpr(tree.lhs, TreeInfo.assignPrec + 1);
1359
	printExpr(tree.lhs, TreeInfo.assignPrec + 1);
1359
	if (cs.spaceAroundAssignOps())
1360
        boolean spaceAroundAssignOps = cs.spaceAroundAssignOps();
1361
	if (spaceAroundAssignOps)
1360
            print(' ');
1362
            print(' ');
1361
	print('=');
1363
	print('=');
1362
	int rm = cs.getRightMargin();
1364
	int rm = cs.getRightMargin();
1363
        switch(cs.wrapAssignOps()) {
1365
        switch(cs.wrapAssignOps()) {
1364
        case WRAP_IF_LONG:
1366
        case WRAP_IF_LONG:
1365
            if (widthEstimator.estimateWidth(tree.rhs, rm - out.col) + out.col <= cs.getRightMargin()) {
1367
            if (widthEstimator.estimateWidth(tree.rhs, rm - out.col) + out.col <= cs.getRightMargin()) {
1366
                if(cs.spaceAroundAssignOps())
1368
                if(spaceAroundAssignOps)
1367
                    print(' ');
1369
                    print(' ');
1368
                break;
1370
                break;
1369
            }
1371
            }
Lines 1372-1378 Link Here
1372
            toColExactly(cs.alignMultilineAssignment() ? col : out.leftMargin + cs.getContinuationIndentSize());
1374
            toColExactly(cs.alignMultilineAssignment() ? col : out.leftMargin + cs.getContinuationIndentSize());
1373
            break;
1375
            break;
1374
        case WRAP_NEVER:
1376
        case WRAP_NEVER:
1375
            if(cs.spaceAroundAssignOps())
1377
            if(spaceAroundAssignOps)
1376
                print(' ');
1378
                print(' ');
1377
            break;
1379
            break;
1378
        }
1380
        }
Lines 1622-1627 Link Here
1622
1624
1623
    @Override
1625
    @Override
1624
    public void visitAnnotation(JCAnnotation tree) {
1626
    public void visitAnnotation(JCAnnotation tree) {
1627
        boolean oldInsideAnnotation = insideAnnotation;
1628
        insideAnnotation = true;
1625
        if (!printAnnotationsFormatted(List.of(tree))) {
1629
        if (!printAnnotationsFormatted(List.of(tree))) {
1626
            print("@");
1630
            print("@");
1627
            printExpr(tree.annotationType);
1631
            printExpr(tree.annotationType);
Lines 1633-1638 Link Here
1633
                print(cs.spaceWithinAnnotationParens() ? " )" : ")");
1637
                print(cs.spaceWithinAnnotationParens() ? " )" : ")");
1634
            }
1638
            }
1635
        }
1639
        }
1640
        insideAnnotation = oldInsideAnnotation;
1636
    }
1641
    }
1637
1642
1638
    @Override
1643
    @Override
Lines 2142-2148 Link Here
2142
            printEmptyBlockComments(tree, members);
2147
            printEmptyBlockComments(tree, members);
2143
        } else {
2148
        } else {
2144
            if (members)
2149
            if (members)
2145
                blankLines(cs.getBlankLinesAfterClassHeader());
2150
                blankLines(enclClassName.isEmpty() ? cs.getBlankLinesAfterAnonymousClassHeader() : cs.getBlankLinesAfterClassHeader());
2146
            else
2151
            else
2147
                newline();
2152
                newline();
2148
	    printStats(stats, members);
2153
	    printStats(stats, members);
(-)a/java.source/src/org/netbeans/modules/java/source/resources/layer.xml (-4 / +2 lines)
Lines 215-227 Link Here
215
                          <attr name="instanceCreate" methodvalue="org.netbeans.modules.java.ui.FmtImports.getController"/>
215
                          <attr name="instanceCreate" methodvalue="org.netbeans.modules.java.ui.FmtImports.getController"/>
216
                          <attr name="position" intvalue="800"/>
216
                          <attr name="position" intvalue="800"/>
217
                      </file>
217
                      </file>
218
<!--
219
                      <file name="CodeGeneration.instance">
218
                      <file name="CodeGeneration.instance">
220
                          <attr name="instanceOf" stringvalue="org.netbeans.spi.options.OptionsPanelController"/>
219
                          <attr name="instanceOf" stringvalue="org.netbeans.modules.options.editor.spi.PreferencesCustomizer$Factory"/>
221
                          <attr name="instanceCreate" methodvalue="org.netbeans.modules.java.ui.FmtCodeGeneration.getController"/>
220
                          <attr name="instanceCreate" methodvalue="org.netbeans.modules.java.ui.FmtCodeGeneration.getController"/>
222
                          <attr name="position" intvalue="700"/>
221
                          <attr name="position" intvalue="900"/>
223
                      </file>
222
                      </file>
224
-->
225
                  </folder>
223
                  </folder>
226
              </folder>
224
              </folder>
227
          </folder>
225
          </folder>
(-)a/java.source/src/org/netbeans/modules/java/source/save/CasualDiff.java (-3 / +4 lines)
Lines 1503-1509 Link Here
1503
        return bounds[1];
1503
        return bounds[1];
1504
    }
1504
    }
1505
1505
1506
    protected int diffAssign(JCAssign oldT, JCAssign newT, int[] bounds) {
1506
    protected int diffAssign(JCAssign oldT, JCAssign newT, JCTree parent, int[] bounds) {
1507
        int localPointer = bounds[0];
1507
        int localPointer = bounds[0];
1508
        // lhs
1508
        // lhs
1509
        int[] lhsBounds = getBounds(oldT.lhs);
1509
        int[] lhsBounds = getBounds(oldT.lhs);
Lines 1518-1524 Link Here
1518
            tokenSequence.move(rhsBounds[0]);
1518
            tokenSequence.move(rhsBounds[0]);
1519
            moveToSrcRelevant(tokenSequence, Direction.BACKWARD);
1519
            moveToSrcRelevant(tokenSequence, Direction.BACKWARD);
1520
            if (tokenSequence.token().id() != JavaTokenId.EQ) {
1520
            if (tokenSequence.token().id() != JavaTokenId.EQ) {
1521
                if (diffContext.style.spaceAroundAssignOps())
1521
                boolean spaceAroundAssignOps = parent.getKind() == Kind.ANNOTATION ? diffContext.style.spaceAroundAnnotationValueAssignOps() : diffContext.style.spaceAroundAssignOps();
1522
                if (spaceAroundAssignOps)
1522
                    printer.print(" = ");
1523
                    printer.print(" = ");
1523
                else
1524
                else
1524
                    printer.print("=");
1525
                    printer.print("=");
Lines 3307-3313 Link Here
3307
              retVal = diffParens((JCParens)oldT, (JCParens)newT, elementBounds);
3308
              retVal = diffParens((JCParens)oldT, (JCParens)newT, elementBounds);
3308
              break;
3309
              break;
3309
          case JCTree.ASSIGN:
3310
          case JCTree.ASSIGN:
3310
              retVal = diffAssign((JCAssign)oldT, (JCAssign)newT, elementBounds);
3311
              retVal = diffAssign((JCAssign)oldT, (JCAssign)newT, parent, elementBounds);
3311
              break;
3312
              break;
3312
          case JCTree.TYPECAST:
3313
          case JCTree.TYPECAST:
3313
              retVal = diffTypeCast((JCTypeCast)oldT, (JCTypeCast)newT, elementBounds);
3314
              retVal = diffTypeCast((JCTypeCast)oldT, (JCTypeCast)newT, elementBounds);
(-)a/java.source/src/org/netbeans/modules/java/source/save/Reformatter.java (-59 / +103 lines)
Lines 54-59 Link Here
54
import org.netbeans.api.java.platform.JavaPlatformManager;
54
import org.netbeans.api.java.platform.JavaPlatformManager;
55
import static org.netbeans.api.java.lexer.JavaTokenId.*;
55
import static org.netbeans.api.java.lexer.JavaTokenId.*;
56
import org.netbeans.api.java.source.*;
56
import org.netbeans.api.java.source.*;
57
import org.netbeans.api.java.source.CodeStyle.WrapStyle;
57
import org.netbeans.api.lexer.Token;
58
import org.netbeans.api.lexer.Token;
58
import org.netbeans.api.lexer.TokenHierarchy;
59
import org.netbeans.api.lexer.TokenHierarchy;
59
import org.netbeans.api.lexer.TokenSequence;
60
import org.netbeans.api.lexer.TokenSequence;
Lines 136-142 Link Here
136
                return;
137
                return;
137
            }
138
            }
138
        }
139
        }
139
        CodeStyle cs = CodeStyle.getDefault(doc);
140
        CodeStyle cs = (CodeStyle) doc.getProperty(CodeStyle.class);
141
        if (cs == null)
142
            cs = CodeStyle.getDefault(doc);
140
        List<Context.Region> indentRegions = context.indentRegions();
143
        List<Context.Region> indentRegions = context.indentRegions();
141
        Collections.reverse(indentRegions);
144
        Collections.reverse(indentRegions);
142
        for (Context.Region region : indentRegions)
145
        for (Context.Region region : indentRegions)
Lines 426-431 Link Here
426
        private int tpLevel;
429
        private int tpLevel;
427
        private boolean eof = false;
430
        private boolean eof = false;
428
        private boolean bof = false;
431
        private boolean bof = false;
432
        private boolean insideAnnotation = false;
429
433
430
        private Pretty(CompilationInfo info, TreePath path, CodeStyle cs, int startOffset, int endOffset, boolean templateEdit) {
434
        private Pretty(CompilationInfo info, TreePath path, CodeStyle cs, int startOffset, int endOffset, boolean templateEdit) {
431
            this(info.getText(), info.getTokenHierarchy().tokenSequence(JavaTokenId.language()),
435
            this(info.getText(), info.getTokenHierarchy().tokenSequence(JavaTokenId.language()),
Lines 727-733 Link Here
727
            } else {
731
            } else {
728
                if (!cs.indentTopLevelClassMembers())
732
                if (!cs.indentTopLevelClassMembers())
729
                    indent = old;
733
                    indent = old;
730
                blankLines(cs.getBlankLinesAfterClassHeader());
734
                blankLines(node.getSimpleName().length() == 0 ? cs.getBlankLinesAfterAnonymousClassHeader() : cs.getBlankLinesAfterClassHeader());
731
                JavaTokenId id = null;
735
                JavaTokenId id = null;
732
                boolean first = true;
736
                boolean first = true;
733
                boolean semiRead = false;
737
                boolean semiRead = false;
Lines 1120-1126 Link Here
1120
            accept(LPAREN);
1124
            accept(LPAREN);
1121
            if (args != null && !args.isEmpty()) {
1125
            if (args != null && !args.isEmpty()) {
1122
                spaces(cs.spaceWithinAnnotationParens() ? 1 : 0);
1126
                spaces(cs.spaceWithinAnnotationParens() ? 1 : 0);
1127
                boolean oldInsideAnnotation = insideAnnotation;
1128
                insideAnnotation = true;
1123
                wrapList(cs.wrapAnnotationArgs(), cs.alignMultilineAnnotationArgs(), false, COMMA, args);
1129
                wrapList(cs.wrapAnnotationArgs(), cs.alignMultilineAnnotationArgs(), false, COMMA, args);
1130
                insideAnnotation = oldInsideAnnotation;
1124
                spaces(cs.spaceWithinAnnotationParens() ? 1 : 0);
1131
                spaces(cs.spaceWithinAnnotationParens() ? 1 : 0);
1125
            }
1132
            }
1126
            accept(RPAREN);
1133
            accept(RPAREN);
Lines 1453-1513 Link Here
1453
            if (ms.getKind() == Tree.Kind.MEMBER_SELECT) {
1460
            if (ms.getKind() == Tree.Kind.MEMBER_SELECT) {
1454
                ExpressionTree exp = ((MemberSelectTree)ms).getExpression();
1461
                ExpressionTree exp = ((MemberSelectTree)ms).getExpression();
1455
                scan(exp, p);
1462
                scan(exp, p);
1456
                accept(DOT);
1463
                WrapStyle wrapStyle = cs.wrapChainedMethodCalls();
1457
                List<? extends Tree> targs = node.getTypeArguments();
1464
                if (wrapStyle == WrapStyle.WRAP_ALWAYS && exp.getKind() != Tree.Kind.METHOD_INVOCATION)
1458
                if (targs != null && !targs.isEmpty()) {
1465
                    wrapStyle = WrapStyle.WRAP_IF_LONG;
1459
                    if (LT == accept(LT))
1466
                switch (wrapStyle) {
1460
                        tpLevel++;
1467
                    case WRAP_ALWAYS:
1461
                    for (Iterator<? extends Tree> it = targs.iterator(); it.hasNext();) {
1468
                        if (cs.wrapAfterDotInChainedMethodCalls()) {
1462
                        Tree targ = it.next();
1469
                            accept(DOT);
1463
                        scan(targ, p);
1470
                            newline();
1464
                        if (it.hasNext()) {
1471
                        } else {
1465
                            spaces(cs.spaceBeforeComma() ? 1 : 0);
1472
                            newline();
1466
                            accept(COMMA);
1473
                            accept(DOT);
1467
                            spaces(cs.spaceAfterComma() ? 1 : 0);
1468
                        }
1474
                        }
1469
                    }
1475
                        scanMethodCall(node);
1470
                    JavaTokenId accepted;
1476
                        break;
1471
                    if (tpLevel > 0 && (accepted = accept(GT, GTGT, GTGTGT)) != null) {
1477
                    case WRAP_IF_LONG:
1472
                        switch (accepted) {
1478
                        int index = tokens.index();
1473
                            case GTGTGT:
1479
                        int c = col;
1474
                                tpLevel -= 3;
1480
                        Diff d = diffs.isEmpty() ? null : diffs.getFirst();
1475
                                break;
1481
                        boolean oldCheckWrap = checkWrap;
1476
                            case GTGT:
1482
                        checkWrap = true;
1477
                                tpLevel -= 2;
1483
                        try {
1478
                                break;
1484
                            accept(DOT);
1479
                            case GT:
1485
                            scanMethodCall(node);
1480
                                tpLevel--;
1486
                        } catch (WrapAbort wa) {
1481
                                break;
1487
                        } finally {
1488
                            checkWrap = oldCheckWrap;
1482
                        }
1489
                        }
1483
                    }
1490
                        if (col > rightMargin) {
1484
                }
1491
                            rollback(index, c, d);
1485
                CodeStyle.WrapStyle wrapStyle = cs.wrapChainedMethodCalls();
1492
                            if (cs.wrapAfterDotInChainedMethodCalls()) {
1486
                if(exp.getKind() == Tree.Kind.METHOD_INVOCATION) {
1493
                                accept(DOT);
1487
                    wrapToken(wrapStyle, -1, 0, IDENTIFIER, THIS, SUPER);
1494
                                newline();
1488
                } else {
1495
                            } else {
1489
                    int index = tokens.index();
1496
                                newline();
1490
                    int c = col;
1497
                                accept(DOT);
1491
                    Diff d = diffs.isEmpty() ? null : diffs.getFirst();
1498
                            }
1492
                    accept(IDENTIFIER, THIS, SUPER);
1499
                            scanMethodCall(node);
1493
                    if (wrapStyle != CodeStyle.WrapStyle.WRAP_NEVER && col > rightMargin && c > indent) {
1500
                        }
1494
                        rollback(index, c, d);
1501
                        break;
1495
                        newline();
1502
                    case WRAP_NEVER:
1496
                        accept(IDENTIFIER, THIS, SUPER);
1503
                        accept(DOT);
1497
                    }
1504
                        scanMethodCall(node);
1505
                        break;
1498
                }
1506
                }
1499
            } else {
1507
            } else {
1500
                scan(node.getMethodSelect(), p);
1508
                scanMethodCall(node);
1501
            }
1509
            }
1502
            spaces(cs.spaceBeforeMethodCallParen() ? 1 : 0);
1503
            accept(LPAREN);
1504
            List<? extends ExpressionTree> args = node.getArguments();
1505
            if (args != null && !args.isEmpty()) {
1506
                spaces(cs.spaceWithinMethodCallParens() ? 1 : 0, true);
1507
                wrapList(cs.wrapMethodCallArgs(), cs.alignMultilineCallArgs(), false, COMMA, args);
1508
                spaces(cs.spaceWithinMethodCallParens() ? 1 : 0);            
1509
            }
1510
            accept(RPAREN);
1511
            return true;
1510
            return true;
1512
        }
1511
        }
1513
1512
Lines 1996-2013 Link Here
1996
            int alignIndent = cs.alignMultilineAssignment() ? col : -1;
1995
            int alignIndent = cs.alignMultilineAssignment() ? col : -1;
1997
            boolean b = scan(node.getVariable(), p);
1996
            boolean b = scan(node.getVariable(), p);
1998
            if (b || getCurrentPath().getParentPath().getLeaf().getKind() != Tree.Kind.ANNOTATION) {
1997
            if (b || getCurrentPath().getParentPath().getLeaf().getKind() != Tree.Kind.ANNOTATION) {
1999
                spaces(cs.spaceAroundAssignOps() ? 1 : 0);
1998
                boolean spaceAroundAssignOps = insideAnnotation ? cs.spaceAroundAnnotationValueAssignOps() : cs.spaceAroundAssignOps();
1999
                spaces(spaceAroundAssignOps ? 1 : 0);
2000
                accept(EQ);
2000
                accept(EQ);
2001
                ExpressionTree expr = node.getExpression();
2001
                ExpressionTree expr = node.getExpression();
2002
                if (expr.getKind() == Tree.Kind.NEW_ARRAY && ((NewArrayTree)expr).getType() == null) {
2002
                if (expr.getKind() == Tree.Kind.NEW_ARRAY && ((NewArrayTree)expr).getType() == null) {
2003
                    if (cs.getOtherBracePlacement() == CodeStyle.BracePlacement.SAME_LINE)
2003
                    if (cs.getOtherBracePlacement() == CodeStyle.BracePlacement.SAME_LINE)
2004
                        spaces(cs.spaceAroundAssignOps() ? 1 : 0);
2004
                        spaces(spaceAroundAssignOps ? 1 : 0);
2005
                    scan(expr, p);
2005
                    scan(expr, p);
2006
                } else {
2006
                } else {
2007
                    if (wrapAnnotation && expr.getKind() == Tree.Kind.ANNOTATION) {
2007
                    if (wrapAnnotation && expr.getKind() == Tree.Kind.ANNOTATION) {
2008
                        wrapTree(CodeStyle.WrapStyle.WRAP_ALWAYS, alignIndent, cs.spaceAroundAssignOps() ? 1 : 0, expr);
2008
                        wrapTree(CodeStyle.WrapStyle.WRAP_ALWAYS, alignIndent, spaceAroundAssignOps ? 1 : 0, expr);
2009
                    } else {
2009
                    } else {
2010
                        wrapTree(cs.wrapAssignOps(), alignIndent, cs.spaceAroundAssignOps() ? 1 : 0, expr);
2010
                        wrapTree(cs.wrapAssignOps(), alignIndent, spaceAroundAssignOps ? 1 : 0, expr);
2011
                    }
2011
                    }
2012
                }
2012
                }
2013
            } else {
2013
            } else {
Lines 3005-3010 Link Here
3005
                    int c = col;
3005
                    int c = col;
3006
                    Diff d = diffs.isEmpty() ? null : diffs.getFirst();
3006
                    Diff d = diffs.isEmpty() ? null : diffs.getFirst();
3007
                    old = indent;
3007
                    old = indent;
3008
                    boolean oldCheckWrap = checkWrap;
3008
                    checkWrap = true;
3009
                    checkWrap = true;
3009
                    try {
3010
                    try {
3010
                        if (alignIndent >= 0)
3011
                        if (alignIndent >= 0)
Lines 3015-3021 Link Here
3015
                        accept(first, rest);
3016
                        accept(first, rest);
3016
                    } catch (WrapAbort wa) {
3017
                    } catch (WrapAbort wa) {
3017
                    } finally {
3018
                    } finally {
3018
                        checkWrap = false;
3019
                        checkWrap = oldCheckWrap;
3019
                    }
3020
                    }
3020
                    if (this.col > rightMargin) {
3021
                    if (this.col > rightMargin) {
3021
                        rollback(index, c, d);
3022
                        rollback(index, c, d);
Lines 3056-3061 Link Here
3056
                    int c = col;
3057
                    int c = col;
3057
                    Diff d = diffs.isEmpty() ? null : diffs.getFirst();
3058
                    Diff d = diffs.isEmpty() ? null : diffs.getFirst();
3058
                    old = indent;
3059
                    old = indent;
3060
                    boolean oldCheckWrap = checkWrap;
3059
                    checkWrap = true;
3061
                    checkWrap = true;
3060
                    try {
3062
                    try {
3061
                        if (alignIndent >= 0)
3063
                        if (alignIndent >= 0)
Lines 3066-3072 Link Here
3066
                        scan(tree, null);
3068
                        scan(tree, null);
3067
                    } catch (WrapAbort wa) {
3069
                    } catch (WrapAbort wa) {
3068
                    } finally {
3070
                    } finally {
3069
                        checkWrap = false;
3071
                        checkWrap = oldCheckWrap;
3070
                    }
3072
                    }
3071
                    if (col > rightMargin) {
3073
                    if (col > rightMargin) {
3072
                        rollback(index, c, d);
3074
                        rollback(index, c, d);
Lines 3114-3119 Link Here
3114
                    int c = col;
3116
                    int c = col;
3115
                    Diff d = diffs.isEmpty() ? null : diffs.getFirst();
3117
                    Diff d = diffs.isEmpty() ? null : diffs.getFirst();
3116
                    old = indent;
3118
                    old = indent;
3119
                    boolean oldCheckWrap = checkWrap;
3117
                    checkWrap = true;
3120
                    checkWrap = true;
3118
                    try {
3121
                    try {
3119
                        if (alignIndent >= 0)
3122
                        if (alignIndent >= 0)
Lines 3131-3137 Link Here
3131
                        scan(tree, null);
3134
                        scan(tree, null);
3132
                    } catch (WrapAbort wa) {
3135
                    } catch (WrapAbort wa) {
3133
                    } finally {
3136
                    } finally {
3134
                        checkWrap = false;
3137
                        checkWrap = oldCheckWrap;
3135
                    }
3138
                    }
3136
                    if (col > rightMargin) {
3139
                    if (col > rightMargin) {
3137
                        rollback(index, c, d);
3140
                        rollback(index, c, d);
Lines 3293-3298 Link Here
3293
            }
3296
            }
3294
        }
3297
        }
3295
        
3298
        
3299
        private void scanMethodCall(MethodInvocationTree node) {
3300
            List<? extends Tree> targs = node.getTypeArguments();
3301
            if (targs != null && !targs.isEmpty()) {
3302
                if (LT == accept(LT))
3303
                    tpLevel++;
3304
                for (Iterator<? extends Tree> it = targs.iterator(); it.hasNext();) {
3305
                    Tree targ = it.next();
3306
                    scan(targ, null);
3307
                    if (it.hasNext()) {
3308
                        spaces(cs.spaceBeforeComma() ? 1 : 0);
3309
                        accept(COMMA);
3310
                        spaces(cs.spaceAfterComma() ? 1 : 0);
3311
                    }
3312
                }
3313
                JavaTokenId accepted;
3314
                if (tpLevel > 0 && (accepted = accept(GT, GTGT, GTGTGT)) != null) {
3315
                    switch (accepted) {
3316
                        case GTGTGT:
3317
                            tpLevel -= 3;
3318
                            break;
3319
                        case GTGT:
3320
                            tpLevel -= 2;
3321
                            break;
3322
                        case GT:
3323
                            tpLevel--;
3324
                            break;
3325
                    }
3326
                }
3327
            }
3328
            accept(IDENTIFIER, THIS, SUPER);
3329
            spaces(cs.spaceBeforeMethodCallParen() ? 1 : 0);
3330
            accept(LPAREN);
3331
            List<? extends ExpressionTree> args = node.getArguments();
3332
            if (args != null && !args.isEmpty()) {
3333
                spaces(cs.spaceWithinMethodCallParens() ? 1 : 0, true);
3334
                wrapList(cs.wrapMethodCallArgs(), cs.alignMultilineCallArgs(), false, COMMA, args);
3335
                spaces(cs.spaceWithinMethodCallParens() ? 1 : 0);            
3336
            }
3337
            accept(RPAREN);
3338
        }
3339
        
3296
        private void reformatComment() {
3340
        private void reformatComment() {
3297
            if (tokens.token().id() != BLOCK_COMMENT && tokens.token().id() != JAVADOC_COMMENT)
3341
            if (tokens.token().id() != BLOCK_COMMENT && tokens.token().id() != JAVADOC_COMMENT)
3298
                return;
3342
                return;
(-)a/java.source/src/org/netbeans/modules/java/ui/Bundle.properties (-22 / +54 lines)
Lines 64-69 Link Here
64
LBL_wrp_WRAP_IF_LONG=If Long
64
LBL_wrp_WRAP_IF_LONG=If Long
65
LBL_wrp_WRAP_NEVER=Never
65
LBL_wrp_WRAP_NEVER=Never
66
66
67
LBL_ip_CARET_LOCATION=Caret Location
68
LBL_ip_FIRST_IN_CATEGORY=First In Category
69
LBL_ip_LAST_IN_CATEGORY=Last In Category
70
67
LBL_ExpandTabToSpaces=&Expand Tab to Spaces
71
LBL_ExpandTabToSpaces=&Expand Tab to Spaces
68
LBL_TabSize=&Tab Size:
72
LBL_TabSize=&Tab Size:
69
LBL_IndentSize=&Indentation Size:
73
LBL_IndentSize=&Indentation Size:
Lines 74-104 Link Here
74
LBL_AddLeadingStarInComment=A&dd Leading Star In Comment
78
LBL_AddLeadingStarInComment=A&dd Leading Star In Comment
75
LBL_RightMargin=&Right Margin:
79
LBL_RightMargin=&Right Margin:
76
 
80
 
77
LBL_Naming=Naming\:
81
LBL_gen_Naming=Naming Conventions\:
78
LBL_PreferLongerNames=Prefer Longer Names
82
LBL_gen_PreferLongerNames=Prefer Longer Names
79
LBL_Prefix=Prefix
83
LBL_gen_UseIsForBooleanGetters=Use Is For Boolean Getters
80
LBL_Suffix=Suffix
84
LBL_gen_Prefix=Prefix
81
LBL_Field=Field\:
85
LBL_gen_Suffix=Suffix
82
LBL_StaticField=Static Field\:
86
LBL_gen_Field=Field\:
83
LBL_Parameter=Parameter\:
87
LBL_gen_StaticField=Static Field\:
84
LBL_LocalVariable=Local Variable\:
88
LBL_gen_Parameter=Parameter\:
85
LBL_Misc=Misc\:
89
LBL_gen_LocalVariable=Local Variable\:
86
LBL_QualifyFieldAccess=Qualify Field Access
90
LBL_gen_Other=Other\:
87
LBL_UseIsForBooleanGetters=Use Is For Boolean Getters
91
LBL_gen_QualifyFieldAccess=Qualify Field Access
88
LBL_AddOverrideAnnotation=Add Override Annotation
92
LBL_gen_AddOverrideAnnotation=Add Override Annotation
89
LBL_FinalMofier=Final Modifier\:
93
LBL_gen_ParametersFinal=Make Generated Parameters Final
90
LBL_ParametersFinal=Make Generated Parameters Final
94
LBL_gen_LocalVariablesFinal=Make Generated Local variables Final
91
LBL_LocalVariablesFinal=Make Generated Local variables Final
95
LBL_gen_MembersOreder=Members Sort Order\:
92
LBL_ImportOredering=Import Ordering\:
96
LBL_gen_MembersOrederUp=Move Up
93
LBL_ImportUp=Move Up
97
LBL_gen_MembersOrederDown=Move Down
94
LBL_ImportDown=Move Down
98
LBL_gen_SortByVisibility=Sort Members By Visibility
99
LBL_gen_InsertionPoint=Insertion Point\:
100
101
VAL_gen_STATIC=Static
102
VAL_gen_CLASS=Classes
103
VAL_gen_CONSTRUCTOR=Constructors
104
VAL_gen_FIELD=Fields
105
VAL_gen_INSTANCE_INIT=Instance Initializers
106
VAL_gen_METHOD=Methods
107
VAL_gen_STATIC_INIT=Static Initializers
108
109
VAL_gen_PUBLIC=Public
110
VAL_gen_PRIVATE=Private
111
VAL_gen_PROTECTED=Protected
112
VAL_gen_DEFAULT=Default
113
95
LBL_blBeforePackage=Before &Package\:
114
LBL_blBeforePackage=Before &Package\:
96
LBL_blAfterPackage=After P&ackage\:
115
LBL_blAfterPackage=After Packa&ge\:
97
LBL_blBeforeImports=Before &Imports\:
116
LBL_blBeforeImports=Before &Imports\:
98
LBL_blAfterImports=After Imports\:
117
LBL_blAfterImports=After Imports\:
99
LBL_blBeforeClass=Before &Class\:
118
LBL_blBeforeClass=Before &Class\:
100
LBL_blAfterClass=After C&lass\:
119
LBL_blAfterClass=After C&lass\:
101
LBL_blAfterClassHeader=After Class &Header\:
120
LBL_blAfterClassHeader=After Class &Header\:
121
LBL_blAfterAnonymousClassHeader=After &Anonymous Class Header:
102
LBL_blBeforeFields=Before &Field\:
122
LBL_blBeforeFields=Before &Field\:
103
LBL_blAfterFields=After Fi&eld\:
123
LBL_blAfterFields=After Fi&eld\:
104
LBL_blBeforeMethods=Before &Method\:
124
LBL_blBeforeMethods=Before &Method\:
Lines 127-132 Link Here
127
LBL_spaceAroundBinaryOps=Binary Operators
147
LBL_spaceAroundBinaryOps=Binary Operators
128
LBL_spaceAroundTernaryOps=Ternary Operators
148
LBL_spaceAroundTernaryOps=Ternary Operators
129
LBL_spaceAroundAssignOps=Assignment Operators
149
LBL_spaceAroundAssignOps=Assignment Operators
150
LBL_spaceAroundAnnotationValueAssignOps=Annotation Value Assignment Operator
130
151
131
LBL_BeforeLeftBraces=Before Left Braces
152
LBL_BeforeLeftBraces=Before Left Braces
132
LBL_spaceBeforeClassDeclLeftBrace=Class Declaration
153
LBL_spaceBeforeClassDeclLeftBrace=Class Declaration
Lines 168-173 Link Here
168
LBL_spaceBeforeColon=Before Colon
189
LBL_spaceBeforeColon=Before Colon
169
LBL_spaceAfterColon=After Colon
190
LBL_spaceAfterColon=After Colon
170
LBL_spaceAfterTypeCast=After Type Cast
191
LBL_spaceAfterTypeCast=After Type Cast
192
171
LBL_wrp_extendsImplementsKeyword=&Extends/Implements Keyword\: 
193
LBL_wrp_extendsImplementsKeyword=&Extends/Implements Keyword\: 
172
LBL_wrp_extendsImplementsList=E&xtends/Implements List\:
194
LBL_wrp_extendsImplementsList=E&xtends/Implements List\:
173
LBL_wrp_methodParameters=Method &Parameters\:
195
LBL_wrp_methodParameters=Method &Parameters\:
Lines 176-181 Link Here
176
LBL_wrp_methodCallArgs=Method Call Arguments\:
198
LBL_wrp_methodCallArgs=Method Call Arguments\:
177
LBL_wrp_annotationArgs=Annotation Arg&uments\:
199
LBL_wrp_annotationArgs=Annotation Arg&uments\:
178
LBL_wrp_chainedMethodCalls=C&hained Method Calls\:
200
LBL_wrp_chainedMethodCalls=C&hained Method Calls\:
201
LBL_wrp_afeterDot=Wrap After Dot In Chained Method Call
179
LBL_wrp_arrayInit=Array Initiali&zer\:
202
LBL_wrp_arrayInit=Array Initiali&zer\:
180
LBL_wrp_tryResources=Try Re&sources\:
203
LBL_wrp_tryResources=Try Re&sources\:
181
LBL_wrp_multiCatches=Dis&junctive Catch Types\:
204
LBL_wrp_multiCatches=Dis&junctive Catch Types\:
Lines 228-233 Link Here
228
251
229
LBL_Comments=Comments
252
LBL_Comments=Comments
230
LBL_doc_enableCommentFormat=Enable Comments Formatting
253
LBL_doc_enableCommentFormat=Enable Comments Formatting
254
LBL_doc_enableBlockCommentFormat=Format Block Comments
231
LBL_doc_generalLabel=General
255
LBL_doc_generalLabel=General
232
LBL_doc_addLeadingStar=Add Leading Star
256
LBL_doc_addLeadingStar=Add Leading Star
233
LBL_doc_wrapCommentText=Wrap Text At Right Margin
257
LBL_doc_wrapCommentText=Wrap Text At Right Margin
Lines 355-361 Link Here
355
if (number==13 && object instanceof Runnable )\
379
if (number==13 && object instanceof Runnable )\
356
method( "Some text", 12, new Object());\
380
method( "Some text", 12, new Object());\
357
for( int i = 1; i < 100; i++ )\
381
for( int i = 1; i < 100; i++ )\
358
System.out.println(i);\
382
System.out.print(i);\
359
while ( this.number < 2 && number != 3 )\
383
while ( this.number < 2 && number != 3 )\
360
this.number++;\
384
this.number++;\
361
do \
385
do \
Lines 380-385 Link Here
380
public ClassA() {\
404
public ClassA() {\
381
}\
405
}\
382
public void methodA() {\
406
public void methodA() {\
407
new Runnable() {\
408
public void run() {\
409
}\
410
};\
383
}\
411
}\
384
public void methodB() {\
412
public void methodB() {\
385
}\
413
}\
Lines 463-468 Link Here
463
}\
491
}\
464
}
492
}
465
493
494
SAMPLE_CodeGen=public class ClassA {\
495
\
496
private String name;\
497
}
498
466
nlFinallyCheckBox1.text="finall&y"
499
nlFinallyCheckBox1.text="finall&y"
467
500
468
AN_Preview=Preview
501
AN_Preview=Preview
Lines 472-476 Link Here
472
FmtTabsIndents.indentCasesFromSwitchCheckBox.AccessibleContext.accessibleDescription=Additional indent for case statements
505
FmtTabsIndents.indentCasesFromSwitchCheckBox.AccessibleContext.accessibleDescription=Additional indent for case statements
473
FmtTabsIndents.indentTopLevelClassMembersCheckBox.AccessibleContext.accessibleDescription=Indent for top-level class members
506
FmtTabsIndents.indentTopLevelClassMembersCheckBox.AccessibleContext.accessibleDescription=Indent for top-level class members
474
FmtTabsIndents.continuationIndentSizeField.AccessibleContext.accessibleDescription=Indent size in spaces
507
FmtTabsIndents.continuationIndentSizeField.AccessibleContext.accessibleDescription=Indent size in spaces
475
FmtTabsIndents.labelIndentField.AccessibleContext.accessibleDescription=Label indentation size in spaces
508
FmtTabsIndents.labelIndentField.AccessibleContext.accessibleDescription=Label indentation size in spaces
476
LBL_doc_enableBlockCommentFormat=Format Block Comments
(-)a/java.source/src/org/netbeans/modules/java/ui/FmtBlankLines.form (-21 / +43 lines)
Lines 10-15 Link Here
10
  <AuxValues>
10
  <AuxValues>
11
    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
11
    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
12
    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
12
    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
13
    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
13
    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
14
    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
14
    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
15
    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
15
    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
16
    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
Lines 32-54 Link Here
32
                  <Component id="aClassHeaderLabel" alignment="0" min="-2" max="-2" attributes="0"/>
33
                  <Component id="aClassHeaderLabel" alignment="0" min="-2" max="-2" attributes="0"/>
33
                  <Component id="bFieldsLabel" alignment="0" min="-2" max="-2" attributes="0"/>
34
                  <Component id="bFieldsLabel" alignment="0" min="-2" max="-2" attributes="0"/>
34
                  <Component id="aFieldsLabel" alignment="0" min="-2" max="-2" attributes="0"/>
35
                  <Component id="aFieldsLabel" alignment="0" min="-2" max="-2" attributes="0"/>
36
                  <Component id="anAnonymousClassHeaderLabel" alignment="0" min="-2" max="-2" attributes="0"/>
35
                  <Component id="bMethodsLabel" alignment="0" min="-2" max="-2" attributes="0"/>
37
                  <Component id="bMethodsLabel" alignment="0" min="-2" max="-2" attributes="0"/>
36
                  <Component id="aMethodsLabel" alignment="0" min="-2" max="-2" attributes="0"/>
38
                  <Component id="aMethodsLabel" alignment="0" min="-2" max="-2" attributes="0"/>
37
              </Group>
39
              </Group>
38
              <EmptySpace min="-2" pref="6" max="-2" attributes="0"/>
40
              <EmptySpace min="-2" pref="6" max="-2" attributes="0"/>
39
              <Group type="103" groupAlignment="0" attributes="0">
41
              <Group type="103" groupAlignment="0" max="-2" attributes="0">
40
                  <Component id="aMethodsField" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
42
                  <Component id="aImportsField" alignment="0" pref="0" max="32767" attributes="0"/>
41
                  <Component id="bMethodsField" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
43
                  <Component id="bImportsField" alignment="0" pref="0" max="32767" attributes="0"/>
42
                  <Component id="aFieldsField" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
44
                  <Component id="aPackageField" alignment="0" pref="0" max="32767" attributes="0"/>
43
                  <Component id="bFieldsField" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
45
                  <Component id="bPackageField" alignment="0" max="32767" attributes="0"/>
44
                  <Component id="aClassHeaderField" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
46
                  <Component id="aFieldsField" alignment="0" pref="0" max="32767" attributes="0"/>
45
                  <Component id="aClassField" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
47
                  <Component id="bFieldsField" alignment="0" pref="0" max="32767" attributes="0"/>
46
                  <Component id="bClassField" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
48
                  <Component id="anAnonymousClassHeaderField" alignment="0" max="32767" attributes="0"/>
47
                  <Component id="aImportsField" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
49
                  <Component id="aClassHeaderField" alignment="0" pref="0" max="32767" attributes="0"/>
48
                  <Component id="bImportsField" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
50
                  <Component id="aClassField" alignment="0" pref="0" max="32767" attributes="0"/>
49
                  <Component id="aPackageField" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
51
                  <Component id="bClassField" alignment="0" pref="0" max="32767" attributes="0"/>
50
                  <Component id="bPackageField" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
52
                  <Component id="bMethodsField" alignment="0" pref="0" max="32767" attributes="0"/>
53
                  <Component id="aMethodsField" pref="0" max="32767" attributes="0"/>
51
              </Group>
54
              </Group>
55
              <EmptySpace max="32767" attributes="0"/>
52
          </Group>
56
          </Group>
53
      </Group>
57
      </Group>
54
    </DimensionLayout>
58
    </DimensionLayout>
Lines 89-114 Link Here
89
                  <Component id="aClassHeaderField" linkSize="2" alignment="3" min="-2" max="-2" attributes="0"/>
93
                  <Component id="aClassHeaderField" linkSize="2" alignment="3" min="-2" max="-2" attributes="0"/>
90
                  <Component id="aClassHeaderLabel" alignment="3" min="-2" max="-2" attributes="0"/>
94
                  <Component id="aClassHeaderLabel" alignment="3" min="-2" max="-2" attributes="0"/>
91
              </Group>
95
              </Group>
92
              <EmptySpace min="4" pref="4" max="4" attributes="0"/>
96
              <EmptySpace max="-2" attributes="0"/>
93
              <Group type="103" groupAlignment="3" attributes="0">
97
              <Group type="103" groupAlignment="3" attributes="0">
98
                  <Component id="anAnonymousClassHeaderLabel" alignment="3" min="-2" max="-2" attributes="0"/>
99
                  <Component id="anAnonymousClassHeaderField" alignment="3" min="-2" max="-2" attributes="0"/>
100
              </Group>
101
              <EmptySpace max="-2" attributes="0"/>
102
              <Group type="103" groupAlignment="3" attributes="0">
103
                  <Component id="bFieldsLabel" alignment="3" min="-2" max="-2" attributes="0"/>
94
                  <Component id="bFieldsField" linkSize="2" alignment="3" min="-2" max="-2" attributes="0"/>
104
                  <Component id="bFieldsField" linkSize="2" alignment="3" min="-2" max="-2" attributes="0"/>
95
                  <Component id="bFieldsLabel" alignment="3" min="-2" max="-2" attributes="0"/>
96
              </Group>
105
              </Group>
97
              <EmptySpace min="4" pref="4" max="4" attributes="0"/>
106
              <EmptySpace max="-2" attributes="0"/>
98
              <Group type="103" groupAlignment="3" attributes="0">
107
              <Group type="103" groupAlignment="3" attributes="0">
108
                  <Component id="aFieldsLabel" alignment="3" min="-2" max="-2" attributes="0"/>
99
                  <Component id="aFieldsField" linkSize="2" alignment="3" min="-2" max="-2" attributes="0"/>
109
                  <Component id="aFieldsField" linkSize="2" alignment="3" min="-2" max="-2" attributes="0"/>
100
                  <Component id="aFieldsLabel" alignment="3" min="-2" max="-2" attributes="0"/>
101
              </Group>
110
              </Group>
102
              <EmptySpace min="4" pref="4" max="4" attributes="0"/>
111
              <EmptySpace max="-2" attributes="0"/>
103
              <Group type="103" groupAlignment="3" attributes="0">
112
              <Group type="103" groupAlignment="3" attributes="0">
113
                  <Component id="bMethodsLabel" alignment="3" min="-2" max="-2" attributes="0"/>
104
                  <Component id="bMethodsField" linkSize="2" alignment="3" min="-2" max="-2" attributes="0"/>
114
                  <Component id="bMethodsField" linkSize="2" alignment="3" min="-2" max="-2" attributes="0"/>
105
                  <Component id="bMethodsLabel" alignment="3" min="-2" max="-2" attributes="0"/>
106
              </Group>
115
              </Group>
107
              <EmptySpace min="4" pref="4" max="4" attributes="0"/>
116
              <EmptySpace max="-2" attributes="0"/>
108
              <Group type="103" groupAlignment="3" attributes="0">
117
              <Group type="103" groupAlignment="3" attributes="0">
118
                  <Component id="aMethodsLabel" alignment="3" min="-2" max="-2" attributes="0"/>
109
                  <Component id="aMethodsField" linkSize="2" alignment="3" min="-2" max="-2" attributes="0"/>
119
                  <Component id="aMethodsField" linkSize="2" alignment="3" min="-2" max="-2" attributes="0"/>
110
                  <Component id="aMethodsLabel" alignment="3" min="-2" max="-2" attributes="0"/>
111
              </Group>
120
              </Group>
121
              <EmptySpace max="32767" attributes="0"/>
112
          </Group>
122
          </Group>
113
      </Group>
123
      </Group>
114
    </DimensionLayout>
124
    </DimensionLayout>
Lines 126-132 Link Here
126
    </Component>
136
    </Component>
127
    <Component class="javax.swing.JTextField" name="bPackageField">
137
    <Component class="javax.swing.JTextField" name="bPackageField">
128
      <Properties>
138
      <Properties>
129
        <Property name="columns" type="int" value="5"/>
139
        <Property name="columns" type="int" value="2"/>
130
      </Properties>
140
      </Properties>
131
    </Component>
141
    </Component>
132
    <Component class="javax.swing.JLabel" name="aPackageLabel">
142
    <Component class="javax.swing.JLabel" name="aPackageLabel">
Lines 219-224 Link Here
219
        <Property name="columns" type="int" value="5"/>
229
        <Property name="columns" type="int" value="5"/>
220
      </Properties>
230
      </Properties>
221
    </Component>
231
    </Component>
232
    <Component class="javax.swing.JLabel" name="anAnonymousClassHeaderLabel">
233
      <Properties>
234
        <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
235
          <ComponentRef name="anAnonymousClassHeaderField"/>
236
        </Property>
237
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
238
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_blAfterAnonymousClassHeader" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
239
        </Property>
240
      </Properties>
241
    </Component>
242
    <Component class="javax.swing.JTextField" name="anAnonymousClassHeaderField">
243
    </Component>
222
    <Component class="javax.swing.JLabel" name="bFieldsLabel">
244
    <Component class="javax.swing.JLabel" name="bFieldsLabel">
223
      <Properties>
245
      <Properties>
224
        <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
246
        <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
(-)a/java.source/src/org/netbeans/modules/java/ui/FmtBlankLines.java (-29 / +43 lines)
Lines 66-71 Link Here
66
        bClassField.putClientProperty(OPTION_ID, blankLinesBeforeClass);
66
        bClassField.putClientProperty(OPTION_ID, blankLinesBeforeClass);
67
        aClassField.putClientProperty(OPTION_ID, blankLinesAfterClass);
67
        aClassField.putClientProperty(OPTION_ID, blankLinesAfterClass);
68
        aClassHeaderField.putClientProperty(OPTION_ID, blankLinesAfterClassHeader);
68
        aClassHeaderField.putClientProperty(OPTION_ID, blankLinesAfterClassHeader);
69
        anAnonymousClassHeaderField.putClientProperty(OPTION_ID, blankLinesAfterAnonymousClassHeader);
69
        bFieldsField.putClientProperty(OPTION_ID, blankLinesBeforeFields);
70
        bFieldsField.putClientProperty(OPTION_ID, blankLinesBeforeFields);
70
        aFieldsField.putClientProperty(OPTION_ID, blankLinesAfterFields);
71
        aFieldsField.putClientProperty(OPTION_ID, blankLinesAfterFields);
71
        bMethodsField.putClientProperty(OPTION_ID, blankLinesBeforeMethods );
72
        bMethodsField.putClientProperty(OPTION_ID, blankLinesBeforeMethods );
Lines 78-83 Link Here
78
        bClassField.addKeyListener(new NumericKeyListener());
79
        bClassField.addKeyListener(new NumericKeyListener());
79
        aClassField.addKeyListener(new NumericKeyListener());
80
        aClassField.addKeyListener(new NumericKeyListener());
80
        aClassHeaderField.addKeyListener(new NumericKeyListener());
81
        aClassHeaderField.addKeyListener(new NumericKeyListener());
82
        anAnonymousClassHeaderField.addKeyListener(new NumericKeyListener());
81
        bFieldsField.addKeyListener(new NumericKeyListener());
83
        bFieldsField.addKeyListener(new NumericKeyListener());
82
        aFieldsField.addKeyListener(new NumericKeyListener());
84
        aFieldsField.addKeyListener(new NumericKeyListener());
83
        bMethodsField.addKeyListener(new NumericKeyListener());
85
        bMethodsField.addKeyListener(new NumericKeyListener());
Lines 112-117 Link Here
112
        aClassField = new javax.swing.JTextField();
114
        aClassField = new javax.swing.JTextField();
113
        aClassHeaderLabel = new javax.swing.JLabel();
115
        aClassHeaderLabel = new javax.swing.JLabel();
114
        aClassHeaderField = new javax.swing.JTextField();
116
        aClassHeaderField = new javax.swing.JTextField();
117
        anAnonymousClassHeaderLabel = new javax.swing.JLabel();
118
        anAnonymousClassHeaderField = new javax.swing.JTextField();
115
        bFieldsLabel = new javax.swing.JLabel();
119
        bFieldsLabel = new javax.swing.JLabel();
116
        bFieldsField = new javax.swing.JTextField();
120
        bFieldsField = new javax.swing.JTextField();
117
        aFieldsLabel = new javax.swing.JLabel();
121
        aFieldsLabel = new javax.swing.JLabel();
Lines 127-133 Link Here
127
        bPackageLabel.setLabelFor(bPackageField);
131
        bPackageLabel.setLabelFor(bPackageField);
128
        org.openide.awt.Mnemonics.setLocalizedText(bPackageLabel, org.openide.util.NbBundle.getMessage(FmtBlankLines.class, "LBL_blBeforePackage")); // NOI18N
132
        org.openide.awt.Mnemonics.setLocalizedText(bPackageLabel, org.openide.util.NbBundle.getMessage(FmtBlankLines.class, "LBL_blBeforePackage")); // NOI18N
129
133
130
        bPackageField.setColumns(5);
134
        bPackageField.setColumns(2);
131
135
132
        aPackageLabel.setLabelFor(aPackageField);
136
        aPackageLabel.setLabelFor(aPackageField);
133
        org.openide.awt.Mnemonics.setLocalizedText(aPackageLabel, org.openide.util.NbBundle.getMessage(FmtBlankLines.class, "LBL_blAfterPackage")); // NOI18N
137
        org.openide.awt.Mnemonics.setLocalizedText(aPackageLabel, org.openide.util.NbBundle.getMessage(FmtBlankLines.class, "LBL_blAfterPackage")); // NOI18N
Lines 159-164 Link Here
159
163
160
        aClassHeaderField.setColumns(5);
164
        aClassHeaderField.setColumns(5);
161
165
166
        anAnonymousClassHeaderLabel.setLabelFor(anAnonymousClassHeaderField);
167
        org.openide.awt.Mnemonics.setLocalizedText(anAnonymousClassHeaderLabel, org.openide.util.NbBundle.getMessage(FmtBlankLines.class, "LBL_blAfterAnonymousClassHeader")); // NOI18N
168
162
        bFieldsLabel.setLabelFor(bFieldsField);
169
        bFieldsLabel.setLabelFor(bFieldsField);
163
        org.openide.awt.Mnemonics.setLocalizedText(bFieldsLabel, org.openide.util.NbBundle.getMessage(FmtBlankLines.class, "LBL_blBeforeFields")); // NOI18N
170
        org.openide.awt.Mnemonics.setLocalizedText(bFieldsLabel, org.openide.util.NbBundle.getMessage(FmtBlankLines.class, "LBL_blBeforeFields")); // NOI18N
164
171
Lines 194-218 Link Here
194
                    .addComponent(aClassHeaderLabel)
201
                    .addComponent(aClassHeaderLabel)
195
                    .addComponent(bFieldsLabel)
202
                    .addComponent(bFieldsLabel)
196
                    .addComponent(aFieldsLabel)
203
                    .addComponent(aFieldsLabel)
204
                    .addComponent(anAnonymousClassHeaderLabel)
197
                    .addComponent(bMethodsLabel)
205
                    .addComponent(bMethodsLabel)
198
                    .addComponent(aMethodsLabel))
206
                    .addComponent(aMethodsLabel))
199
                .addGap(6, 6, 6)
207
                .addGap(6, 6, 6)
200
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
208
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
201
                    .addComponent(aMethodsField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
209
                    .addComponent(aImportsField, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)
202
                    .addComponent(bMethodsField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
210
                    .addComponent(bImportsField, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)
203
                    .addComponent(aFieldsField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
211
                    .addComponent(aPackageField, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)
204
                    .addComponent(bFieldsField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
212
                    .addComponent(bPackageField)
205
                    .addComponent(aClassHeaderField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
213
                    .addComponent(aFieldsField, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)
206
                    .addComponent(aClassField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
214
                    .addComponent(bFieldsField, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)
207
                    .addComponent(bClassField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
215
                    .addComponent(anAnonymousClassHeaderField)
208
                    .addComponent(aImportsField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
216
                    .addComponent(aClassHeaderField, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)
209
                    .addComponent(bImportsField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
217
                    .addComponent(aClassField, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)
210
                    .addComponent(aPackageField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
218
                    .addComponent(bClassField, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)
211
                    .addComponent(bPackageField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
219
                    .addComponent(bMethodsField, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)
220
                    .addComponent(aMethodsField, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE))
221
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
212
        );
222
        );
213
214
        layout.linkSize( javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[]{aClassField, aClassHeaderField, aFieldsField, aImportsField, aMethodsField, aPackageField, bClassField, bFieldsField, bImportsField, bMethodsField, bPackageField});
215
216
        layout.setVerticalGroup(
223
        layout.setVerticalGroup(
217
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
224
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
218
            .addGroup(layout.createSequentialGroup()
225
            .addGroup(layout.createSequentialGroup()
Lines 243-267 Link Here
243
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
250
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
244
                    .addComponent(aClassHeaderField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
251
                    .addComponent(aClassHeaderField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
245
                    .addComponent(aClassHeaderLabel))
252
                    .addComponent(aClassHeaderLabel))
246
                .addGap(4, 4, 4)
253
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
247
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
254
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
248
                    .addComponent(bFieldsField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
255
                    .addComponent(anAnonymousClassHeaderLabel)
249
                    .addComponent(bFieldsLabel))
256
                    .addComponent(anAnonymousClassHeaderField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
250
                .addGap(4, 4, 4)
257
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
251
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
258
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
252
                    .addComponent(aFieldsField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
259
                    .addComponent(bFieldsLabel)
253
                    .addComponent(aFieldsLabel))
260
                    .addComponent(bFieldsField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
254
                .addGap(4, 4, 4)
261
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
255
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
262
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
256
                    .addComponent(bMethodsField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
263
                    .addComponent(aFieldsLabel)
257
                    .addComponent(bMethodsLabel))
264
                    .addComponent(aFieldsField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
258
                .addGap(4, 4, 4)
265
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
259
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
266
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
260
                    .addComponent(aMethodsField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
267
                    .addComponent(bMethodsLabel)
261
                    .addComponent(aMethodsLabel)))
268
                    .addComponent(bMethodsField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
269
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
270
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
271
                    .addComponent(aMethodsLabel)
272
                    .addComponent(aMethodsField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
273
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
262
        );
274
        );
263
275
264
        layout.linkSize( javax.swing.SwingConstants.VERTICAL, new java.awt.Component[]{aClassField, aClassHeaderField, aFieldsField, aImportsField, aMethodsField, aPackageField, bClassField, bFieldsField, bImportsField, bMethodsField, bPackageField});
276
        layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {aClassField, aClassHeaderField, aFieldsField, aImportsField, aMethodsField, aPackageField, bClassField, bFieldsField, bImportsField, bMethodsField, bPackageField});
265
277
266
    }// </editor-fold>//GEN-END:initComponents
278
    }// </editor-fold>//GEN-END:initComponents
267
    
279
    
Lines 279-284 Link Here
279
    private javax.swing.JLabel aMethodsLabel;
291
    private javax.swing.JLabel aMethodsLabel;
280
    private javax.swing.JTextField aPackageField;
292
    private javax.swing.JTextField aPackageField;
281
    private javax.swing.JLabel aPackageLabel;
293
    private javax.swing.JLabel aPackageLabel;
294
    private javax.swing.JTextField anAnonymousClassHeaderField;
295
    private javax.swing.JLabel anAnonymousClassHeaderLabel;
282
    private javax.swing.JTextField bClassField;
296
    private javax.swing.JTextField bClassField;
283
    private javax.swing.JLabel bClassLabel;
297
    private javax.swing.JLabel bClassLabel;
284
    private javax.swing.JTextField bFieldsField;
298
    private javax.swing.JTextField bFieldsField;
(-)a/java.source/src/org/netbeans/modules/java/ui/FmtCodeGeneration.form (-285 / +415 lines)
Lines 1-6 Link Here
1
<?xml version="1.0" encoding="UTF-8" ?>
1
<?xml version="1.0" encoding="UTF-8" ?>
2
2
3
<Form version="1.4" maxVersion="1.4" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
3
<Form version="1.8" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
4
  <Properties>
4
  <Properties>
5
    <Property name="name" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
5
    <Property name="name" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
6
      <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_CodeGeneration" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
6
      <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_CodeGeneration" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
Lines 10-42 Link Here
10
  <AuxValues>
10
  <AuxValues>
11
    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
11
    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
12
    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
12
    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
13
    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
13
    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
14
    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
14
    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
15
    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
15
    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
16
    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
16
    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
17
    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
17
    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
18
    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
18
    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
19
    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
19
    <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-102,0,0,7,4"/>
20
  </AuxValues>
20
  </AuxValues>
21
21
22
  <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
22
  <Layout>
23
    <DimensionLayout dim="0">
24
      <Group type="103" groupAlignment="0" attributes="0">
25
          <Component id="jSeparator1" max="32767" attributes="0"/>
26
          <Group type="102" alignment="0" attributes="0">
27
              <Group type="103" groupAlignment="0" attributes="0">
28
                  <Component id="otherLabel" min="-2" max="-2" attributes="0"/>
29
                  <Group type="102" alignment="0" attributes="0">
30
                      <EmptySpace max="-2" attributes="0"/>
31
                      <Group type="103" groupAlignment="0" max="-2" attributes="0">
32
                          <Component id="qualifyFieldAccessCheckBox" alignment="0" min="-2" max="-2" attributes="0"/>
33
                          <Component id="addOverrideAnnortationCheckBox" alignment="0" min="-2" max="-2" attributes="0"/>
34
                          <Component id="parametersFinalCheckBox" alignment="0" min="-2" max="-2" attributes="0"/>
35
                          <Component id="localVarsFinalCheckBox" alignment="0" min="-2" max="-2" attributes="0"/>
36
                      </Group>
37
                  </Group>
38
              </Group>
39
              <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
40
          </Group>
41
          <Component id="jSeparator3" alignment="0" max="32767" attributes="0"/>
42
          <Group type="102" attributes="0">
43
              <Group type="103" groupAlignment="0" max="-2" attributes="0">
44
                  <Component id="namingConventionsLabel" min="-2" max="-2" attributes="0"/>
45
                  <Component id="memberOrderLabel" alignment="0" min="-2" max="-2" attributes="0"/>
46
                  <Group type="102" attributes="0">
47
                      <EmptySpace max="-2" attributes="0"/>
48
                      <Group type="103" groupAlignment="0" max="-2" attributes="0">
49
                          <Component id="isForBooleanGettersCheckBox" min="-2" max="-2" attributes="0"/>
50
                          <Component id="preferLongerNamesCheckBox" alignment="0" min="-2" max="-2" attributes="0"/>
51
                          <Component id="jPanel1" alignment="0" min="-2" pref="274" max="-2" attributes="0"/>
52
                          <Group type="102" attributes="0">
53
                              <Group type="103" groupAlignment="0" attributes="0">
54
                                  <Component id="jScrollPane1" max="32767" attributes="0"/>
55
                                  <Component id="jScrollPane2" alignment="0" min="-2" pref="160" max="-2" attributes="0"/>
56
                              </Group>
57
                              <EmptySpace max="-2" attributes="0"/>
58
                              <Group type="103" groupAlignment="0" attributes="0">
59
                                  <Group type="103" alignment="0" groupAlignment="0" max="-2" attributes="0">
60
                                      <Component id="downButton" max="32767" attributes="0"/>
61
                                      <Component id="upButton" min="-2" pref="108" max="-2" attributes="0"/>
62
                                  </Group>
63
                                  <Group type="103" alignment="0" groupAlignment="0" max="-2" attributes="0">
64
                                      <Component id="visDownButton" max="32767" attributes="0"/>
65
                                      <Component id="visUpButton" min="-2" pref="108" max="-2" attributes="0"/>
66
                                  </Group>
67
                              </Group>
68
                          </Group>
69
                      </Group>
70
                  </Group>
71
                  <Component id="sortByVisibilityCheckBox" alignment="0" min="-2" max="-2" attributes="0"/>
72
                  <Group type="102" alignment="0" attributes="0">
73
                      <EmptySpace min="-2" pref="5" max="-2" attributes="0"/>
74
                      <Component id="insertionPointLabel" min="-2" max="-2" attributes="0"/>
75
                      <EmptySpace max="-2" attributes="0"/>
76
                      <Component id="insertionPointComboBox" max="32767" attributes="0"/>
77
                  </Group>
78
              </Group>
79
              <EmptySpace max="32767" attributes="0"/>
80
          </Group>
81
          <Component id="jSeparator2" alignment="1" max="32767" attributes="0"/>
82
      </Group>
83
    </DimensionLayout>
84
    <DimensionLayout dim="1">
85
      <Group type="103" groupAlignment="0" attributes="0">
86
          <Group type="102" attributes="0">
87
              <Component id="namingConventionsLabel" min="-2" max="-2" attributes="0"/>
88
              <EmptySpace max="-2" attributes="0"/>
89
              <Component id="preferLongerNamesCheckBox" min="-2" max="-2" attributes="0"/>
90
              <EmptySpace max="-2" attributes="0"/>
91
              <Component id="isForBooleanGettersCheckBox" min="-2" max="-2" attributes="0"/>
92
              <EmptySpace max="-2" attributes="0"/>
93
              <Component id="jPanel1" min="-2" max="-2" attributes="0"/>
94
              <EmptySpace max="-2" attributes="0"/>
95
              <Component id="jSeparator1" min="-2" max="-2" attributes="0"/>
96
              <EmptySpace max="-2" attributes="0"/>
97
              <Component id="otherLabel" min="-2" max="-2" attributes="0"/>
98
              <EmptySpace max="-2" attributes="0"/>
99
              <Component id="qualifyFieldAccessCheckBox" min="-2" max="-2" attributes="0"/>
100
              <EmptySpace max="-2" attributes="0"/>
101
              <Component id="addOverrideAnnortationCheckBox" min="-2" max="-2" attributes="0"/>
102
              <EmptySpace max="-2" attributes="0"/>
103
              <Component id="parametersFinalCheckBox" min="-2" max="-2" attributes="0"/>
104
              <EmptySpace max="-2" attributes="0"/>
105
              <Component id="localVarsFinalCheckBox" min="-2" max="-2" attributes="0"/>
106
              <EmptySpace type="unrelated" max="-2" attributes="0"/>
107
              <Component id="jSeparator3" min="-2" max="-2" attributes="0"/>
108
              <EmptySpace max="-2" attributes="0"/>
109
              <Component id="memberOrderLabel" min="-2" max="-2" attributes="0"/>
110
              <EmptySpace max="-2" attributes="0"/>
111
              <Group type="103" groupAlignment="0" attributes="0">
112
                  <Component id="jScrollPane1" min="-2" pref="156" max="-2" attributes="0"/>
113
                  <Group type="102" attributes="0">
114
                      <Component id="upButton" min="-2" max="-2" attributes="0"/>
115
                      <EmptySpace max="-2" attributes="0"/>
116
                      <Component id="downButton" min="-2" max="-2" attributes="0"/>
117
                  </Group>
118
              </Group>
119
              <EmptySpace max="-2" attributes="0"/>
120
              <Component id="sortByVisibilityCheckBox" min="-2" max="-2" attributes="0"/>
121
              <EmptySpace max="-2" attributes="0"/>
122
              <Group type="103" groupAlignment="0" attributes="0">
123
                  <Component id="jScrollPane2" min="-2" pref="71" max="-2" attributes="0"/>
124
                  <Group type="102" alignment="0" attributes="0">
125
                      <Component id="visUpButton" min="-2" max="-2" attributes="0"/>
126
                      <EmptySpace max="-2" attributes="0"/>
127
                      <Component id="visDownButton" min="-2" max="-2" attributes="0"/>
128
                  </Group>
129
              </Group>
130
              <EmptySpace max="-2" attributes="0"/>
131
              <Component id="jSeparator2" min="-2" max="-2" attributes="0"/>
132
              <EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
133
              <Group type="103" groupAlignment="3" attributes="0">
134
                  <Component id="insertionPointLabel" alignment="3" min="-2" max="-2" attributes="0"/>
135
                  <Component id="insertionPointComboBox" alignment="3" min="-2" max="-2" attributes="0"/>
136
              </Group>
137
              <EmptySpace max="32767" attributes="0"/>
138
          </Group>
139
      </Group>
140
    </DimensionLayout>
141
  </Layout>
23
  <SubComponents>
142
  <SubComponents>
24
    <Component class="javax.swing.JLabel" name="preferLongerNamesLabel">
143
    <Component class="javax.swing.JLabel" name="namingConventionsLabel">
25
      <Properties>
144
      <Properties>
26
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
145
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
27
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_Naming" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
146
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_gen_Naming" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
28
        </Property>
147
        </Property>
29
      </Properties>
148
      </Properties>
30
      <Constraints>
31
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
32
          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="4" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/>
33
        </Constraint>
34
      </Constraints>
35
    </Component>
149
    </Component>
36
    <Component class="javax.swing.JCheckBox" name="preferLongerNamesCheckBox">
150
    <Component class="javax.swing.JCheckBox" name="preferLongerNamesCheckBox">
37
      <Properties>
151
      <Properties>
38
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
152
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
39
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_PreferLongerNames" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
153
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_gen_PreferLongerNames" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
40
        </Property>
154
        </Property>
41
        <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
155
        <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
42
          <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
156
          <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
Lines 48-227 Link Here
48
        </Property>
162
        </Property>
49
        <Property name="opaque" type="boolean" value="false"/>
163
        <Property name="opaque" type="boolean" value="false"/>
50
      </Properties>
164
      </Properties>
51
      <Constraints>
52
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
53
          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="8" insetsBottom="4" insetsRight="0" anchor="18" weightX="1.0" weightY="0.0"/>
54
        </Constraint>
55
      </Constraints>
56
    </Component>
165
    </Component>
57
    <Component class="javax.swing.JLabel" name="prefixLabel">
166
    <Component class="javax.swing.JCheckBox" name="isForBooleanGettersCheckBox">
58
      <Properties>
167
      <Properties>
59
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
168
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
60
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_Prefix" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
169
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_gen_UseIsForBooleanGetters" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
61
        </Property>
62
      </Properties>
63
      <Constraints>
64
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
65
          <GridBagConstraints gridX="1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="8" insetsBottom="4" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/>
66
        </Constraint>
67
      </Constraints>
68
    </Component>
69
    <Component class="javax.swing.JLabel" name="suffixLabel">
70
      <Properties>
71
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
72
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_Suffix" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
73
        </Property>
74
      </Properties>
75
      <Constraints>
76
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
77
          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="8" insetsBottom="4" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/>
78
        </Constraint>
79
      </Constraints>
80
    </Component>
81
    <Component class="javax.swing.JLabel" name="fieldLabel">
82
      <Properties>
83
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
84
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_Field" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
85
        </Property>
86
      </Properties>
87
      <Constraints>
88
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
89
          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="4" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/>
90
        </Constraint>
91
      </Constraints>
92
    </Component>
93
    <Component class="javax.swing.JTextField" name="fieldPrefixField">
94
      <Properties>
95
        <Property name="columns" type="int" value="5"/>
96
      </Properties>
97
      <Constraints>
98
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
99
          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="8" insetsBottom="4" insetsRight="0" anchor="18" weightX="1.0" weightY="0.0"/>
100
        </Constraint>
101
      </Constraints>
102
    </Component>
103
    <Component class="javax.swing.JTextField" name="fieldSuffixField">
104
      <Properties>
105
        <Property name="columns" type="int" value="5"/>
106
      </Properties>
107
      <Constraints>
108
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
109
          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="8" insetsBottom="4" insetsRight="0" anchor="18" weightX="1.0" weightY="0.0"/>
110
        </Constraint>
111
      </Constraints>
112
    </Component>
113
    <Component class="javax.swing.JLabel" name="staticFieldLabel">
114
      <Properties>
115
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
116
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_StaticField" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
117
        </Property>
118
      </Properties>
119
      <Constraints>
120
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
121
          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="4" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/>
122
        </Constraint>
123
      </Constraints>
124
    </Component>
125
    <Component class="javax.swing.JTextField" name="staticFieldPrefixField">
126
      <Properties>
127
        <Property name="columns" type="int" value="5"/>
128
      </Properties>
129
      <Constraints>
130
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
131
          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="8" insetsBottom="4" insetsRight="0" anchor="18" weightX="1.0" weightY="0.0"/>
132
        </Constraint>
133
      </Constraints>
134
    </Component>
135
    <Component class="javax.swing.JTextField" name="staticFieldSuffixField">
136
      <Properties>
137
        <Property name="columns" type="int" value="5"/>
138
      </Properties>
139
      <Constraints>
140
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
141
          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="8" insetsBottom="4" insetsRight="0" anchor="18" weightX="1.0" weightY="0.0"/>
142
        </Constraint>
143
      </Constraints>
144
    </Component>
145
    <Component class="javax.swing.JLabel" name="parameterLabel">
146
      <Properties>
147
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
148
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_Parameter" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
149
        </Property>
150
      </Properties>
151
      <Constraints>
152
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
153
          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="4" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/>
154
        </Constraint>
155
      </Constraints>
156
    </Component>
157
    <Component class="javax.swing.JTextField" name="parameterPrefixField">
158
      <Properties>
159
        <Property name="columns" type="int" value="5"/>
160
      </Properties>
161
      <Constraints>
162
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
163
          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="8" insetsBottom="4" insetsRight="0" anchor="18" weightX="1.0" weightY="0.0"/>
164
        </Constraint>
165
      </Constraints>
166
    </Component>
167
    <Component class="javax.swing.JTextField" name="parameterSuffixField">
168
      <Properties>
169
        <Property name="columns" type="int" value="5"/>
170
      </Properties>
171
      <Constraints>
172
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
173
          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="8" insetsBottom="4" insetsRight="0" anchor="18" weightX="1.0" weightY="0.0"/>
174
        </Constraint>
175
      </Constraints>
176
    </Component>
177
    <Component class="javax.swing.JLabel" name="localVarLabel">
178
      <Properties>
179
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
180
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_LocalVariable" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
181
        </Property>
182
      </Properties>
183
      <Constraints>
184
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
185
          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="9" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/>
186
        </Constraint>
187
      </Constraints>
188
    </Component>
189
    <Component class="javax.swing.JTextField" name="localVarPrefixField">
190
      <Properties>
191
        <Property name="columns" type="int" value="5"/>
192
      </Properties>
193
      <Constraints>
194
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
195
          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="8" insetsBottom="9" insetsRight="0" anchor="18" weightX="1.0" weightY="0.0"/>
196
        </Constraint>
197
      </Constraints>
198
    </Component>
199
    <Component class="javax.swing.JTextField" name="localVarSuffixField">
200
      <Properties>
201
        <Property name="columns" type="int" value="5"/>
202
      </Properties>
203
      <Constraints>
204
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
205
          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="8" insetsBottom="9" insetsRight="0" anchor="18" weightX="1.0" weightY="0.0"/>
206
        </Constraint>
207
      </Constraints>
208
    </Component>
209
    <Component class="javax.swing.JLabel" name="miscLabel">
210
      <Properties>
211
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
212
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_Misc" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
213
        </Property>
214
      </Properties>
215
      <Constraints>
216
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
217
          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="4" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/>
218
        </Constraint>
219
      </Constraints>
220
    </Component>
221
    <Component class="javax.swing.JCheckBox" name="qualifyFieldAccessCheckBox">
222
      <Properties>
223
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
224
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_QualifyFieldAccess" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
225
        </Property>
170
        </Property>
226
        <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
171
        <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
227
          <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
172
          <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
Lines 233-248 Link Here
233
        </Property>
178
        </Property>
234
        <Property name="opaque" type="boolean" value="false"/>
179
        <Property name="opaque" type="boolean" value="false"/>
235
      </Properties>
180
      </Properties>
236
      <Constraints>
237
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
238
          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="8" insetsBottom="4" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/>
239
        </Constraint>
240
      </Constraints>
241
    </Component>
181
    </Component>
242
    <Component class="javax.swing.JCheckBox" name="isForBooleanGettersCheckBox">
182
    <Container class="javax.swing.JPanel" name="jPanel1">
183
184
      <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
185
      <SubComponents>
186
        <Component class="javax.swing.JLabel" name="prefixLabel">
187
          <Properties>
188
            <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
189
              <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_gen_Prefix" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
190
            </Property>
191
          </Properties>
192
          <Constraints>
193
            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
194
              <GridBagConstraints gridX="1" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="8" insetsBottom="4" insetsRight="0" anchor="17" weightX="0.5" weightY="0.0"/>
195
            </Constraint>
196
          </Constraints>
197
        </Component>
198
        <Component class="javax.swing.JLabel" name="suffixLabel">
199
          <Properties>
200
            <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
201
              <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_gen_Suffix" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
202
            </Property>
203
          </Properties>
204
          <Constraints>
205
            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
206
              <GridBagConstraints gridX="2" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="8" insetsBottom="4" insetsRight="0" anchor="17" weightX="0.5" weightY="0.0"/>
207
            </Constraint>
208
          </Constraints>
209
        </Component>
210
        <Component class="javax.swing.JLabel" name="fieldLabel">
211
          <Properties>
212
            <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
213
              <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_gen_Field" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
214
            </Property>
215
          </Properties>
216
          <Constraints>
217
            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
218
              <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
219
            </Constraint>
220
          </Constraints>
221
        </Component>
222
        <Component class="javax.swing.JTextField" name="fieldPrefixField">
223
          <Properties>
224
            <Property name="columns" type="int" value="5"/>
225
          </Properties>
226
          <Constraints>
227
            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
228
              <GridBagConstraints gridX="1" gridY="1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="8" insetsBottom="4" insetsRight="0" anchor="10" weightX="0.5" weightY="0.0"/>
229
            </Constraint>
230
          </Constraints>
231
        </Component>
232
        <Component class="javax.swing.JTextField" name="fieldSuffixField">
233
          <Properties>
234
            <Property name="columns" type="int" value="5"/>
235
          </Properties>
236
          <Constraints>
237
            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
238
              <GridBagConstraints gridX="2" gridY="1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="8" insetsBottom="4" insetsRight="0" anchor="10" weightX="0.5" weightY="0.0"/>
239
            </Constraint>
240
          </Constraints>
241
        </Component>
242
        <Component class="javax.swing.JLabel" name="staticFieldLabel">
243
          <Properties>
244
            <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
245
              <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_gen_StaticField" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
246
            </Property>
247
          </Properties>
248
          <Constraints>
249
            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
250
              <GridBagConstraints gridX="0" gridY="2" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
251
            </Constraint>
252
          </Constraints>
253
        </Component>
254
        <Component class="javax.swing.JTextField" name="staticFieldPrefixField">
255
          <Properties>
256
            <Property name="columns" type="int" value="5"/>
257
          </Properties>
258
          <Constraints>
259
            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
260
              <GridBagConstraints gridX="1" gridY="2" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="8" insetsBottom="4" insetsRight="0" anchor="10" weightX="0.5" weightY="0.0"/>
261
            </Constraint>
262
          </Constraints>
263
        </Component>
264
        <Component class="javax.swing.JTextField" name="staticFieldSuffixField">
265
          <Properties>
266
            <Property name="columns" type="int" value="5"/>
267
          </Properties>
268
          <Constraints>
269
            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
270
              <GridBagConstraints gridX="2" gridY="2" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="8" insetsBottom="4" insetsRight="0" anchor="10" weightX="0.5" weightY="0.0"/>
271
            </Constraint>
272
          </Constraints>
273
        </Component>
274
        <Component class="javax.swing.JLabel" name="parameterLabel">
275
          <Properties>
276
            <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
277
              <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_gen_Parameter" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
278
            </Property>
279
          </Properties>
280
          <Constraints>
281
            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
282
              <GridBagConstraints gridX="0" gridY="3" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
283
            </Constraint>
284
          </Constraints>
285
        </Component>
286
        <Component class="javax.swing.JTextField" name="parameterPrefixField">
287
          <Properties>
288
            <Property name="columns" type="int" value="5"/>
289
          </Properties>
290
          <Constraints>
291
            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
292
              <GridBagConstraints gridX="1" gridY="3" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="8" insetsBottom="4" insetsRight="0" anchor="10" weightX="0.5" weightY="0.0"/>
293
            </Constraint>
294
          </Constraints>
295
        </Component>
296
        <Component class="javax.swing.JTextField" name="parameterSuffixField">
297
          <Properties>
298
            <Property name="columns" type="int" value="5"/>
299
          </Properties>
300
          <Constraints>
301
            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
302
              <GridBagConstraints gridX="2" gridY="3" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="8" insetsBottom="4" insetsRight="0" anchor="10" weightX="0.5" weightY="0.0"/>
303
            </Constraint>
304
          </Constraints>
305
        </Component>
306
        <Component class="javax.swing.JLabel" name="localVarLabel">
307
          <Properties>
308
            <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
309
              <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_gen_LocalVariable" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
310
            </Property>
311
          </Properties>
312
          <Constraints>
313
            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
314
              <GridBagConstraints gridX="0" gridY="4" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
315
            </Constraint>
316
          </Constraints>
317
        </Component>
318
        <Component class="javax.swing.JTextField" name="localVarSuffixField">
319
          <Properties>
320
            <Property name="columns" type="int" value="5"/>
321
          </Properties>
322
          <Constraints>
323
            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
324
              <GridBagConstraints gridX="1" gridY="4" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="8" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.5" weightY="0.0"/>
325
            </Constraint>
326
          </Constraints>
327
        </Component>
328
        <Component class="javax.swing.JTextField" name="localVarPrefixField">
329
          <Properties>
330
            <Property name="columns" type="int" value="5"/>
331
          </Properties>
332
          <Constraints>
333
            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
334
              <GridBagConstraints gridX="2" gridY="4" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="8" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.5" weightY="0.0"/>
335
            </Constraint>
336
          </Constraints>
337
        </Component>
338
      </SubComponents>
339
    </Container>
340
    <Component class="javax.swing.JSeparator" name="jSeparator1">
341
    </Component>
342
    <Component class="javax.swing.JLabel" name="otherLabel">
243
      <Properties>
343
      <Properties>
244
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
344
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
245
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_UseIsForBooleanGetters" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
345
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_gen_Other" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
346
        </Property>
347
      </Properties>
348
    </Component>
349
    <Component class="javax.swing.JCheckBox" name="qualifyFieldAccessCheckBox">
350
      <Properties>
351
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
352
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_gen_QualifyFieldAccess" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
246
        </Property>
353
        </Property>
247
        <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
354
        <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
248
          <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
355
          <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
Lines 254-269 Link Here
254
        </Property>
361
        </Property>
255
        <Property name="opaque" type="boolean" value="false"/>
362
        <Property name="opaque" type="boolean" value="false"/>
256
      </Properties>
363
      </Properties>
257
      <Constraints>
258
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
259
          <GridBagConstraints gridX="1" gridY="-1" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="8" insetsBottom="4" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/>
260
        </Constraint>
261
      </Constraints>
262
    </Component>
364
    </Component>
263
    <Component class="javax.swing.JCheckBox" name="addOverrideAnnortationCheckBox">
365
    <Component class="javax.swing.JCheckBox" name="addOverrideAnnortationCheckBox">
264
      <Properties>
366
      <Properties>
265
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
367
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
266
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_AddOverrideAnnotation" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
368
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_gen_AddOverrideAnnotation" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
267
        </Property>
369
        </Property>
268
        <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
370
        <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
269
          <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
371
          <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
Lines 275-302 Link Here
275
        </Property>
377
        </Property>
276
        <Property name="opaque" type="boolean" value="false"/>
378
        <Property name="opaque" type="boolean" value="false"/>
277
      </Properties>
379
      </Properties>
278
      <Constraints>
279
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
280
          <GridBagConstraints gridX="1" gridY="-1" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="8" insetsBottom="8" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/>
281
        </Constraint>
282
      </Constraints>
283
    </Component>
284
    <Component class="javax.swing.JLabel" name="finalLabel">
285
      <Properties>
286
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
287
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_FinalMofier" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
288
        </Property>
289
      </Properties>
290
      <Constraints>
291
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
292
          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="4" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/>
293
        </Constraint>
294
      </Constraints>
295
    </Component>
380
    </Component>
296
    <Component class="javax.swing.JCheckBox" name="parametersFinalCheckBox">
381
    <Component class="javax.swing.JCheckBox" name="parametersFinalCheckBox">
297
      <Properties>
382
      <Properties>
298
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
383
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
299
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_ParametersFinal" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
384
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_gen_ParametersFinal" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
300
        </Property>
385
        </Property>
301
        <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
386
        <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
302
          <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
387
          <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
Lines 308-323 Link Here
308
        </Property>
393
        </Property>
309
        <Property name="opaque" type="boolean" value="false"/>
394
        <Property name="opaque" type="boolean" value="false"/>
310
      </Properties>
395
      </Properties>
311
      <Constraints>
312
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
313
          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="8" insetsBottom="4" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/>
314
        </Constraint>
315
      </Constraints>
316
    </Component>
396
    </Component>
317
    <Component class="javax.swing.JCheckBox" name="localVarsFinalCheckBox">
397
    <Component class="javax.swing.JCheckBox" name="localVarsFinalCheckBox">
318
      <Properties>
398
      <Properties>
319
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
399
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
320
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_LocalVariablesFinal" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
400
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_gen_LocalVariablesFinal" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
321
        </Property>
401
        </Property>
322
        <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
402
        <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
323
          <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
403
          <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
Lines 329-413 Link Here
329
        </Property>
409
        </Property>
330
        <Property name="opaque" type="boolean" value="false"/>
410
        <Property name="opaque" type="boolean" value="false"/>
331
      </Properties>
411
      </Properties>
332
      <Constraints>
333
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
334
          <GridBagConstraints gridX="1" gridY="-1" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="8" insetsBottom="8" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/>
335
        </Constraint>
336
      </Constraints>
337
    </Component>
412
    </Component>
338
    <Component class="javax.swing.JLabel" name="jLabel10">
413
    <Component class="javax.swing.JLabel" name="memberOrderLabel">
339
      <Properties>
414
      <Properties>
340
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
415
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
341
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_ImportOredering" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
416
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_gen_MembersOreder" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
342
        </Property>
417
        </Property>
343
      </Properties>
418
      </Properties>
344
      <Constraints>
345
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
346
          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="4" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/>
347
        </Constraint>
348
      </Constraints>
349
    </Component>
419
    </Component>
350
    <Container class="javax.swing.JPanel" name="jPanel1">
420
    <Container class="javax.swing.JScrollPane" name="jScrollPane1">
351
      <Properties>
352
        <Property name="opaque" type="boolean" value="false"/>
353
      </Properties>
354
      <Constraints>
355
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
356
          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="0" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="1.0" weightY="1.0"/>
357
        </Constraint>
358
      </Constraints>
359
421
360
      <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
422
      <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
361
      <SubComponents>
423
      <SubComponents>
362
        <Container class="javax.swing.JScrollPane" name="jScrollPane1">
424
        <Component class="javax.swing.JList" name="membersOrderList">
363
          <Constraints>
364
            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
365
              <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="2" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="8" insetsBottom="4" insetsRight="0" anchor="10" weightX="1.0" weightY="0.0"/>
366
            </Constraint>
367
          </Constraints>
368
369
          <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
370
          <SubComponents>
371
            <Component class="javax.swing.JList" name="importsOrderList">
372
              <Properties>
373
                <Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.editors2.ListModelEditor">
374
                  <StringArray count="5">
375
                    <StringItem index="0" value="Item 1"/>
376
                    <StringItem index="1" value="Item 2"/>
377
                    <StringItem index="2" value="Item 3"/>
378
                    <StringItem index="3" value="Item 4"/>
379
                    <StringItem index="4" value="Item 5"/>
380
                  </StringArray>
381
                </Property>
382
              </Properties>
383
            </Component>
384
          </SubComponents>
385
        </Container>
386
        <Component class="javax.swing.JButton" name="importUpButton">
387
          <Properties>
425
          <Properties>
388
            <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
426
            <Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.editors2.ListModelEditor">
389
              <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_ImportUp" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
427
              <StringArray count="9">
428
                <StringItem index="0" value="Item 1"/>
429
                <StringItem index="1" value="Item 2"/>
430
                <StringItem index="2" value="Item 3"/>
431
                <StringItem index="3" value="Item 4"/>
432
                <StringItem index="4" value="Item 5"/>
433
                <StringItem index="5" value="Item 6"/>
434
                <StringItem index="6" value="Item 7"/>
435
                <StringItem index="7" value="Item 8"/>
436
                <StringItem index="8" value="Item 9"/>
437
              </StringArray>
390
            </Property>
438
            </Property>
439
            <Property name="selectionMode" type="int" value="0"/>
391
          </Properties>
440
          </Properties>
392
          <Constraints>
393
            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
394
              <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="4" insetsBottom="4" insetsRight="1" anchor="18" weightX="0.0" weightY="0.0"/>
395
            </Constraint>
396
          </Constraints>
397
        </Component>
398
        <Component class="javax.swing.JButton" name="importDownButton">
399
          <Properties>
400
            <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
401
              <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_ImportDown" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
402
            </Property>
403
          </Properties>
404
          <Constraints>
405
            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
406
              <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="0" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="4" insetsBottom="4" insetsRight="1" anchor="18" weightX="0.0" weightY="1.0"/>
407
            </Constraint>
408
          </Constraints>
409
        </Component>
441
        </Component>
410
      </SubComponents>
442
      </SubComponents>
411
    </Container>
443
    </Container>
444
    <Component class="javax.swing.JButton" name="upButton">
445
      <Properties>
446
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
447
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_gen_MembersOrederUp" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
448
        </Property>
449
      </Properties>
450
      <Events>
451
        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="upButtonActionPerformed"/>
452
      </Events>
453
    </Component>
454
    <Component class="javax.swing.JButton" name="downButton">
455
      <Properties>
456
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
457
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_gen_MembersOrederDown" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
458
        </Property>
459
      </Properties>
460
      <Events>
461
        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="downButtonActionPerformed"/>
462
      </Events>
463
    </Component>
464
    <Component class="javax.swing.JSeparator" name="jSeparator3">
465
    </Component>
466
    <Component class="javax.swing.JCheckBox" name="sortByVisibilityCheckBox">
467
      <Properties>
468
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
469
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_gen_SortByVisibility" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
470
        </Property>
471
      </Properties>
472
      <Events>
473
        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="sortByVisibilityCheckBoxActionPerformed"/>
474
      </Events>
475
    </Component>
476
    <Container class="javax.swing.JScrollPane" name="jScrollPane2">
477
      <AuxValues>
478
        <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
479
      </AuxValues>
480
481
      <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
482
      <SubComponents>
483
        <Component class="javax.swing.JList" name="visibilityOrderList">
484
          <Properties>
485
            <Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.editors2.ListModelEditor">
486
              <StringArray count="4">
487
                <StringItem index="0" value="Item 1"/>
488
                <StringItem index="1" value="Item 2"/>
489
                <StringItem index="2" value="Item 3"/>
490
                <StringItem index="3" value="Item 4"/>
491
              </StringArray>
492
            </Property>
493
            <Property name="selectionMode" type="int" value="0"/>
494
          </Properties>
495
        </Component>
496
      </SubComponents>
497
    </Container>
498
    <Component class="javax.swing.JButton" name="visUpButton">
499
      <Properties>
500
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
501
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_gen_MembersOrederUp" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
502
        </Property>
503
      </Properties>
504
      <Events>
505
        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="visUpButtonActionPerformed"/>
506
      </Events>
507
    </Component>
508
    <Component class="javax.swing.JButton" name="visDownButton">
509
      <Properties>
510
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
511
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_gen_MembersOrederDown" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
512
        </Property>
513
      </Properties>
514
      <Events>
515
        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="visDownButtonActionPerformed"/>
516
      </Events>
517
    </Component>
518
    <Component class="javax.swing.JSeparator" name="jSeparator2">
519
    </Component>
520
    <Component class="javax.swing.JLabel" name="insertionPointLabel">
521
      <Properties>
522
        <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
523
          <ComponentRef name="insertionPointComboBox"/>
524
        </Property>
525
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
526
          <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_gen_InsertionPoint" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
527
        </Property>
528
      </Properties>
529
    </Component>
530
    <Component class="javax.swing.JComboBox" name="insertionPointComboBox">
531
      <Properties>
532
        <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
533
          <StringArray count="4">
534
            <StringItem index="0" value="Item 1"/>
535
            <StringItem index="1" value="Item 2"/>
536
            <StringItem index="2" value="Item 3"/>
537
            <StringItem index="3" value="Item 4"/>
538
          </StringArray>
539
        </Property>
540
      </Properties>
541
    </Component>
412
  </SubComponents>
542
  </SubComponents>
413
</Form>
543
</Form>
(-)a/java.source/src/org/netbeans/modules/java/ui/FmtCodeGeneration.java (-188 / +601 lines)
Lines 44-66 Link Here
44
44
45
package org.netbeans.modules.java.ui;
45
package org.netbeans.modules.java.ui;
46
46
47
import java.awt.Rectangle;
48
import java.util.ArrayList;
49
import java.util.Collections;
50
import java.util.EnumSet;
51
import java.util.List;
52
import java.util.prefs.Preferences;
53
54
import javax.lang.model.element.ElementKind;
55
import javax.lang.model.element.Modifier;
56
import javax.swing.DefaultListModel;
57
import javax.swing.JEditorPane;
58
import javax.swing.JList;
59
import javax.swing.JPanel;
60
import javax.swing.event.ListSelectionEvent;
61
import javax.swing.event.ListSelectionListener;
62
import javax.swing.text.BadLocationException;
63
import javax.swing.text.Document;
64
65
import com.sun.source.tree.AssignmentTree;
66
import com.sun.source.tree.BlockTree;
67
import com.sun.source.tree.ClassTree;
68
import com.sun.source.tree.CompilationUnitTree;
69
import com.sun.source.tree.ExpressionTree;
70
import com.sun.source.tree.IdentifierTree;
71
import com.sun.source.tree.ModifiersTree;
72
import com.sun.source.tree.NewClassTree;
73
import com.sun.source.tree.Tree;
74
import com.sun.source.tree.TypeParameterTree;
75
import com.sun.source.tree.VariableTree;
76
77
import org.netbeans.api.java.source.CodeStyle;
78
import org.netbeans.api.java.source.GeneratorUtilities;
79
import org.netbeans.api.java.source.JavaSource.Phase;
80
import org.netbeans.api.java.source.ModificationResult;
81
import org.netbeans.api.java.source.TreeMaker;
82
import org.netbeans.api.java.source.WorkingCopy;
83
import org.netbeans.editor.BaseDocument;
84
import org.netbeans.modules.editor.indent.api.Reformat;
47
import static org.netbeans.modules.java.ui.FmtOptions.*;
85
import static org.netbeans.modules.java.ui.FmtOptions.*;
86
import org.netbeans.modules.java.ui.FmtOptions.CategorySupport;
48
import static org.netbeans.modules.java.ui.FmtOptions.CategorySupport.OPTION_ID;
87
import static org.netbeans.modules.java.ui.FmtOptions.CategorySupport.OPTION_ID;
49
import org.netbeans.modules.java.ui.FmtOptions.CategorySupport;
50
import org.netbeans.modules.options.editor.spi.PreferencesCustomizer;
88
import org.netbeans.modules.options.editor.spi.PreferencesCustomizer;
89
import org.netbeans.modules.parsing.api.ResultIterator;
90
import org.netbeans.modules.parsing.api.Source;
91
import org.netbeans.modules.parsing.api.UserTask;
92
import org.openide.cookies.SaveCookie;
93
import org.openide.filesystems.FileObject;
94
import org.openide.filesystems.FileUtil;
95
import org.openide.loaders.DataObject;
96
import org.openide.util.NbBundle;
51
97
52
98
53
/**
99
/**
54
 *
100
 *
55
 * @author  phrebejk
101
 * @author Petr Hrebejk, Dusan Balek
56
 */
102
 */
57
public class FmtCodeGeneration extends javax.swing.JPanel {
103
public class FmtCodeGeneration extends javax.swing.JPanel implements Runnable, ListSelectionListener {
58
    
104
    
59
    /** Creates new form FmtCodeGeneration */
105
    /** Creates new form FmtCodeGeneration */
60
    public FmtCodeGeneration() {
106
    public FmtCodeGeneration() {
61
        initComponents();
107
        initComponents();
62
        
108
        
63
        preferLongerNamesCheckBox.putClientProperty(OPTION_ID, preferLongerNames);
109
        preferLongerNamesCheckBox.putClientProperty(OPTION_ID, preferLongerNames);
110
        isForBooleanGettersCheckBox.putClientProperty(OPTION_ID, useIsForBooleanGetters);
64
        fieldPrefixField.putClientProperty(OPTION_ID, fieldNamePrefix);
111
        fieldPrefixField.putClientProperty(OPTION_ID, fieldNamePrefix);
65
        fieldSuffixField.putClientProperty(OPTION_ID, fieldNameSuffix);
112
        fieldSuffixField.putClientProperty(OPTION_ID, fieldNameSuffix);
66
        staticFieldPrefixField.putClientProperty(OPTION_ID, staticFieldNamePrefix);
113
        staticFieldPrefixField.putClientProperty(OPTION_ID, staticFieldNamePrefix);
Lines 70-87 Link Here
70
        localVarPrefixField.putClientProperty(OPTION_ID, localVarNamePrefix);
117
        localVarPrefixField.putClientProperty(OPTION_ID, localVarNamePrefix);
71
        localVarSuffixField.putClientProperty(OPTION_ID, localVarNameSuffix);
118
        localVarSuffixField.putClientProperty(OPTION_ID, localVarNameSuffix);
72
        qualifyFieldAccessCheckBox.putClientProperty(OPTION_ID, qualifyFieldAccess);
119
        qualifyFieldAccessCheckBox.putClientProperty(OPTION_ID, qualifyFieldAccess);
73
        isForBooleanGettersCheckBox.putClientProperty(OPTION_ID, useIsForBooleanGetters);
74
        addOverrideAnnortationCheckBox.putClientProperty(OPTION_ID, addOverrideAnnotation);
120
        addOverrideAnnortationCheckBox.putClientProperty(OPTION_ID, addOverrideAnnotation);
75
        parametersFinalCheckBox.putClientProperty(OPTION_ID, makeParametersFinal);
121
        parametersFinalCheckBox.putClientProperty(OPTION_ID, makeParametersFinal);
76
        localVarsFinalCheckBox.putClientProperty(OPTION_ID, makeLocalVarsFinal);
122
        localVarsFinalCheckBox.putClientProperty(OPTION_ID, makeLocalVarsFinal);
77
        // importsOrderList.putClientProperty(OPTION_ID, importsOrder); XXX
123
        membersOrderList.putClientProperty(OPTION_ID, classMembersOrder);
78
        
124
        sortByVisibilityCheckBox.putClientProperty(OPTION_ID, sortMembersByVisibility);
125
        visibilityOrderList.putClientProperty(OPTION_ID, visibilityOrder);
126
        insertionPointComboBox.putClientProperty(OPTION_ID, classMemberInsertionPoint);
79
    }
127
    }
80
    
128
    
81
    public static PreferencesCustomizer.Factory getController() {
129
    public static PreferencesCustomizer.Factory getController() {
82
        return new CategorySupport.Factory("code-generation", FmtCodeGeneration.class, null);
130
        return new PreferencesCustomizer.Factory() {
131
            public PreferencesCustomizer create(Preferences preferences) {
132
                CodeGenCategorySupport support = new CodeGenCategorySupport(preferences, new FmtCodeGeneration());
133
                ((Runnable)support.panel).run();
134
                return support;
135
            }
136
        };
83
    }
137
    }
84
    
138
    
139
    @Override
140
    public void run() {
141
        membersOrderList.setSelectedIndex(0);
142
        membersOrderList.addListSelectionListener(this);
143
        enableMembersOrderButtons();
144
        visibilityOrderList.setSelectedIndex(0);
145
        visibilityOrderList.addListSelectionListener(this);
146
        enableVisibilityOrder();
147
        namingConventionsLabel.setVisible(false);
148
        preferLongerNamesCheckBox.setVisible(false);
149
        isForBooleanGettersCheckBox.setVisible(false);
150
        prefixLabel.setVisible(false);
151
        suffixLabel.setVisible(false);
152
        fieldLabel.setVisible(false);
153
        fieldPrefixField.setVisible(false);
154
        fieldSuffixField.setVisible(false);
155
        staticFieldLabel.setVisible(false);
156
        staticFieldPrefixField.setVisible(false);
157
        staticFieldSuffixField.setVisible(false);
158
        parameterLabel.setVisible(false);
159
        parameterPrefixField.setVisible(false);
160
        parameterSuffixField.setVisible(false);
161
        localVarLabel.setVisible(false);
162
        localVarPrefixField.setVisible(false);
163
        localVarSuffixField.setVisible(false);
164
        jSeparator1.setVisible(false);
165
        otherLabel.setVisible(false);
166
        qualifyFieldAccessCheckBox.setVisible(false);
167
        addOverrideAnnortationCheckBox.setVisible(false);
168
        parametersFinalCheckBox.setVisible(false);
169
        localVarsFinalCheckBox.setVisible(false);
170
        jSeparator3.setVisible(false);
171
    }
172
    
173
    @Override
174
    public void valueChanged(ListSelectionEvent e) {
175
        if (e.getSource() == membersOrderList)
176
            enableMembersOrderButtons();
177
        else
178
            enableVisibilityOrder();
179
    }
180
85
    /** This method is called from within the constructor to
181
    /** This method is called from within the constructor to
86
     * initialize the form.
182
     * initialize the form.
87
     * WARNING: Do NOT modify this code. The content of this method is
183
     * WARNING: Do NOT modify this code. The content of this method is
Lines 91-98 Link Here
91
    private void initComponents() {
187
    private void initComponents() {
92
        java.awt.GridBagConstraints gridBagConstraints;
188
        java.awt.GridBagConstraints gridBagConstraints;
93
189
94
        preferLongerNamesLabel = new javax.swing.JLabel();
190
        namingConventionsLabel = new javax.swing.JLabel();
95
        preferLongerNamesCheckBox = new javax.swing.JCheckBox();
191
        preferLongerNamesCheckBox = new javax.swing.JCheckBox();
192
        isForBooleanGettersCheckBox = new javax.swing.JCheckBox();
193
        jPanel1 = new javax.swing.JPanel();
96
        prefixLabel = new javax.swing.JLabel();
194
        prefixLabel = new javax.swing.JLabel();
97
        suffixLabel = new javax.swing.JLabel();
195
        suffixLabel = new javax.swing.JLabel();
98
        fieldLabel = new javax.swing.JLabel();
196
        fieldLabel = new javax.swing.JLabel();
Lines 105-399 Link Here
105
        parameterPrefixField = new javax.swing.JTextField();
203
        parameterPrefixField = new javax.swing.JTextField();
106
        parameterSuffixField = new javax.swing.JTextField();
204
        parameterSuffixField = new javax.swing.JTextField();
107
        localVarLabel = new javax.swing.JLabel();
205
        localVarLabel = new javax.swing.JLabel();
206
        localVarSuffixField = new javax.swing.JTextField();
108
        localVarPrefixField = new javax.swing.JTextField();
207
        localVarPrefixField = new javax.swing.JTextField();
109
        localVarSuffixField = new javax.swing.JTextField();
208
        jSeparator1 = new javax.swing.JSeparator();
110
        miscLabel = new javax.swing.JLabel();
209
        otherLabel = new javax.swing.JLabel();
111
        qualifyFieldAccessCheckBox = new javax.swing.JCheckBox();
210
        qualifyFieldAccessCheckBox = new javax.swing.JCheckBox();
112
        isForBooleanGettersCheckBox = new javax.swing.JCheckBox();
113
        addOverrideAnnortationCheckBox = new javax.swing.JCheckBox();
211
        addOverrideAnnortationCheckBox = new javax.swing.JCheckBox();
114
        finalLabel = new javax.swing.JLabel();
115
        parametersFinalCheckBox = new javax.swing.JCheckBox();
212
        parametersFinalCheckBox = new javax.swing.JCheckBox();
116
        localVarsFinalCheckBox = new javax.swing.JCheckBox();
213
        localVarsFinalCheckBox = new javax.swing.JCheckBox();
117
        jLabel10 = new javax.swing.JLabel();
214
        memberOrderLabel = new javax.swing.JLabel();
118
        jPanel1 = new javax.swing.JPanel();
119
        jScrollPane1 = new javax.swing.JScrollPane();
215
        jScrollPane1 = new javax.swing.JScrollPane();
120
        importsOrderList = new javax.swing.JList();
216
        membersOrderList = new javax.swing.JList();
121
        importUpButton = new javax.swing.JButton();
217
        upButton = new javax.swing.JButton();
122
        importDownButton = new javax.swing.JButton();
218
        downButton = new javax.swing.JButton();
219
        jSeparator3 = new javax.swing.JSeparator();
220
        sortByVisibilityCheckBox = new javax.swing.JCheckBox();
221
        jScrollPane2 = new javax.swing.JScrollPane();
222
        visibilityOrderList = new javax.swing.JList();
223
        visUpButton = new javax.swing.JButton();
224
        visDownButton = new javax.swing.JButton();
225
        jSeparator2 = new javax.swing.JSeparator();
226
        insertionPointLabel = new javax.swing.JLabel();
227
        insertionPointComboBox = new javax.swing.JComboBox();
123
228
124
        setName(org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_CodeGeneration")); // NOI18N
229
        setName(org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_CodeGeneration")); // NOI18N
125
        setOpaque(false);
230
        setOpaque(false);
126
        setLayout(new java.awt.GridBagLayout());
127
231
128
        org.openide.awt.Mnemonics.setLocalizedText(preferLongerNamesLabel, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_Naming")); // NOI18N
232
        org.openide.awt.Mnemonics.setLocalizedText(namingConventionsLabel, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_gen_Naming")); // NOI18N
129
        gridBagConstraints = new java.awt.GridBagConstraints();
130
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
131
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 4, 0);
132
        add(preferLongerNamesLabel, gridBagConstraints);
133
233
134
        org.openide.awt.Mnemonics.setLocalizedText(preferLongerNamesCheckBox, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_PreferLongerNames")); // NOI18N
234
        org.openide.awt.Mnemonics.setLocalizedText(preferLongerNamesCheckBox, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_gen_PreferLongerNames")); // NOI18N
135
        preferLongerNamesCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
235
        preferLongerNamesCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
136
        preferLongerNamesCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
236
        preferLongerNamesCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
137
        preferLongerNamesCheckBox.setOpaque(false);
237
        preferLongerNamesCheckBox.setOpaque(false);
138
        gridBagConstraints = new java.awt.GridBagConstraints();
139
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
140
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
141
        gridBagConstraints.weightx = 1.0;
142
        gridBagConstraints.insets = new java.awt.Insets(0, 8, 4, 0);
143
        add(preferLongerNamesCheckBox, gridBagConstraints);
144
238
145
        org.openide.awt.Mnemonics.setLocalizedText(prefixLabel, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_Prefix")); // NOI18N
239
        org.openide.awt.Mnemonics.setLocalizedText(isForBooleanGettersCheckBox, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_gen_UseIsForBooleanGetters")); // NOI18N
240
        isForBooleanGettersCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
241
        isForBooleanGettersCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
242
        isForBooleanGettersCheckBox.setOpaque(false);
243
244
        jPanel1.setLayout(new java.awt.GridBagLayout());
245
246
        org.openide.awt.Mnemonics.setLocalizedText(prefixLabel, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_gen_Prefix")); // NOI18N
146
        gridBagConstraints = new java.awt.GridBagConstraints();
247
        gridBagConstraints = new java.awt.GridBagConstraints();
147
        gridBagConstraints.gridx = 1;
248
        gridBagConstraints.gridx = 1;
148
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
249
        gridBagConstraints.gridy = 0;
250
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
251
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
252
        gridBagConstraints.weightx = 0.5;
149
        gridBagConstraints.insets = new java.awt.Insets(0, 8, 4, 0);
253
        gridBagConstraints.insets = new java.awt.Insets(0, 8, 4, 0);
150
        add(prefixLabel, gridBagConstraints);
254
        jPanel1.add(prefixLabel, gridBagConstraints);
151
255
152
        org.openide.awt.Mnemonics.setLocalizedText(suffixLabel, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_Suffix")); // NOI18N
256
        org.openide.awt.Mnemonics.setLocalizedText(suffixLabel, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_gen_Suffix")); // NOI18N
153
        gridBagConstraints = new java.awt.GridBagConstraints();
257
        gridBagConstraints = new java.awt.GridBagConstraints();
154
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
258
        gridBagConstraints.gridx = 2;
155
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
259
        gridBagConstraints.gridy = 0;
260
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
261
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
262
        gridBagConstraints.weightx = 0.5;
156
        gridBagConstraints.insets = new java.awt.Insets(0, 8, 4, 0);
263
        gridBagConstraints.insets = new java.awt.Insets(0, 8, 4, 0);
157
        add(suffixLabel, gridBagConstraints);
264
        jPanel1.add(suffixLabel, gridBagConstraints);
158
265
159
        org.openide.awt.Mnemonics.setLocalizedText(fieldLabel, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_Field")); // NOI18N
266
        org.openide.awt.Mnemonics.setLocalizedText(fieldLabel, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_gen_Field")); // NOI18N
160
        gridBagConstraints = new java.awt.GridBagConstraints();
267
        gridBagConstraints = new java.awt.GridBagConstraints();
161
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
268
        gridBagConstraints.gridx = 0;
162
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 4, 0);
269
        gridBagConstraints.gridy = 1;
163
        add(fieldLabel, gridBagConstraints);
270
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
271
        jPanel1.add(fieldLabel, gridBagConstraints);
164
272
165
        fieldPrefixField.setColumns(5);
273
        fieldPrefixField.setColumns(5);
166
        gridBagConstraints = new java.awt.GridBagConstraints();
274
        gridBagConstraints = new java.awt.GridBagConstraints();
275
        gridBagConstraints.gridx = 1;
276
        gridBagConstraints.gridy = 1;
167
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
277
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
168
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
278
        gridBagConstraints.weightx = 0.5;
169
        gridBagConstraints.weightx = 1.0;
279
        gridBagConstraints.insets = new java.awt.Insets(4, 8, 4, 0);
170
        gridBagConstraints.insets = new java.awt.Insets(0, 8, 4, 0);
280
        jPanel1.add(fieldPrefixField, gridBagConstraints);
171
        add(fieldPrefixField, gridBagConstraints);
172
281
173
        fieldSuffixField.setColumns(5);
282
        fieldSuffixField.setColumns(5);
174
        gridBagConstraints = new java.awt.GridBagConstraints();
283
        gridBagConstraints = new java.awt.GridBagConstraints();
175
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
284
        gridBagConstraints.gridx = 2;
285
        gridBagConstraints.gridy = 1;
176
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
286
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
177
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
287
        gridBagConstraints.weightx = 0.5;
178
        gridBagConstraints.weightx = 1.0;
288
        gridBagConstraints.insets = new java.awt.Insets(4, 8, 4, 0);
179
        gridBagConstraints.insets = new java.awt.Insets(0, 8, 4, 0);
289
        jPanel1.add(fieldSuffixField, gridBagConstraints);
180
        add(fieldSuffixField, gridBagConstraints);
181
290
182
        org.openide.awt.Mnemonics.setLocalizedText(staticFieldLabel, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_StaticField")); // NOI18N
291
        org.openide.awt.Mnemonics.setLocalizedText(staticFieldLabel, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_gen_StaticField")); // NOI18N
183
        gridBagConstraints = new java.awt.GridBagConstraints();
292
        gridBagConstraints = new java.awt.GridBagConstraints();
184
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
293
        gridBagConstraints.gridx = 0;
185
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 4, 0);
294
        gridBagConstraints.gridy = 2;
186
        add(staticFieldLabel, gridBagConstraints);
295
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
296
        jPanel1.add(staticFieldLabel, gridBagConstraints);
187
297
188
        staticFieldPrefixField.setColumns(5);
298
        staticFieldPrefixField.setColumns(5);
189
        gridBagConstraints = new java.awt.GridBagConstraints();
299
        gridBagConstraints = new java.awt.GridBagConstraints();
300
        gridBagConstraints.gridx = 1;
301
        gridBagConstraints.gridy = 2;
190
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
302
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
191
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
303
        gridBagConstraints.weightx = 0.5;
192
        gridBagConstraints.weightx = 1.0;
304
        gridBagConstraints.insets = new java.awt.Insets(4, 8, 4, 0);
193
        gridBagConstraints.insets = new java.awt.Insets(0, 8, 4, 0);
305
        jPanel1.add(staticFieldPrefixField, gridBagConstraints);
194
        add(staticFieldPrefixField, gridBagConstraints);
195
306
196
        staticFieldSuffixField.setColumns(5);
307
        staticFieldSuffixField.setColumns(5);
197
        gridBagConstraints = new java.awt.GridBagConstraints();
308
        gridBagConstraints = new java.awt.GridBagConstraints();
198
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
309
        gridBagConstraints.gridx = 2;
310
        gridBagConstraints.gridy = 2;
199
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
311
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
200
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
312
        gridBagConstraints.weightx = 0.5;
201
        gridBagConstraints.weightx = 1.0;
313
        gridBagConstraints.insets = new java.awt.Insets(4, 8, 4, 0);
202
        gridBagConstraints.insets = new java.awt.Insets(0, 8, 4, 0);
314
        jPanel1.add(staticFieldSuffixField, gridBagConstraints);
203
        add(staticFieldSuffixField, gridBagConstraints);
204
315
205
        org.openide.awt.Mnemonics.setLocalizedText(parameterLabel, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_Parameter")); // NOI18N
316
        org.openide.awt.Mnemonics.setLocalizedText(parameterLabel, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_gen_Parameter")); // NOI18N
206
        gridBagConstraints = new java.awt.GridBagConstraints();
317
        gridBagConstraints = new java.awt.GridBagConstraints();
207
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
318
        gridBagConstraints.gridx = 0;
208
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 4, 0);
319
        gridBagConstraints.gridy = 3;
209
        add(parameterLabel, gridBagConstraints);
320
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
321
        jPanel1.add(parameterLabel, gridBagConstraints);
210
322
211
        parameterPrefixField.setColumns(5);
323
        parameterPrefixField.setColumns(5);
212
        gridBagConstraints = new java.awt.GridBagConstraints();
324
        gridBagConstraints = new java.awt.GridBagConstraints();
325
        gridBagConstraints.gridx = 1;
326
        gridBagConstraints.gridy = 3;
213
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
327
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
214
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
328
        gridBagConstraints.weightx = 0.5;
215
        gridBagConstraints.weightx = 1.0;
329
        gridBagConstraints.insets = new java.awt.Insets(4, 8, 4, 0);
216
        gridBagConstraints.insets = new java.awt.Insets(0, 8, 4, 0);
330
        jPanel1.add(parameterPrefixField, gridBagConstraints);
217
        add(parameterPrefixField, gridBagConstraints);
218
331
219
        parameterSuffixField.setColumns(5);
332
        parameterSuffixField.setColumns(5);
220
        gridBagConstraints = new java.awt.GridBagConstraints();
333
        gridBagConstraints = new java.awt.GridBagConstraints();
221
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
334
        gridBagConstraints.gridx = 2;
335
        gridBagConstraints.gridy = 3;
222
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
336
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
223
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
337
        gridBagConstraints.weightx = 0.5;
224
        gridBagConstraints.weightx = 1.0;
338
        gridBagConstraints.insets = new java.awt.Insets(4, 8, 4, 0);
225
        gridBagConstraints.insets = new java.awt.Insets(0, 8, 4, 0);
339
        jPanel1.add(parameterSuffixField, gridBagConstraints);
226
        add(parameterSuffixField, gridBagConstraints);
227
340
228
        org.openide.awt.Mnemonics.setLocalizedText(localVarLabel, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_LocalVariable")); // NOI18N
341
        org.openide.awt.Mnemonics.setLocalizedText(localVarLabel, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_gen_LocalVariable")); // NOI18N
229
        gridBagConstraints = new java.awt.GridBagConstraints();
342
        gridBagConstraints = new java.awt.GridBagConstraints();
230
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
343
        gridBagConstraints.gridx = 0;
231
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 9, 0);
344
        gridBagConstraints.gridy = 4;
232
        add(localVarLabel, gridBagConstraints);
345
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
346
        gridBagConstraints.insets = new java.awt.Insets(4, 0, 0, 0);
347
        jPanel1.add(localVarLabel, gridBagConstraints);
348
349
        localVarSuffixField.setColumns(5);
350
        gridBagConstraints = new java.awt.GridBagConstraints();
351
        gridBagConstraints.gridx = 1;
352
        gridBagConstraints.gridy = 4;
353
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
354
        gridBagConstraints.weightx = 0.5;
355
        gridBagConstraints.insets = new java.awt.Insets(4, 8, 0, 0);
356
        jPanel1.add(localVarSuffixField, gridBagConstraints);
233
357
234
        localVarPrefixField.setColumns(5);
358
        localVarPrefixField.setColumns(5);
235
        gridBagConstraints = new java.awt.GridBagConstraints();
359
        gridBagConstraints = new java.awt.GridBagConstraints();
360
        gridBagConstraints.gridx = 2;
361
        gridBagConstraints.gridy = 4;
236
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
362
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
237
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
363
        gridBagConstraints.weightx = 0.5;
238
        gridBagConstraints.weightx = 1.0;
364
        gridBagConstraints.insets = new java.awt.Insets(4, 8, 0, 0);
239
        gridBagConstraints.insets = new java.awt.Insets(0, 8, 9, 0);
365
        jPanel1.add(localVarPrefixField, gridBagConstraints);
240
        add(localVarPrefixField, gridBagConstraints);
241
366
242
        localVarSuffixField.setColumns(5);
367
        org.openide.awt.Mnemonics.setLocalizedText(otherLabel, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_gen_Other")); // NOI18N
243
        gridBagConstraints = new java.awt.GridBagConstraints();
244
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
245
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
246
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
247
        gridBagConstraints.weightx = 1.0;
248
        gridBagConstraints.insets = new java.awt.Insets(0, 8, 9, 0);
249
        add(localVarSuffixField, gridBagConstraints);
250
368
251
        org.openide.awt.Mnemonics.setLocalizedText(miscLabel, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_Misc")); // NOI18N
369
        org.openide.awt.Mnemonics.setLocalizedText(qualifyFieldAccessCheckBox, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_gen_QualifyFieldAccess")); // NOI18N
252
        gridBagConstraints = new java.awt.GridBagConstraints();
253
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
254
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 4, 0);
255
        add(miscLabel, gridBagConstraints);
256
257
        org.openide.awt.Mnemonics.setLocalizedText(qualifyFieldAccessCheckBox, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_QualifyFieldAccess")); // NOI18N
258
        qualifyFieldAccessCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
370
        qualifyFieldAccessCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
259
        qualifyFieldAccessCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
371
        qualifyFieldAccessCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
260
        qualifyFieldAccessCheckBox.setOpaque(false);
372
        qualifyFieldAccessCheckBox.setOpaque(false);
261
        gridBagConstraints = new java.awt.GridBagConstraints();
262
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
263
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
264
        gridBagConstraints.insets = new java.awt.Insets(0, 8, 4, 0);
265
        add(qualifyFieldAccessCheckBox, gridBagConstraints);
266
373
267
        org.openide.awt.Mnemonics.setLocalizedText(isForBooleanGettersCheckBox, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_UseIsForBooleanGetters")); // NOI18N
374
        org.openide.awt.Mnemonics.setLocalizedText(addOverrideAnnortationCheckBox, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_gen_AddOverrideAnnotation")); // NOI18N
268
        isForBooleanGettersCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
269
        isForBooleanGettersCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
270
        isForBooleanGettersCheckBox.setOpaque(false);
271
        gridBagConstraints = new java.awt.GridBagConstraints();
272
        gridBagConstraints.gridx = 1;
273
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
274
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
275
        gridBagConstraints.insets = new java.awt.Insets(0, 8, 4, 0);
276
        add(isForBooleanGettersCheckBox, gridBagConstraints);
277
278
        org.openide.awt.Mnemonics.setLocalizedText(addOverrideAnnortationCheckBox, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_AddOverrideAnnotation")); // NOI18N
279
        addOverrideAnnortationCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
375
        addOverrideAnnortationCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
280
        addOverrideAnnortationCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
376
        addOverrideAnnortationCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
281
        addOverrideAnnortationCheckBox.setOpaque(false);
377
        addOverrideAnnortationCheckBox.setOpaque(false);
282
        gridBagConstraints = new java.awt.GridBagConstraints();
283
        gridBagConstraints.gridx = 1;
284
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
285
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
286
        gridBagConstraints.insets = new java.awt.Insets(0, 8, 8, 0);
287
        add(addOverrideAnnortationCheckBox, gridBagConstraints);
288
378
289
        org.openide.awt.Mnemonics.setLocalizedText(finalLabel, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_FinalMofier")); // NOI18N
379
        org.openide.awt.Mnemonics.setLocalizedText(parametersFinalCheckBox, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_gen_ParametersFinal")); // NOI18N
290
        gridBagConstraints = new java.awt.GridBagConstraints();
291
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
292
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 4, 0);
293
        add(finalLabel, gridBagConstraints);
294
295
        org.openide.awt.Mnemonics.setLocalizedText(parametersFinalCheckBox, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_ParametersFinal")); // NOI18N
296
        parametersFinalCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
380
        parametersFinalCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
297
        parametersFinalCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
381
        parametersFinalCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
298
        parametersFinalCheckBox.setOpaque(false);
382
        parametersFinalCheckBox.setOpaque(false);
299
        gridBagConstraints = new java.awt.GridBagConstraints();
300
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
301
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
302
        gridBagConstraints.insets = new java.awt.Insets(0, 8, 4, 0);
303
        add(parametersFinalCheckBox, gridBagConstraints);
304
383
305
        org.openide.awt.Mnemonics.setLocalizedText(localVarsFinalCheckBox, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_LocalVariablesFinal")); // NOI18N
384
        org.openide.awt.Mnemonics.setLocalizedText(localVarsFinalCheckBox, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_gen_LocalVariablesFinal")); // NOI18N
306
        localVarsFinalCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
385
        localVarsFinalCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
307
        localVarsFinalCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
386
        localVarsFinalCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
308
        localVarsFinalCheckBox.setOpaque(false);
387
        localVarsFinalCheckBox.setOpaque(false);
309
        gridBagConstraints = new java.awt.GridBagConstraints();
310
        gridBagConstraints.gridx = 1;
311
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
312
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
313
        gridBagConstraints.insets = new java.awt.Insets(0, 8, 8, 0);
314
        add(localVarsFinalCheckBox, gridBagConstraints);
315
388
316
        org.openide.awt.Mnemonics.setLocalizedText(jLabel10, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_ImportOredering")); // NOI18N
389
        org.openide.awt.Mnemonics.setLocalizedText(memberOrderLabel, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_gen_MembersOreder")); // NOI18N
317
        gridBagConstraints = new java.awt.GridBagConstraints();
318
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
319
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 4, 0);
320
        add(jLabel10, gridBagConstraints);
321
390
322
        jPanel1.setOpaque(false);
391
        membersOrderList.setModel(new javax.swing.AbstractListModel() {
323
        jPanel1.setLayout(new java.awt.GridBagLayout());
392
            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5", "Item 6", "Item 7", "Item 8", "Item 9" };
324
325
        importsOrderList.setModel(new javax.swing.AbstractListModel() {
326
            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
327
            public int getSize() { return strings.length; }
393
            public int getSize() { return strings.length; }
328
            public Object getElementAt(int i) { return strings[i]; }
394
            public Object getElementAt(int i) { return strings[i]; }
329
        });
395
        });
330
        jScrollPane1.setViewportView(importsOrderList);
396
        membersOrderList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
397
        jScrollPane1.setViewportView(membersOrderList);
331
398
332
        gridBagConstraints = new java.awt.GridBagConstraints();
399
        org.openide.awt.Mnemonics.setLocalizedText(upButton, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_gen_MembersOrederUp")); // NOI18N
333
        gridBagConstraints.gridheight = 2;
400
        upButton.addActionListener(new java.awt.event.ActionListener() {
334
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
401
            public void actionPerformed(java.awt.event.ActionEvent evt) {
335
        gridBagConstraints.weightx = 1.0;
402
                upButtonActionPerformed(evt);
336
        gridBagConstraints.insets = new java.awt.Insets(0, 8, 4, 0);
403
            }
337
        jPanel1.add(jScrollPane1, gridBagConstraints);
404
        });
338
405
339
        org.openide.awt.Mnemonics.setLocalizedText(importUpButton, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_ImportUp")); // NOI18N
406
        org.openide.awt.Mnemonics.setLocalizedText(downButton, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_gen_MembersOrederDown")); // NOI18N
340
        gridBagConstraints = new java.awt.GridBagConstraints();
407
        downButton.addActionListener(new java.awt.event.ActionListener() {
341
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
408
            public void actionPerformed(java.awt.event.ActionEvent evt) {
342
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
409
                downButtonActionPerformed(evt);
343
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
410
            }
344
        gridBagConstraints.insets = new java.awt.Insets(0, 4, 4, 1);
411
        });
345
        jPanel1.add(importUpButton, gridBagConstraints);
346
412
347
        org.openide.awt.Mnemonics.setLocalizedText(importDownButton, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_ImportDown")); // NOI18N
413
        org.openide.awt.Mnemonics.setLocalizedText(sortByVisibilityCheckBox, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_gen_SortByVisibility")); // NOI18N
348
        gridBagConstraints = new java.awt.GridBagConstraints();
414
        sortByVisibilityCheckBox.addActionListener(new java.awt.event.ActionListener() {
349
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
415
            public void actionPerformed(java.awt.event.ActionEvent evt) {
350
        gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
416
                sortByVisibilityCheckBoxActionPerformed(evt);
351
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
417
            }
352
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
418
        });
353
        gridBagConstraints.weighty = 1.0;
354
        gridBagConstraints.insets = new java.awt.Insets(0, 4, 4, 1);
355
        jPanel1.add(importDownButton, gridBagConstraints);
356
419
357
        gridBagConstraints = new java.awt.GridBagConstraints();
420
        visibilityOrderList.setModel(new javax.swing.AbstractListModel() {
358
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
421
            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4" };
359
        gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
422
            public int getSize() { return strings.length; }
360
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
423
            public Object getElementAt(int i) { return strings[i]; }
361
        gridBagConstraints.weightx = 1.0;
424
        });
362
        gridBagConstraints.weighty = 1.0;
425
        visibilityOrderList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
363
        add(jPanel1, gridBagConstraints);
426
        jScrollPane2.setViewportView(visibilityOrderList);
427
428
        org.openide.awt.Mnemonics.setLocalizedText(visUpButton, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_gen_MembersOrederUp")); // NOI18N
429
        visUpButton.addActionListener(new java.awt.event.ActionListener() {
430
            public void actionPerformed(java.awt.event.ActionEvent evt) {
431
                visUpButtonActionPerformed(evt);
432
            }
433
        });
434
435
        org.openide.awt.Mnemonics.setLocalizedText(visDownButton, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_gen_MembersOrederDown")); // NOI18N
436
        visDownButton.addActionListener(new java.awt.event.ActionListener() {
437
            public void actionPerformed(java.awt.event.ActionEvent evt) {
438
                visDownButtonActionPerformed(evt);
439
            }
440
        });
441
442
        insertionPointLabel.setLabelFor(insertionPointComboBox);
443
        org.openide.awt.Mnemonics.setLocalizedText(insertionPointLabel, org.openide.util.NbBundle.getMessage(FmtCodeGeneration.class, "LBL_gen_InsertionPoint")); // NOI18N
444
445
        insertionPointComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
446
447
        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
448
        this.setLayout(layout);
449
        layout.setHorizontalGroup(
450
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
451
            .addComponent(jSeparator1)
452
            .addGroup(layout.createSequentialGroup()
453
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
454
                    .addComponent(otherLabel)
455
                    .addGroup(layout.createSequentialGroup()
456
                        .addContainerGap()
457
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
458
                            .addComponent(qualifyFieldAccessCheckBox)
459
                            .addComponent(addOverrideAnnortationCheckBox)
460
                            .addComponent(parametersFinalCheckBox)
461
                            .addComponent(localVarsFinalCheckBox))))
462
                .addGap(0, 0, Short.MAX_VALUE))
463
            .addComponent(jSeparator3)
464
            .addGroup(layout.createSequentialGroup()
465
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
466
                    .addComponent(namingConventionsLabel)
467
                    .addComponent(memberOrderLabel)
468
                    .addGroup(layout.createSequentialGroup()
469
                        .addContainerGap()
470
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
471
                            .addComponent(isForBooleanGettersCheckBox)
472
                            .addComponent(preferLongerNamesCheckBox)
473
                            .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 274, javax.swing.GroupLayout.PREFERRED_SIZE)
474
                            .addGroup(layout.createSequentialGroup()
475
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
476
                                    .addComponent(jScrollPane1)
477
                                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE))
478
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
479
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
480
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
481
                                        .addComponent(downButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
482
                                        .addComponent(upButton, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE))
483
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
484
                                        .addComponent(visDownButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
485
                                        .addComponent(visUpButton, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE))))))
486
                    .addComponent(sortByVisibilityCheckBox)
487
                    .addGroup(layout.createSequentialGroup()
488
                        .addGap(5, 5, 5)
489
                        .addComponent(insertionPointLabel)
490
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
491
                        .addComponent(insertionPointComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
492
                .addContainerGap())
493
            .addComponent(jSeparator2, javax.swing.GroupLayout.Alignment.TRAILING)
494
        );
495
        layout.setVerticalGroup(
496
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
497
            .addGroup(layout.createSequentialGroup()
498
                .addComponent(namingConventionsLabel)
499
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
500
                .addComponent(preferLongerNamesCheckBox)
501
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
502
                .addComponent(isForBooleanGettersCheckBox)
503
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
504
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
505
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
506
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
507
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
508
                .addComponent(otherLabel)
509
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
510
                .addComponent(qualifyFieldAccessCheckBox)
511
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
512
                .addComponent(addOverrideAnnortationCheckBox)
513
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
514
                .addComponent(parametersFinalCheckBox)
515
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
516
                .addComponent(localVarsFinalCheckBox)
517
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
518
                .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
519
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
520
                .addComponent(memberOrderLabel)
521
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
522
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
523
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE)
524
                    .addGroup(layout.createSequentialGroup()
525
                        .addComponent(upButton)
526
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
527
                        .addComponent(downButton)))
528
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
529
                .addComponent(sortByVisibilityCheckBox)
530
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
531
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
532
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)
533
                    .addGroup(layout.createSequentialGroup()
534
                        .addComponent(visUpButton)
535
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
536
                        .addComponent(visDownButton)))
537
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
538
                .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
539
                .addGap(10, 10, 10)
540
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
541
                    .addComponent(insertionPointLabel)
542
                    .addComponent(insertionPointComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
543
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
544
        );
364
    }// </editor-fold>//GEN-END:initComponents
545
    }// </editor-fold>//GEN-END:initComponents
546
547
    private void upButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_upButtonActionPerformed
548
        int idx = membersOrderList.getSelectedIndex();
549
        if (idx > 0) {
550
            Object val = membersOrderList.getModel().getElementAt(idx);
551
            ((DefaultListModel)membersOrderList.getModel()).removeElementAt(idx);
552
            ((DefaultListModel)membersOrderList.getModel()).insertElementAt(val, idx - 1);
553
            membersOrderList.setSelectedIndex(idx - 1);
554
        }
555
    }//GEN-LAST:event_upButtonActionPerformed
556
557
    private void downButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_downButtonActionPerformed
558
        int idx = membersOrderList.getSelectedIndex();
559
        if (idx >= 0 && idx < membersOrderList.getModel().getSize() - 1) {
560
            Object val = membersOrderList.getModel().getElementAt(idx);
561
            ((DefaultListModel)membersOrderList.getModel()).removeElementAt(idx);
562
            ((DefaultListModel)membersOrderList.getModel()).insertElementAt(val, idx + 1);
563
            membersOrderList.setSelectedIndex(idx + 1);
564
        }
565
    }//GEN-LAST:event_downButtonActionPerformed
566
567
    private void visUpButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_visUpButtonActionPerformed
568
        int idx = visibilityOrderList.getSelectedIndex();
569
        if (idx > 0) {
570
            Object val = visibilityOrderList.getModel().getElementAt(idx);
571
            ((DefaultListModel)visibilityOrderList.getModel()).removeElementAt(idx);
572
            ((DefaultListModel)visibilityOrderList.getModel()).insertElementAt(val, idx - 1);
573
            visibilityOrderList.setSelectedIndex(idx - 1);
574
        }
575
    }//GEN-LAST:event_visUpButtonActionPerformed
576
577
    private void visDownButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_visDownButtonActionPerformed
578
        int idx = visibilityOrderList.getSelectedIndex();
579
        if (idx >= 0 && idx < visibilityOrderList.getModel().getSize() - 1) {
580
            Object val = visibilityOrderList.getModel().getElementAt(idx);
581
            ((DefaultListModel)visibilityOrderList.getModel()).removeElementAt(idx);
582
            ((DefaultListModel)visibilityOrderList.getModel()).insertElementAt(val, idx + 1);
583
            visibilityOrderList.setSelectedIndex(idx + 1);
584
        }
585
    }//GEN-LAST:event_visDownButtonActionPerformed
586
587
    private void sortByVisibilityCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sortByVisibilityCheckBoxActionPerformed
588
        enableVisibilityOrder();
589
    }//GEN-LAST:event_sortByVisibilityCheckBoxActionPerformed
365
    
590
    
591
    private void enableMembersOrderButtons() {
592
        int idx = membersOrderList.getSelectedIndex();                
593
        upButton.setEnabled(idx > 0);
594
        downButton.setEnabled(idx >= 0 && idx < membersOrderList.getModel().getSize() - 1);
595
    }
596
    
597
    private void enableVisibilityOrder() {
598
        int idx = visibilityOrderList.getSelectedIndex();
599
        boolean b = sortByVisibilityCheckBox.isSelected();
600
        visibilityOrderList.setEnabled(b);
601
        visUpButton.setEnabled(b && idx > 0);
602
        visDownButton.setEnabled(b && idx >= 0 && idx < visibilityOrderList.getModel().getSize() - 1);
603
    }
366
    
604
    
367
    // Variables declaration - do not modify//GEN-BEGIN:variables
605
    // Variables declaration - do not modify//GEN-BEGIN:variables
368
    private javax.swing.JCheckBox addOverrideAnnortationCheckBox;
606
    private javax.swing.JCheckBox addOverrideAnnortationCheckBox;
607
    private javax.swing.JButton downButton;
369
    private javax.swing.JLabel fieldLabel;
608
    private javax.swing.JLabel fieldLabel;
370
    private javax.swing.JTextField fieldPrefixField;
609
    private javax.swing.JTextField fieldPrefixField;
371
    private javax.swing.JTextField fieldSuffixField;
610
    private javax.swing.JTextField fieldSuffixField;
372
    private javax.swing.JLabel finalLabel;
611
    private javax.swing.JComboBox insertionPointComboBox;
373
    private javax.swing.JButton importDownButton;
612
    private javax.swing.JLabel insertionPointLabel;
374
    private javax.swing.JButton importUpButton;
375
    private javax.swing.JList importsOrderList;
376
    private javax.swing.JCheckBox isForBooleanGettersCheckBox;
613
    private javax.swing.JCheckBox isForBooleanGettersCheckBox;
377
    private javax.swing.JLabel jLabel10;
378
    private javax.swing.JPanel jPanel1;
614
    private javax.swing.JPanel jPanel1;
379
    private javax.swing.JScrollPane jScrollPane1;
615
    private javax.swing.JScrollPane jScrollPane1;
616
    private javax.swing.JScrollPane jScrollPane2;
617
    private javax.swing.JSeparator jSeparator1;
618
    private javax.swing.JSeparator jSeparator2;
619
    private javax.swing.JSeparator jSeparator3;
380
    private javax.swing.JLabel localVarLabel;
620
    private javax.swing.JLabel localVarLabel;
381
    private javax.swing.JTextField localVarPrefixField;
621
    private javax.swing.JTextField localVarPrefixField;
382
    private javax.swing.JTextField localVarSuffixField;
622
    private javax.swing.JTextField localVarSuffixField;
383
    private javax.swing.JCheckBox localVarsFinalCheckBox;
623
    private javax.swing.JCheckBox localVarsFinalCheckBox;
384
    private javax.swing.JLabel miscLabel;
624
    private javax.swing.JLabel memberOrderLabel;
625
    private javax.swing.JList membersOrderList;
626
    private javax.swing.JLabel namingConventionsLabel;
627
    private javax.swing.JLabel otherLabel;
385
    private javax.swing.JLabel parameterLabel;
628
    private javax.swing.JLabel parameterLabel;
386
    private javax.swing.JTextField parameterPrefixField;
629
    private javax.swing.JTextField parameterPrefixField;
387
    private javax.swing.JTextField parameterSuffixField;
630
    private javax.swing.JTextField parameterSuffixField;
388
    private javax.swing.JCheckBox parametersFinalCheckBox;
631
    private javax.swing.JCheckBox parametersFinalCheckBox;
389
    private javax.swing.JCheckBox preferLongerNamesCheckBox;
632
    private javax.swing.JCheckBox preferLongerNamesCheckBox;
390
    private javax.swing.JLabel preferLongerNamesLabel;
391
    private javax.swing.JLabel prefixLabel;
633
    private javax.swing.JLabel prefixLabel;
392
    private javax.swing.JCheckBox qualifyFieldAccessCheckBox;
634
    private javax.swing.JCheckBox qualifyFieldAccessCheckBox;
635
    private javax.swing.JCheckBox sortByVisibilityCheckBox;
393
    private javax.swing.JLabel staticFieldLabel;
636
    private javax.swing.JLabel staticFieldLabel;
394
    private javax.swing.JTextField staticFieldPrefixField;
637
    private javax.swing.JTextField staticFieldPrefixField;
395
    private javax.swing.JTextField staticFieldSuffixField;
638
    private javax.swing.JTextField staticFieldSuffixField;
396
    private javax.swing.JLabel suffixLabel;
639
    private javax.swing.JLabel suffixLabel;
640
    private javax.swing.JButton upButton;
641
    private javax.swing.JButton visDownButton;
642
    private javax.swing.JButton visUpButton;
643
    private javax.swing.JList visibilityOrderList;
397
    // End of variables declaration//GEN-END:variables
644
    // End of variables declaration//GEN-END:variables
645
646
        private static final class CodeGenCategorySupport extends CategorySupport {
647
        
648
        private Source source = null;
649
650
        private CodeGenCategorySupport(Preferences preferences, JPanel panel) {
651
            super(preferences, "code-generation", panel, NbBundle.getMessage(FmtCodeGeneration.class, "SAMPLE_CodeGen"), //NOI18N
652
                    new String[] { FmtOptions.blankLinesBeforeFields, "1" }); //NOI18N
653
        }
398
    
654
    
655
        @Override
656
        protected void loadListData(JList list, String optionID, Preferences node) {
657
            DefaultListModel model = new DefaultListModel();
658
            String value = node.get(optionID, getDefaultAsString(optionID));
659
            for (String s : value.trim().split("\\s*[,;]\\s*")) { //NOI18N
660
                if (classMembersOrder.equals(optionID)) {
661
                    Element e = new Element();
662
                    if (s.startsWith("STATIC ")) { //NOI18N
663
                        e.isStatic = true;
664
                        s = s.substring(7);
665
                    }
666
                    e.kind = ElementKind.valueOf(s);
667
                    model.addElement(e);
668
                } else {
669
                    Visibility v = new Visibility();
670
                    v.kind = s;
671
                    model.addElement(v);
672
                }
673
            }
674
            list.setModel(model);
675
        }
676
        
677
        @Override
678
        protected void storeListData(final JList list, final String optionID, final Preferences node) {
679
            StringBuilder sb = null;
680
            for (int i = 0; i < list.getModel().getSize(); i++) {
681
                if (sb == null) {
682
                    sb = new StringBuilder();
683
                } else {
684
                    sb.append(';');
685
                }
686
                if (classMembersOrder.equals(optionID)) {
687
                    Element e = (Element) list.getModel().getElementAt(i);
688
                    if (e.isStatic)
689
                        sb.append("STATIC "); //NOI18N
690
                    sb.append(e.kind.name());
691
                } else {
692
                    Visibility v = (Visibility) list.getModel().getElementAt(i);
693
                    sb.append(v.kind);
694
                }
695
            }
696
            String value = sb != null ? sb.toString() : ""; //NOI18N
697
            if (getDefaultAsString(optionID).equals(value))
698
                node.remove(optionID);
699
            else
700
                node.put(optionID, value);            
701
        }
702
703
        @Override
704
        public void refreshPreview() {
705
            final JEditorPane jep = (JEditorPane) getPreviewComponent();
706
            try {
707
                Class.forName(CodeStyle.class.getName(), true, CodeStyle.class.getClassLoader());
708
            } catch (ClassNotFoundException cnfe) {
709
                // ignore
710
            }
711
712
            final CodeStyle codeStyle = codeStyleProducer.create(previewPrefs);
713
            jep.setIgnoreRepaint(true);
714
            try {
715
                if (source == null) {
716
                    FileObject fo = FileUtil.createMemoryFileSystem().getRoot().createData("org.netbeans.samples.ClassA", "java"); //NOI18N
717
                    source = Source.create(fo);
718
                }
719
                final Document doc = source.getDocument(true);
720
                if (doc.getLength() > 0) {
721
                    doc.remove(0, doc.getLength());
722
                }
723
                doc.insertString(0, previewText, null);
724
                doc.putProperty(CodeStyle.class, codeStyle);
725
                jep.setDocument(doc);
726
                ModificationResult result = ModificationResult.runModificationTask(Collections.singleton(source), new UserTask() {
727
728
                    @Override
729
                    public void run(ResultIterator resultIterator) throws Exception {
730
                        WorkingCopy copy = WorkingCopy.get(resultIterator.getParserResult());
731
                        copy.toPhase(Phase.RESOLVED);
732
                        TreeMaker tm = copy.getTreeMaker();
733
                        GeneratorUtilities gu = GeneratorUtilities.get(copy);
734
                        CompilationUnitTree cut = copy.getCompilationUnit();
735
                        ClassTree ct = (ClassTree) cut.getTypeDecls().get(0);
736
                        VariableTree field = (VariableTree)ct.getMembers().get(1);
737
                        List<Tree> members = new ArrayList<Tree>();
738
                        AssignmentTree stat = tm.Assignment(tm.Identifier("name"), tm.Literal("Name")); //NOI18N
739
                        BlockTree init = tm.Block(Collections.singletonList(tm.ExpressionStatement(stat)), false);
740
                        members.add(init);
741
                        members.add(gu.createConstructor(ct, Collections.<VariableTree>emptyList()));
742
                        members.add(gu.createGetter(field));
743
                        ModifiersTree mods = tm.Modifiers(EnumSet.of(Modifier.PRIVATE));
744
                        ClassTree inner = tm.Class(mods, "Inner", Collections.<TypeParameterTree>emptyList(), null, Collections.<Tree>emptyList(), Collections.<Tree>emptyList()); //NOI18N
745
                        members.add(inner);
746
                        mods = tm.Modifiers(EnumSet.of(Modifier.PRIVATE, Modifier.STATIC));
747
                        ClassTree nested = tm.Class(mods, "Nested", Collections.<TypeParameterTree>emptyList(), null, Collections.<Tree>emptyList(), Collections.<Tree>emptyList()); //NOI18N
748
                        members.add(nested);
749
                        IdentifierTree nestedId = tm.Identifier("Nested"); //NOI18N
750
                        VariableTree staticField = tm.Variable(mods, "instance", nestedId, null); //NOI18N
751
                        members.add(staticField);
752
                        NewClassTree nct = tm.NewClass(null, Collections.<ExpressionTree>emptyList(), nestedId, Collections.<ExpressionTree>emptyList(), null);
753
                        stat = tm.Assignment(tm.Identifier("instance"), nct); //NOI18N
754
                        BlockTree staticInit = tm.Block(Collections.singletonList(tm.ExpressionStatement(stat)), true);
755
                        members.add(staticInit);
756
                        members.add(gu.createGetter(staticField));
757
                        ClassTree newCT = gu.insertClassMembers(ct, members);
758
                        copy.rewrite(ct, newCT);
759
                    }
760
                });
761
                result.commit();
762
                final Reformat reformat = Reformat.get(doc);
763
                reformat.lock();
764
                try {
765
                    if (doc instanceof BaseDocument) {
766
                        ((BaseDocument) doc).runAtomicAsUser(new Runnable() {
767
                            @Override
768
                            public void run() {
769
                                try {
770
                                    reformat.reformat(0, doc.getLength());
771
                                } catch (BadLocationException ble) {}
772
                            }
773
                        });
774
                    } else {
775
                        reformat.reformat(0, doc.getLength());
776
                    }
777
                } finally {
778
                    reformat.unlock();
779
                }
780
                DataObject dataObject = DataObject.find(source.getFileObject());
781
                SaveCookie sc = dataObject.getLookup().lookup(SaveCookie.class);
782
                if (sc != null)
783
                    sc.save();
784
            } catch (Exception ex) {}
785
            jep.setIgnoreRepaint(false);
786
            jep.scrollRectToVisible(new Rectangle(0, 0, 10, 10));
787
            jep.repaint(100);
788
        }
789
        
790
        private static class Element {
791
            
792
            private boolean isStatic;
793
            private ElementKind kind;
794
795
            @Override
796
            public String toString() {
797
                return (isStatic ? NbBundle.getMessage(FmtCodeGeneration.class, "VAL_gen_STATIC") + " " : "") //NOI18N
798
                        + NbBundle.getMessage(FmtCodeGeneration.class, "VAL_gen_" + kind.name()); //NOI18N
799
            }
800
        }
801
802
        private static class Visibility {
803
            
804
            private String kind;
805
806
            @Override
807
            public String toString() {
808
                return NbBundle.getMessage(FmtCodeGeneration.class, "VAL_gen_" + kind); //NOI18N
809
            }
810
        }
811
    }
399
}
812
}
(-)a/java.source/src/org/netbeans/modules/java/ui/FmtOptions.java (-4 / +67 lines)
Lines 63-68 Link Here
63
import javax.swing.JComboBox;
63
import javax.swing.JComboBox;
64
import javax.swing.JComponent;
64
import javax.swing.JComponent;
65
import javax.swing.JEditorPane;
65
import javax.swing.JEditorPane;
66
import javax.swing.JList;
66
import javax.swing.JPanel;
67
import javax.swing.JPanel;
67
import javax.swing.JSpinner;
68
import javax.swing.JSpinner;
68
import javax.swing.JTable;
69
import javax.swing.JTable;
Lines 72-77 Link Here
72
import javax.swing.event.ChangeListener;
73
import javax.swing.event.ChangeListener;
73
import javax.swing.event.DocumentEvent;
74
import javax.swing.event.DocumentEvent;
74
import javax.swing.event.DocumentListener;
75
import javax.swing.event.DocumentListener;
76
import javax.swing.event.ListDataEvent;
77
import javax.swing.event.ListDataListener;
75
import javax.swing.event.TableModelEvent;
78
import javax.swing.event.TableModelEvent;
76
import javax.swing.event.TableModelListener;
79
import javax.swing.event.TableModelListener;
77
import org.netbeans.api.editor.settings.SimpleValueNames;
80
import org.netbeans.api.editor.settings.SimpleValueNames;
Lines 119-124 Link Here
119
    public static final String makeLocalVarsFinal = "makeLocalVarsFinal"; //NOI18N
122
    public static final String makeLocalVarsFinal = "makeLocalVarsFinal"; //NOI18N
120
    public static final String makeParametersFinal = "makeParametersFinal"; //NOI18N
123
    public static final String makeParametersFinal = "makeParametersFinal"; //NOI18N
121
    public static final String classMembersOrder = "classMembersOrder"; //NOI18N
124
    public static final String classMembersOrder = "classMembersOrder"; //NOI18N
125
    public static final String sortMembersByVisibility = "sortMembersByVisibility"; //NOI18N
126
    public static final String visibilityOrder = "visibilityOrder"; //NOI18N
127
    public static final String classMemberInsertionPoint = "classMemberInsertionPoint"; //NOI18N
122
    
128
    
123
    public static final String classDeclBracePlacement = "classDeclBracePlacement"; //NOI18N
129
    public static final String classDeclBracePlacement = "classDeclBracePlacement"; //NOI18N
124
    public static final String methodDeclBracePlacement = "methodDeclBracePlacement"; //NOI18N
130
    public static final String methodDeclBracePlacement = "methodDeclBracePlacement"; //NOI18N
Lines 155-160 Link Here
155
    public static final String wrapMethodCallArgs = "wrapMethodCallArgs"; //NOI18N
161
    public static final String wrapMethodCallArgs = "wrapMethodCallArgs"; //NOI18N
156
    public static final String wrapAnnotationArgs = "wrapAnnotationArgs"; //NOI18N
162
    public static final String wrapAnnotationArgs = "wrapAnnotationArgs"; //NOI18N
157
    public static final String wrapChainedMethodCalls = "wrapChainedMethodCalls"; //NOI18N
163
    public static final String wrapChainedMethodCalls = "wrapChainedMethodCalls"; //NOI18N
164
    public static final String wrapAfterDotInChainedMethodCalls = "wrapAfterDotInChainedMethodCalls"; //NOI18N
158
    public static final String wrapArrayInit = "wrapArrayInit"; //NOI18N
165
    public static final String wrapArrayInit = "wrapArrayInit"; //NOI18N
159
    public static final String wrapTryResources = "wrapTryResources"; //NOI18N
166
    public static final String wrapTryResources = "wrapTryResources"; //NOI18N
160
    public static final String wrapDisjunctiveCatchTypes = "wrapDisjunctiveCatchTypes"; //NOI18N
167
    public static final String wrapDisjunctiveCatchTypes = "wrapDisjunctiveCatchTypes"; //NOI18N
Lines 179-184 Link Here
179
    public static final String blankLinesBeforeClass = "blankLinesBeforeClass"; //NOI18N
186
    public static final String blankLinesBeforeClass = "blankLinesBeforeClass"; //NOI18N
180
    public static final String blankLinesAfterClass = "blankLinesAfterClass"; //NOI18N
187
    public static final String blankLinesAfterClass = "blankLinesAfterClass"; //NOI18N
181
    public static final String blankLinesAfterClassHeader = "blankLinesAfterClassHeader"; //NOI18N
188
    public static final String blankLinesAfterClassHeader = "blankLinesAfterClassHeader"; //NOI18N
189
    public static final String blankLinesAfterAnonymousClassHeader = "blankLinesAfterAnonymousClassHeader"; //NOI18N
182
    public static final String blankLinesBeforeFields = "blankLinesBeforeFields"; //NOI18N
190
    public static final String blankLinesBeforeFields = "blankLinesBeforeFields"; //NOI18N
183
    public static final String blankLinesAfterFields = "blankLinesAfterFields"; //NOI18N
191
    public static final String blankLinesAfterFields = "blankLinesAfterFields"; //NOI18N
184
    public static final String blankLinesBeforeMethods = "blankLinesBeforeMethods"; //NOI18N
192
    public static final String blankLinesBeforeMethods = "blankLinesBeforeMethods"; //NOI18N
Lines 202-207 Link Here
202
    public static final String spaceAroundBinaryOps = "spaceAroundBinaryOps"; //NOI18N
210
    public static final String spaceAroundBinaryOps = "spaceAroundBinaryOps"; //NOI18N
203
    public static final String spaceAroundTernaryOps = "spaceAroundTernaryOps"; //NOI18N
211
    public static final String spaceAroundTernaryOps = "spaceAroundTernaryOps"; //NOI18N
204
    public static final String spaceAroundAssignOps = "spaceAroundAssignOps"; //NOI18N
212
    public static final String spaceAroundAssignOps = "spaceAroundAssignOps"; //NOI18N
213
    public static final String spaceAroundAnnotationValueAssignOps = "spaceAroundAnnotationValueAssignOps"; //NOI18N
205
    public static final String spaceBeforeClassDeclLeftBrace = "spaceBeforeClassDeclLeftBrace"; //NOI18N
214
    public static final String spaceBeforeClassDeclLeftBrace = "spaceBeforeClassDeclLeftBrace"; //NOI18N
206
    public static final String spaceBeforeMethodDeclLeftBrace = "spaceBeforeMethodDeclLeftBrace"; //NOI18N
215
    public static final String spaceBeforeMethodDeclLeftBrace = "spaceBeforeMethodDeclLeftBrace"; //NOI18N
207
    public static final String spaceBeforeIfLeftBrace = "spaceBeforeIfLeftBrace"; //NOI18N
216
    public static final String spaceBeforeIfLeftBrace = "spaceBeforeIfLeftBrace"; //NOI18N
Lines 340-346 Link Here
340
    
349
    
341
    private static final String BGS_ELIMINATE = BracesGenerationStyle.ELIMINATE.name(); 
350
    private static final String BGS_ELIMINATE = BracesGenerationStyle.ELIMINATE.name(); 
342
    private static final String BGS_LEAVE_ALONE = BracesGenerationStyle.LEAVE_ALONE.name(); 
351
    private static final String BGS_LEAVE_ALONE = BracesGenerationStyle.LEAVE_ALONE.name(); 
343
    private static final String BGS_GENERATE = BracesGenerationStyle.GENERATE.name(); 
352
    private static final String BGS_GENERATE = BracesGenerationStyle.GENERATE.name();
353
    
354
    private static final String IP_CARET = InsertionPoint.CARET_LOCATION.name();
355
    private static final String IP_FIRST = InsertionPoint.FIRST_IN_CATEGORY.name();
356
    private static final String IP_LAST = InsertionPoint.LAST_IN_CATEGORY.name();
344
    
357
    
345
    private static Map<String,String> defaults;
358
    private static Map<String,String> defaults;
346
    
359
    
Lines 376-382 Link Here
376
            { addOverrideAnnotation, TRUE}, //NOI18N
389
            { addOverrideAnnotation, TRUE}, //NOI18N
377
            { makeLocalVarsFinal, FALSE}, //NOI18N
390
            { makeLocalVarsFinal, FALSE}, //NOI18N
378
            { makeParametersFinal, FALSE}, //NOI18N
391
            { makeParametersFinal, FALSE}, //NOI18N
379
            { classMembersOrder, ""}, //NOI18N // XXX
392
            { classMembersOrder, "STATIC FIELD;STATIC_INIT;STATIC METHOD;FIELD;INSTANCE_INIT;CONSTRUCTOR;METHOD;STATIC CLASS;CLASS"}, //NOI18N
393
            { sortMembersByVisibility, FALSE}, //NOI18N
394
            { visibilityOrder, "PUBLIC;PRIVATE;PROTECTED;DEFAULT"}, //NOI18N
395
            { classMemberInsertionPoint, IP_LAST},
380
396
381
            { classDeclBracePlacement, BP_SAME_LINE}, //NOI18N
397
            { classDeclBracePlacement, BP_SAME_LINE}, //NOI18N
382
            { methodDeclBracePlacement, BP_SAME_LINE}, //NOI18N
398
            { methodDeclBracePlacement, BP_SAME_LINE}, //NOI18N
Lines 413-418 Link Here
413
            { wrapMethodCallArgs, WRAP_NEVER}, //NOI18N
429
            { wrapMethodCallArgs, WRAP_NEVER}, //NOI18N
414
            { wrapAnnotationArgs, WRAP_NEVER}, //NOI18N
430
            { wrapAnnotationArgs, WRAP_NEVER}, //NOI18N
415
            { wrapChainedMethodCalls, WRAP_NEVER}, //NOI18N
431
            { wrapChainedMethodCalls, WRAP_NEVER}, //NOI18N
432
            { wrapAfterDotInChainedMethodCalls, TRUE}, //NOI18N
416
            { wrapArrayInit, WRAP_NEVER}, //NOI18N
433
            { wrapArrayInit, WRAP_NEVER}, //NOI18N
417
            { wrapTryResources, WRAP_NEVER}, //NOI18N
434
            { wrapTryResources, WRAP_NEVER}, //NOI18N
418
            { wrapDisjunctiveCatchTypes, WRAP_NEVER}, //NOI18N
435
            { wrapDisjunctiveCatchTypes, WRAP_NEVER}, //NOI18N
Lines 437-442 Link Here
437
            { blankLinesBeforeClass, "1"}, //NOI18N 
454
            { blankLinesBeforeClass, "1"}, //NOI18N 
438
            { blankLinesAfterClass, "0"}, //NOI18N
455
            { blankLinesAfterClass, "0"}, //NOI18N
439
            { blankLinesAfterClassHeader, "1"}, //NOI18N 
456
            { blankLinesAfterClassHeader, "1"}, //NOI18N 
457
            { blankLinesAfterAnonymousClassHeader, "0"}, //NOI18N 
440
            { blankLinesBeforeFields, "0"}, //NOI18N 
458
            { blankLinesBeforeFields, "0"}, //NOI18N 
441
            { blankLinesAfterFields, "0"}, //NOI18N
459
            { blankLinesAfterFields, "0"}, //NOI18N
442
            { blankLinesBeforeMethods, "1"}, //NOI18N
460
            { blankLinesBeforeMethods, "1"}, //NOI18N
Lines 460-465 Link Here
460
            { spaceAroundBinaryOps, TRUE}, //NOI18N
478
            { spaceAroundBinaryOps, TRUE}, //NOI18N
461
            { spaceAroundTernaryOps, TRUE}, //NOI18N
479
            { spaceAroundTernaryOps, TRUE}, //NOI18N
462
            { spaceAroundAssignOps, TRUE}, //NOI18N
480
            { spaceAroundAssignOps, TRUE}, //NOI18N
481
            { spaceAroundAnnotationValueAssignOps, TRUE}, //NOI18N
463
            { spaceBeforeClassDeclLeftBrace, TRUE}, //NOI18N
482
            { spaceBeforeClassDeclLeftBrace, TRUE}, //NOI18N
464
            { spaceBeforeMethodDeclLeftBrace, TRUE}, //NOI18N
483
            { spaceBeforeMethodDeclLeftBrace, TRUE}, //NOI18N
465
            { spaceBeforeIfLeftBrace, TRUE}, //NOI18N
484
            { spaceBeforeIfLeftBrace, TRUE}, //NOI18N
Lines 534-540 Link Here
534
    
553
    
535
    // Support section ---------------------------------------------------------
554
    // Support section ---------------------------------------------------------
536
      
555
      
537
    public static class CategorySupport implements ActionListener, ChangeListener, TableModelListener, DocumentListener, PreviewProvider, PreferencesCustomizer {
556
    public static class CategorySupport implements ActionListener, ChangeListener, ListDataListener, TableModelListener, DocumentListener, PreviewProvider, PreferencesCustomizer {
538
557
539
        public static final String OPTION_ID = "org.netbeans.modules.java.ui.FormatingOptions.ID";
558
        public static final String OPTION_ID = "org.netbeans.modules.java.ui.FormatingOptions.ID";
540
559
Lines 560-565 Link Here
560
                new ComboItem( WrapStyle.WRAP_NEVER.name(), "LBL_wrp_WRAP_NEVER" ) // NOI18N
579
                new ComboItem( WrapStyle.WRAP_NEVER.name(), "LBL_wrp_WRAP_NEVER" ) // NOI18N
561
            };
580
            };
562
        
581
        
582
        private static final ComboItem  insertionPoint[] = new ComboItem[] {
583
                new ComboItem( InsertionPoint.LAST_IN_CATEGORY.name(), "LBL_ip_LAST_IN_CATEGORY" ), // NOI18N
584
                new ComboItem( InsertionPoint.FIRST_IN_CATEGORY.name(), "LBL_ip_FIRST_IN_CATEGORY" ), // NOI18N
585
                new ComboItem( InsertionPoint.CARET_LOCATION.name(), "LBL_ip_CARET_LOCATION" ) // NOI18N
586
            };
587
        
563
        protected final String previewText;
588
        protected final String previewText;
564
//        private String forcedOptions[][];
589
//        private String forcedOptions[][];
565
        
590
        
Lines 619-624 Link Here
619
            refreshPreview();
644
            refreshPreview();
620
        }
645
        }
621
        
646
        
647
        protected void loadListData(final JList list, final String optionID, final Preferences p) {
648
        }
649
650
        protected void storeListData(final JList list, final String optionID, final Preferences node) {            
651
        }
652
622
        protected void loadTableData(final JTable table, final String optionID, final Preferences p) {
653
        protected void loadTableData(final JTable table, final String optionID, final Preferences p) {
623
        }
654
        }
624
655
Lines 638-643 Link Here
638
            notifyChanged();
669
            notifyChanged();
639
        }
670
        }
640
        
671
        
672
        // ListDataListener implementation -----------------------------------
673
674
        @Override
675
        public void contentsChanged(ListDataEvent e) {
676
        }
677
678
        @Override
679
        public void intervalAdded(ListDataEvent e) {
680
            notifyChanged();
681
        }
682
683
        @Override
684
        public void intervalRemoved(ListDataEvent e) {
685
        }
686
        
641
        // TableModelListener implementation -----------------------------------
687
        // TableModelListener implementation -----------------------------------
642
        
688
        
643
        @Override
689
        @Override
Lines 812-817 Link Here
812
                ComboItem item = whichItem(value, model);
858
                ComboItem item = whichItem(value, model);
813
                cb.setSelectedItem(item);
859
                cb.setSelectedItem(item);
814
            }
860
            }
861
            else if ( jc instanceof JList ) {
862
                loadListData((JList)jc, optionID, node);
863
            }
815
            else if ( jc instanceof JTable ) {
864
            else if ( jc instanceof JTable ) {
816
                loadTableData((JTable)jc, optionID, node);
865
                loadTableData((JTable)jc, optionID, node);
817
            }
866
            }
Lines 871-876 Link Here
871
                else
920
                else
872
                    node.put(optionID,value);
921
                    node.put(optionID,value);
873
            }
922
            }
923
            else if ( jc instanceof JList ) {
924
                storeListData((JList)jc, optionID, node);
925
            }
874
            else if ( jc instanceof JTable ) {
926
            else if ( jc instanceof JTable ) {
875
                storeTableData((JTable)jc, optionID, node);
927
                storeTableData((JTable)jc, optionID, node);
876
            }
928
            }
Lines 894-899 Link Here
894
                JComboBox cb  = (JComboBox)jc;
946
                JComboBox cb  = (JComboBox)jc;
895
                cb.addActionListener(this);
947
                cb.addActionListener(this);
896
            }
948
            }
949
            else if ( jc instanceof JList) {
950
                JList jl = (JList)jc;
951
                jl.getModel().addListDataListener(this);
952
            }
897
            else if ( jc instanceof JTable) {
953
            else if ( jc instanceof JTable) {
898
                JTable jt = (JTable)jc;
954
                JTable jt = (JTable)jc;
899
                jt.getModel().addTableModelListener(this);
955
                jt.getModel().addTableModelListener(this);
Lines 917-929 Link Here
917
                }
973
                }
918
            }
974
            }
919
            
975
            
920
            // is it wrap
976
            // is it wrap?
921
            for (ComboItem comboItem : wrap) {
977
            for (ComboItem comboItem : wrap) {
922
                if ( value.equals( comboItem.value) ) {
978
                if ( value.equals( comboItem.value) ) {
923
                    return new DefaultComboBoxModel( wrap );
979
                    return new DefaultComboBoxModel( wrap );
924
                }
980
                }
925
            }
981
            }
926
            
982
            
983
            // is it insertion point?
984
            for (ComboItem comboItem : insertionPoint) {
985
                if ( value.equals( comboItem.value) ) {
986
                    return new DefaultComboBoxModel( insertionPoint );
987
                }
988
            }
989
            
927
            return null;
990
            return null;
928
        }
991
        }
929
        
992
        
(-)a/java.source/src/org/netbeans/modules/java/ui/FmtSpaces.java (-1 / +2 lines)
Lines 244-250 Link Here
244
                new Item(spaceAroundUnaryOps),
244
                new Item(spaceAroundUnaryOps),
245
                new Item(spaceAroundBinaryOps),
245
                new Item(spaceAroundBinaryOps),
246
                new Item(spaceAroundTernaryOps),
246
                new Item(spaceAroundTernaryOps),
247
                new Item(spaceAroundAssignOps) ),
247
                new Item(spaceAroundAssignOps),
248
                new Item(spaceAroundAnnotationValueAssignOps) ),
248
            
249
            
249
            new Item("BeforeLeftBraces",                        // NOI18N
250
            new Item("BeforeLeftBraces",                        // NOI18N
250
                new Item(spaceBeforeClassDeclLeftBrace),
251
                new Item(spaceBeforeClassDeclLeftBrace),
(-)a/java.source/src/org/netbeans/modules/java/ui/FmtWrapping.form (-1 / +22 lines)
Lines 1-4 Link Here
1
<?xml version="1.1" encoding="UTF-8" ?>
1
<?xml version="1.0" encoding="UTF-8" ?>
2
2
3
<Form version="1.4" maxVersion="1.4" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
3
<Form version="1.4" maxVersion="1.4" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
4
  <Properties>
4
  <Properties>
Lines 241-246 Link Here
241
                </Constraint>
241
                </Constraint>
242
              </Constraints>
242
              </Constraints>
243
            </Component>
243
            </Component>
244
            <Component class="javax.swing.JCheckBox" name="afterDotCheckBox">
245
              <Properties>
246
                <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
247
                  <ResourceString bundle="org/netbeans/modules/java/ui/Bundle.properties" key="LBL_wrp_afeterDot" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
248
                </Property>
249
                <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
250
                  <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
251
                    <EmptyBorder bottom="0" left="0" right="0" top="0"/>
252
                  </Border>
253
                </Property>
254
                <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
255
                  <Insets value="[0, 0, 0, 0]"/>
256
                </Property>
257
                <Property name="opaque" type="boolean" value="false"/>
258
              </Properties>
259
              <Constraints>
260
                <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
261
                  <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="2" insetsLeft="8" insetsBottom="6" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
262
                </Constraint>
263
              </Constraints>
264
            </Component>
244
            <Component class="javax.swing.JLabel" name="throwsKeywordLabel">
265
            <Component class="javax.swing.JLabel" name="throwsKeywordLabel">
245
              <Properties>
266
              <Properties>
246
                <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
267
                <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
(-)a/java.source/src/org/netbeans/modules/java/ui/FmtWrapping.java (-1 / +15 lines)
Lines 77-82 Link Here
77
        annotationArgsCombo.addFocusListener(this);
77
        annotationArgsCombo.addFocusListener(this);
78
        chainedMethodCallsCombo.putClientProperty(OPTION_ID, wrapChainedMethodCalls);
78
        chainedMethodCallsCombo.putClientProperty(OPTION_ID, wrapChainedMethodCalls);
79
        chainedMethodCallsCombo.addFocusListener(this);
79
        chainedMethodCallsCombo.addFocusListener(this);
80
        afterDotCheckBox.putClientProperty(OPTION_ID, wrapAfterDotInChainedMethodCalls);
81
        afterDotCheckBox.addFocusListener(this);
80
        throwsKeywordCombo.putClientProperty(OPTION_ID, wrapThrowsKeyword);
82
        throwsKeywordCombo.putClientProperty(OPTION_ID, wrapThrowsKeyword);
81
        throwsKeywordCombo.addFocusListener(this);
83
        throwsKeywordCombo.addFocusListener(this);
82
        throwsListCombo.putClientProperty(OPTION_ID, wrapThrowsList);
84
        throwsListCombo.putClientProperty(OPTION_ID, wrapThrowsList);
Lines 118-124 Link Here
118
    public static PreferencesCustomizer.Factory getController() {
120
    public static PreferencesCustomizer.Factory getController() {
119
        return new CategorySupport.Factory("wrapping", FmtWrapping.class, //NOI18N
121
        return new CategorySupport.Factory("wrapping", FmtWrapping.class, //NOI18N
120
                org.openide.util.NbBundle.getMessage(FmtWrapping.class, "SAMPLE_Wrapping"), //NOI18N
122
                org.openide.util.NbBundle.getMessage(FmtWrapping.class, "SAMPLE_Wrapping"), //NOI18N
121
                new String[] { FmtOptions.rightMargin, "30" }, //NOI18N
123
                new String[] { FmtOptions.rightMargin, "35" }, //NOI18N
122
                new String[] { FmtOptions.redundantDoWhileBraces, CodeStyle.BracesGenerationStyle.LEAVE_ALONE.name() },
124
                new String[] { FmtOptions.redundantDoWhileBraces, CodeStyle.BracesGenerationStyle.LEAVE_ALONE.name() },
123
                new String[] { FmtOptions.redundantForBraces, CodeStyle.BracesGenerationStyle.LEAVE_ALONE.name() },
125
                new String[] { FmtOptions.redundantForBraces, CodeStyle.BracesGenerationStyle.LEAVE_ALONE.name() },
124
                new String[] { FmtOptions.redundantIfBraces, CodeStyle.BracesGenerationStyle.LEAVE_ALONE.name() },
126
                new String[] { FmtOptions.redundantIfBraces, CodeStyle.BracesGenerationStyle.LEAVE_ALONE.name() },
Lines 158-163 Link Here
158
        annotationArgsCombo = new javax.swing.JComboBox();
160
        annotationArgsCombo = new javax.swing.JComboBox();
159
        chainedMethodCallsLabel = new javax.swing.JLabel();
161
        chainedMethodCallsLabel = new javax.swing.JLabel();
160
        chainedMethodCallsCombo = new javax.swing.JComboBox();
162
        chainedMethodCallsCombo = new javax.swing.JComboBox();
163
        afterDotCheckBox = new javax.swing.JCheckBox();
161
        throwsKeywordLabel = new javax.swing.JLabel();
164
        throwsKeywordLabel = new javax.swing.JLabel();
162
        throwsKeywordCombo = new javax.swing.JComboBox();
165
        throwsKeywordCombo = new javax.swing.JComboBox();
163
        throwsListLabel = new javax.swing.JLabel();
166
        throwsListLabel = new javax.swing.JLabel();
Lines 290-295 Link Here
290
        gridBagConstraints.insets = new java.awt.Insets(0, 6, 4, 8);
293
        gridBagConstraints.insets = new java.awt.Insets(0, 6, 4, 8);
291
        panel1.add(chainedMethodCallsCombo, gridBagConstraints);
294
        panel1.add(chainedMethodCallsCombo, gridBagConstraints);
292
295
296
        org.openide.awt.Mnemonics.setLocalizedText(afterDotCheckBox, org.openide.util.NbBundle.getMessage(FmtWrapping.class, "LBL_wrp_afeterDot")); // NOI18N
297
        afterDotCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
298
        afterDotCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
299
        afterDotCheckBox.setOpaque(false);
300
        gridBagConstraints = new java.awt.GridBagConstraints();
301
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
302
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
303
        gridBagConstraints.insets = new java.awt.Insets(2, 8, 6, 0);
304
        panel1.add(afterDotCheckBox, gridBagConstraints);
305
293
        throwsKeywordLabel.setLabelFor(throwsKeywordCombo);
306
        throwsKeywordLabel.setLabelFor(throwsKeywordCombo);
294
        org.openide.awt.Mnemonics.setLocalizedText(throwsKeywordLabel, org.openide.util.NbBundle.getMessage(FmtWrapping.class, "LBL_wrp_throwsKeyword")); // NOI18N
307
        org.openide.awt.Mnemonics.setLocalizedText(throwsKeywordLabel, org.openide.util.NbBundle.getMessage(FmtWrapping.class, "LBL_wrp_throwsKeyword")); // NOI18N
295
        gridBagConstraints = new java.awt.GridBagConstraints();
308
        gridBagConstraints = new java.awt.GridBagConstraints();
Lines 550-555 Link Here
550
    
563
    
551
    // Variables declaration - do not modify//GEN-BEGIN:variables
564
    // Variables declaration - do not modify//GEN-BEGIN:variables
552
    private javax.swing.JCheckBox afterBinaryOpsCheckBox;
565
    private javax.swing.JCheckBox afterBinaryOpsCheckBox;
566
    private javax.swing.JCheckBox afterDotCheckBox;
553
    private javax.swing.JCheckBox afterTernaryOpsCheckBox;
567
    private javax.swing.JCheckBox afterTernaryOpsCheckBox;
554
    private javax.swing.JComboBox annotationArgsCombo;
568
    private javax.swing.JComboBox annotationArgsCombo;
555
    private javax.swing.JLabel annotationArgsLabel;
569
    private javax.swing.JLabel annotationArgsLabel;

Return to bug 208503