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 226713
Collapse All | Expand All

(-)a/java.api.common/apichanges.xml (+16 lines)
Lines 105-110 Link Here
105
105
106
    <!-- ACTUAL CHANGES BEGIN HERE: -->
106
    <!-- ACTUAL CHANGES BEGIN HERE: -->
107
    <changes>
107
    <changes>
108
        <change id="jre-profiles">
109
            <api name="java-api-common"/>
110
            <summary>Added UI support for JRE profiles.</summary>
111
            <version major="1" minor="45"/>
112
            <date day="4" month="3" year="2013"/>
113
            <author login="tzezula"/>
114
            <compatibility addition="yes"/>
115
            <description>
116
                <p>
117
                    Addded factory methods to <code>PlatformUiSupport</code> to create
118
                    a model and renderer for JDK 8 profiles.
119
                </p>
120
            </description>
121
            <class package="org.netbeans.modules.java.api.common.ui" name="PlatformUiSupport"/>
122
            <issue number="226713"/>
123
        </change>
108
        <change id="CommonProjectUtils.createJavaLibraryImplementation">
124
        <change id="CommonProjectUtils.createJavaLibraryImplementation">
109
            <api name="java-api-common"/>
125
            <api name="java-api-common"/>
110
            <summary>Added a helper method creating <code>LibraryImplementation3</code> for ant and maven projects.</summary>
126
            <summary>Added a helper method creating <code>LibraryImplementation3</code> for ant and maven projects.</summary>
(-)a/java.api.common/manifest.mf (-1 / +1 lines)
Lines 1-4 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.java.api.common/0
2
OpenIDE-Module: org.netbeans.modules.java.api.common/0
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/java/api/common/resources/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/java/api/common/resources/Bundle.properties
4
OpenIDE-Module-Specification-Version: 1.44
4
OpenIDE-Module-Specification-Version: 1.45
(-)a/java.api.common/nbproject/project.xml (-1 / +1 lines)
Lines 29-35 Link Here
29
                    <compile-dependency/>
29
                    <compile-dependency/>
30
                    <run-dependency>
30
                    <run-dependency>
31
                        <release-version>1</release-version>
31
                        <release-version>1</release-version>
32
                        <specification-version>1.30</specification-version>
32
                        <specification-version>1.45</specification-version>
33
                    </run-dependency>
33
                    </run-dependency>
34
                </dependency>
34
                </dependency>
35
                <dependency>
35
                <dependency>
(-)a/java.api.common/src/org/netbeans/modules/java/api/common/ui/Bundle.properties (+4 lines)
Lines 54-56 Link Here
54
    Do you want to change the Java Platform and update the source level\n\
54
    Do you want to change the Java Platform and update the source level\n\
55
    version?
55
    version?
56
TXT_ChangePlatformTitle=Change Java Platform
56
TXT_ChangePlatformTitle=Change Java Platform
57
TXT_Profile_Compact1=Compact 1
58
TXT_Profile_Compact2=Compact 2
59
TXT_Profile_Compact3=Compact 3
60
TXT_Profile_Default=Full JRE
(-)a/java.api.common/src/org/netbeans/modules/java/api/common/ui/PlatformUiSupport.java (-5 / +393 lines)
Lines 49-61 Link Here
49
import java.beans.PropertyChangeListener;
49
import java.beans.PropertyChangeListener;
50
import java.text.MessageFormat;
50
import java.text.MessageFormat;
51
import java.util.ArrayList;
51
import java.util.ArrayList;
52
import java.util.Arrays;
53
import java.util.Collection;
54
import java.util.Collections;
55
import java.util.Comparator;
56
import java.util.HashMap;
57
import java.util.HashSet;
52
import java.util.List;
58
import java.util.List;
59
import java.util.Map;
53
import java.util.Set;
60
import java.util.Set;
54
import java.util.TreeSet;
61
import java.util.TreeSet;
55
import java.util.logging.Logger;
62
import java.util.logging.Logger;
56
import javax.swing.*;
63
import javax.swing.*;
57
import javax.swing.event.ListDataEvent;
64
import javax.swing.event.ListDataEvent;
58
import javax.swing.event.ListDataListener;
65
import javax.swing.event.ListDataListener;
66
import org.netbeans.api.annotations.common.CheckForNull;
59
import org.netbeans.api.annotations.common.NonNull;
67
import org.netbeans.api.annotations.common.NonNull;
60
import org.netbeans.api.annotations.common.NullAllowed;
68
import org.netbeans.api.annotations.common.NullAllowed;
61
import org.netbeans.api.java.platform.JavaPlatform;
69
import org.netbeans.api.java.platform.JavaPlatform;
Lines 81-87 Link Here
81
 */
89
 */
82
public final class PlatformUiSupport {
90
public final class PlatformUiSupport {
83
91
84
    private static final SpecificationVersion JDK_1_5 = new SpecificationVersion("1.5"); //NOI18N   
92
    private static final SpecificationVersion JDK_1_5 = new SpecificationVersion("1.5"); //NOI18N
93
    private static final SpecificationVersion JDK_8 = new SpecificationVersion("1.8");  //NOI18N
85
    private static final Logger LOGGER = Logger.getLogger(PlatformUiSupport.class.getName());
94
    private static final Logger LOGGER = Logger.getLogger(PlatformUiSupport.class.getName());
86
95
87
    private PlatformUiSupport() {
96
    private PlatformUiSupport() {
Lines 148-154 Link Here
148
            @NonNull final String projectConfigurationNamespace,
157
            @NonNull final String projectConfigurationNamespace,
149
            @NonNull final Object platformKey,
158
            @NonNull final Object platformKey,
150
            @NullAllowed final Object sourceLevelKey) {
159
            @NullAllowed final Object sourceLevelKey) {
151
        storePlatform(props, helper, projectConfigurationNamespace, platformKey, sourceLevelKey, true);
160
        storePlatform(
161
                props,
162
                helper,
163
                projectConfigurationNamespace,
164
                platformKey,
165
                sourceLevelKey,
166
                null,
167
                true);
152
    }
168
    }
153
169
154
    /**
170
    /**
Lines 168-183 Link Here
168
            @NonNull final Object platformKey,
184
            @NonNull final Object platformKey,
169
            @NullAllowed final Object sourceLevelKey,
185
            @NullAllowed final Object sourceLevelKey,
170
            final boolean updatePreferredPlatform) {
186
            final boolean updatePreferredPlatform) {
187
        storePlatform(
188
            props,
189
            helper,
190
            projectConfigurationNamespace,
191
            platformKey,
192
            sourceLevelKey,
193
            null,
194
            updatePreferredPlatform);
195
    }
196
197
    /**
198
     * Stores active platform, <i>javac.source</i>,<i>javac.target</i> and <i>javac.profile</i> into the project's metadata.
199
     * @param props project's shared properties
200
     * @param helper {@link UpdateHelper} that is capable to upgrade project metadata if needed.
201
     * @param projectConfigurationNamespace project configuration namespace.
202
     * @param platformKey the {@link PlatformKey} got from the platform model.
203
     * @param sourceLevelKey {@link SourceLevelKey} representing source level; can be <code>null</code>.
204
     * @param profileKey {@link Profile} representing required profile; can be <code>null</code> for full JRE.
205
     * @param updatePreferredPlatform if true the {@link PreferredProjectPlatform} will be updated
206
     * @since 1.45
207
     */
208
    public static void storePlatform(
209
            @NonNull final EditableProperties props,
210
            @NonNull final UpdateHelper helper,
211
            @NonNull final String projectConfigurationNamespace,
212
            @NonNull final Object platformKey,
213
            @NullAllowed final Object sourceLevelKey,
214
            @NullAllowed final Object profileKey,
215
            final boolean updatePreferredPlatform) {
171
        Parameters.notNull("props", props); //NOI18N
216
        Parameters.notNull("props", props); //NOI18N
172
        Parameters.notNull("helper", helper); //NOI18N
217
        Parameters.notNull("helper", helper); //NOI18N
173
        Parameters.notNull("projectConfigurationNamespace", projectConfigurationNamespace); //NOI18N
218
        Parameters.notNull("projectConfigurationNamespace", projectConfigurationNamespace); //NOI18N
174
        Parameters.notNull("platformKey", platformKey); //NOI18N
219
        Parameters.notNull("platformKey", platformKey); //NOI18N
175
220
        if (!(platformKey instanceof PlatformKey)) {
176
        assert platformKey instanceof PlatformKey;
221
            throw new IllegalArgumentException(String.format(
222
                    "Unsupported platform key: %s of type: %s", //NOI18N
223
                    platformKey,
224
                    platformKey.getClass()));
225
        }
226
        if (sourceLevelKey != null && !(sourceLevelKey instanceof SourceLevelKey)) {
227
            throw new IllegalArgumentException(String.format(
228
                    "Unsupported source level key: %s of type: %s", //NOI18N
229
                    sourceLevelKey,
230
                    sourceLevelKey.getClass()));
231
        }
232
        if (profileKey != null && !(profileKey instanceof Profile)) {
233
            throw new IllegalArgumentException(String.format(
234
                    "Unsupported profile key: %s of type: %s", //NOI18N
235
                    profileKey,
236
                    profileKey.getClass()));
237
        }
177
238
178
        final String javaPlatformKey = "platform.active"; //NOI18N
239
        final String javaPlatformKey = "platform.active"; //NOI18N
179
        final String javacSourceKey = "javac.source"; //NOI18N
240
        final String javacSourceKey = "javac.source"; //NOI18N
180
        final String javacTargetKey = "javac.target"; //NOI18N
241
        final String javacTargetKey = "javac.target"; //NOI18N
242
        final String javacProfileKey = "javac.profile";  //NOI18N
181
243
182
        PlatformKey pk = (PlatformKey) platformKey;
244
        PlatformKey pk = (PlatformKey) platformKey;
183
        JavaPlatform platform = getPlatform(pk);
245
        JavaPlatform platform = getPlatform(pk);
Lines 251-257 Link Here
251
        if (sourceLevelKey == null) {
313
        if (sourceLevelKey == null) {
252
            sourceLevel = platform.getSpecification().getVersion();
314
            sourceLevel = platform.getSpecification().getVersion();
253
        } else {
315
        } else {
254
            assert sourceLevelKey instanceof SourceLevelKey;
255
            sourceLevel = ((SourceLevelKey) sourceLevelKey).getSourceLevel();
316
            sourceLevel = ((SourceLevelKey) sourceLevelKey).getSourceLevel();
256
        }
317
        }
257
        String javacSource = sourceLevel.toString();
318
        String javacSource = sourceLevel.toString();
Lines 275-286 Link Here
275
        if (!javacTarget.equals(props.getProperty(javacTargetKey))) {
336
        if (!javacTarget.equals(props.getProperty(javacTargetKey))) {
276
            props.setProperty(javacTargetKey, javacTarget);
337
            props.setProperty(javacTargetKey, javacTarget);
277
        }
338
        }
339
        
340
        final String javacProfile;
341
        if (profileKey != null) {
342
            javacProfile = ((Profile)profileKey).getName();
343
        } else {
344
            javacProfile = null;
345
        }
346
        if (javacProfile != null) {
347
            if(!javacProfile.equals(props.getProperty(javacProfileKey))) {
348
                props.setProperty(javacProfileKey, javacProfile);
349
            }
350
        } else if (props.containsKey(javacProfileKey)) {
351
            props.remove(javacProfileKey);
352
        }
278
353
279
        if (changed) {
354
        if (changed) {
280
            helper.putPrimaryConfigurationData(root, true);
355
            helper.putPrimaryConfigurationData(root, true);
281
        }
356
        }
282
    }
357
    }
283
358
359
    /**
360
     * Returns a {@link SpecificationVersion} for an item obtained from the {@link ComboBoxModel} created by
361
     * the {@link PlatformUiSupport#createSourceLevelComboBoxModel} method. This method
362
     * can return <code>null</code> if the source level is broken.
363
     * @param sourceLevelKey  an item obtained from {@link ComboBoxModel} created by
364
     *                    {@link PlatformUiSupport#createSourceLevelComboBoxModel}.
365
     * @return {@link SpecificationVersion} or <code>null</code> in case when source level is broken.
366
     * @throws IllegalArgumentException if the input parameter is not an object created by source level combobox model.
367
     * @since 1.45
368
     */
369
    public static SpecificationVersion getSourceLevel(@NonNull final Object sourceLevelKey) {
370
        Parameters.notNull("sourceLevelKey", sourceLevelKey);   //NOI18N
371
        if (!(sourceLevelKey instanceof SourceLevelKey)) {
372
            throw new IllegalArgumentException(String.format(
373
                    "Unsupported source level key: %s of type: %s", //NOI18N
374
                    sourceLevelKey,
375
                    sourceLevelKey.getClass()));
376
        }
377
        return ((SourceLevelKey)sourceLevelKey).getSourceLevel();
378
    }
379
284
380
285
    /**
381
    /**
286
     * Return a {@link JavaPlatform} for an item obtained from the ComboBoxModel created by
382
     * Return a {@link JavaPlatform} for an item obtained from the ComboBoxModel created by
Lines 345-350 Link Here
345
    }
441
    }
346
442
347
    /**
443
    /**
444
     * Create {@link ComboBoxModel} of JRE profiles for active source level.
445
     * The model listens on the source level {@link ComboBoxModel} and update its
446
     * state according to the changes. It is possible to define minimal required
447
     * JRE profile.
448
     * @param sourceLevelModel the source level model used for listening.
449
     * @param initialProfile initial profile, null if unknown.
450
     * @param minimalProfile minimal JRE profile to be displayed.
451
     * It can be <code>null</code> if all the JRE profiles should be displayed.
452
     * @return {@link ComboBoxModel}.
453
     * @since 1.45
454
     */
455
    public static ComboBoxModel createProfileComboBoxModel(
456
            @NonNull final ComboBoxModel sourceLevelModel,
457
            @NullAllowed final String initialProfile,
458
            @NullAllowed final String minimalProfile) {
459
        return new ProfileComboBoxModel(sourceLevelModel, initialProfile, minimalProfile);
460
    }
461
462
    /**
463
     * Create {@link ListCellRenderer} for JRE profiles.
464
     * This renderer highlights incorrect profile names.
465
     * @return {@link ListCellRenderer} for JRE profiles.
466
     * @since 1.45
467
     */
468
    public static ListCellRenderer createProfileListCellRenderer() {
469
        return new ProfileListCellRenderer();
470
    }
471
472
    /**
348
     * This class represents a JavaPlatform in the {@link ListModel}
473
     * This class represents a JavaPlatform in the {@link ListModel}
349
     * created by the {@link PlatformUiSupport#createPlatformComboBoxModel(String)} method.
474
     * created by the {@link PlatformUiSupport#createPlatformComboBoxModel(String)} method.
350
     */
475
     */
Lines 814-819 Link Here
814
        }
939
        }
815
    }
940
    }
816
941
942
    private interface Profile {
943
        @NonNull
944
        String getName();
945
946
        @NonNull
947
        String getDisplayName();
948
949
        int getRank();
950
951
        boolean isSupportedIn(@NonNull final SpecificationVersion sourceLevel);
952
    }
953
    
954
    private enum StandardProfile implements  Profile {
955
        COMPACT1(
956
                "compact1", //NOI18N
957
                NbBundle.getMessage(PlatformUiSupport.class, "TXT_Profile_Compact1"),
958
                0,
959
                Arrays.asList(JDK_8)),
960
        COMPACT2(
961
                "compact2", //NOI18N
962
                NbBundle.getMessage(PlatformUiSupport.class, "TXT_Profile_Compact2"),
963
                1,
964
                Arrays.asList(JDK_8)),
965
        COMPACT3(
966
                "compact3", //NOI18N
967
                NbBundle.getMessage(PlatformUiSupport.class, "TXT_Profile_Compact3"),
968
                2,
969
                Arrays.asList(JDK_8)),
970
        DEFAULT(
971
                "default",  //NOI18N
972
                NbBundle.getMessage(PlatformUiSupport.class, "TXT_Profile_Default"),
973
                Integer.MAX_VALUE-1,
974
                Arrays.asList(JDK_8));
975
        
976
        private static final Map<String,Profile> profilesByName =
977
                new HashMap<String, Profile>();        
978
        static {
979
            for (Profile p : values()) {
980
                profilesByName.put(p.getName(), p);
981
            }
982
        }
983
        
984
        private final String name;
985
        private final String displayName;
986
        private final int rank;
987
        private final Set<? extends SpecificationVersion> supportedIn;
988
        
989
        StandardProfile(
990
            @NonNull final String name,
991
            @NonNull final String displayName,
992
            @NonNull final int rank,
993
            @NonNull final Collection<? extends SpecificationVersion> supportedIn) {
994
            Parameters.notNull("name", name);   //NOI18N
995
            Parameters.notNull("displayName", displayName); //NOI18N
996
            this.name = name;
997
            this.displayName = displayName;
998
            this.rank = rank;
999
            this.supportedIn = Collections.unmodifiableSet(
1000
                new HashSet<SpecificationVersion>(supportedIn));
1001
        }
1002
        
1003
        @Override
1004
        public String getName() {
1005
            return name;
1006
        }
1007
        
1008
        @Override
1009
        public String getDisplayName() {
1010
            return displayName;
1011
        }
1012
1013
        @Override
1014
        public int getRank() {
1015
            return rank;
1016
        }
1017
1018
        @Override
1019
        public boolean isSupportedIn(SpecificationVersion sourceLevel) {
1020
            return supportedIn.contains(sourceLevel);
1021
        }
1022
        
1023
        @Override
1024
        public String toString() {
1025
            return String.format(
1026
                "%s (%s)", //NOI18N
1027
                displayName,
1028
                name);
1029
        }
1030
1031
        @CheckForNull
1032
        static Profile forName(@NonNull final String id) {
1033
            return profilesByName.get(id);
1034
        }
1035
        
1036
    }
1037
1038
    private static final class ProfileComboBoxModel extends AbstractListModel implements ComboBoxModel, ListDataListener {
1039
1040
        private final ComboBoxModel sourceLevelModel;
1041
        private final String initialProfileName;
1042
        private final String minimalProfileName;
1043
1044
        private Profile[] profiles;
1045
        private Profile selectedItem;
1046
1047
        ProfileComboBoxModel(
1048
                @NonNull final ComboBoxModel sourceLevelModel,
1049
                @NullAllowed final String initialProfileName,
1050
                @NullAllowed final String minimalProfileName) {
1051
            this.sourceLevelModel = sourceLevelModel;
1052
            this.initialProfileName = initialProfileName;
1053
            this.minimalProfileName = minimalProfileName;
1054
            this.sourceLevelModel.addListDataListener(this);
1055
        }
1056
1057
        @Override
1058
        public int getSize() {
1059
            final Profile[] p = init();
1060
            return p.length;
1061
        }
1062
1063
        @Override
1064
        @CheckForNull
1065
        public Object getElementAt(final int index) {
1066
            final Profile[] p = init();
1067
            if (index < 0 || index >= p.length) {
1068
                throw new IndexOutOfBoundsException(String.format(
1069
                    "Index: %d, Profiles count: %d",    //NOI18N
1070
                    index,
1071
                    p.length));
1072
            }
1073
            return p[index];
1074
        }
1075
1076
        @Override
1077
        public void setSelectedItem(@NullAllowed final Object anItem) {
1078
            assert anItem == null || anItem instanceof Profile;
1079
            selectedItem = (Profile) anItem;
1080
        }
1081
1082
        @Override
1083
        @CheckForNull
1084
        public Object getSelectedItem() {
1085
            return selectedItem;
1086
        }
1087
1088
        @Override
1089
        public void intervalAdded(ListDataEvent e) {
1090
        }
1091
1092
        @Override
1093
        public void intervalRemoved(ListDataEvent e) {
1094
        }
1095
1096
        @Override
1097
        public void contentsChanged(ListDataEvent e) {
1098
            final int oldSize = getSize();
1099
            profiles = null;
1100
            fireContentsChanged(this, 0, oldSize);
1101
        }
1102
1103
        private Profile[] init() {
1104
            if (profiles == null) {
1105
                final Comparator<Profile> c = new Comparator<Profile>() {
1106
                    @Override
1107
                    public int compare(
1108
                            @NonNull final Profile p1,
1109
                            @NonNull final Profile p2) {
1110
                        final int r1 = p1.getRank();
1111
                        final int r2 = p2.getRank();
1112
                        return r1 < r2 ?
1113
                            -1 :
1114
                            r1 == r2 ?
1115
                                0 :
1116
                                1;
1117
                    }
1118
                };
1119
                Profile minimalProfile = null;
1120
                if (minimalProfileName != null) {
1121
                    minimalProfile = StandardProfile.forName(minimalProfileName);
1122
                }
1123
                final Collection<Profile> pc = new TreeSet<Profile>(c);
1124
                final Object slk = sourceLevelModel.getSelectedItem();
1125
                final SpecificationVersion sl;
1126
                if (slk instanceof SourceLevelKey) {
1127
                    sl = ((SourceLevelKey)slk).getSourceLevel();
1128
                } else {
1129
                    sl = null;
1130
                }
1131
                for (StandardProfile p : StandardProfile.values()) {
1132
                    if (minimalProfile != null &&
1133
                        c.compare(minimalProfile, selectedItem) > 0) {
1134
                            continue;
1135
                    }
1136
                    if (sl != null && !p.isSupportedIn(sl)) {
1137
                        continue;
1138
                    }
1139
                    pc.add(p);
1140
                }
1141
                if (selectedItem == null) {
1142
                    if (initialProfileName != null && !initialProfileName.isEmpty()) {
1143
                        selectedItem = StandardProfile.forName(initialProfileName);
1144
                        if (selectedItem == null) {
1145
                            selectedItem = new Profile() {
1146
                                @Override
1147
                                public String getName() {
1148
                                    return initialProfileName;
1149
                                }
1150
                                @Override
1151
                                public String getDisplayName() {
1152
                                    return getName();
1153
                                }
1154
                                @Override
1155
                                public int getRank() {
1156
                                    return Integer.MAX_VALUE;
1157
                                }
1158
                                @Override
1159
                                public boolean isSupportedIn(SpecificationVersion sourceLevel) {
1160
                                    return true;
1161
                                }
1162
                            };
1163
                            pc.add(selectedItem);
1164
                        }
1165
                    } else {
1166
                        selectedItem = StandardProfile.DEFAULT;
1167
                    }
1168
                }
1169
                this.profiles = pc.toArray(new Profile[pc.size()]);
1170
            }
1171
            return profiles;
1172
        }        
1173
    }
1174
1175
    private static final class ProfileListCellRenderer implements ListCellRenderer {
1176
1177
        private final ListCellRenderer delegate;
1178
1179
        ProfileListCellRenderer() {
1180
            delegate = HtmlRenderer.createRenderer();
1181
        }
1182
1183
        @Override
1184
        public Component getListCellRendererComponent(
1185
                @NonNull final JList list,
1186
                @NullAllowed Object value,
1187
                final int index,
1188
                final boolean isSelected,
1189
                final boolean cellHasFocus) {
1190
            if (value instanceof Profile) {
1191
                final Profile p = (Profile) value;
1192
                if (StandardProfile.forName(p.getName()) == null) {
1193
                    value = "<html><font color=\"#A40000\">" + //NOI18N
1194
                        p.getDisplayName();
1195
                } else {
1196
                    value = p.getDisplayName();
1197
                }
1198
            }
1199
            return delegate.getListCellRendererComponent(
1200
                    list, value, index, isSelected, cellHasFocus);
1201
        }
1202
1203
    }
1204
817
    /**
1205
    /**
818
     * Retturns a {@link JavaPlatform} for given {@link PlatformKey}
1206
     * Retturns a {@link JavaPlatform} for given {@link PlatformKey}
819
     * or null when the platformKey is either null or not bound to a platform.
1207
     * or null when the platformKey is either null or not bound to a platform.
(-)a/java.j2seproject/nbproject/project.xml (-1 / +1 lines)
Lines 142-148 Link Here
142
                    <compile-dependency/>
142
                    <compile-dependency/>
143
                    <run-dependency>
143
                    <run-dependency>
144
                        <release-version>0-1</release-version>
144
                        <release-version>0-1</release-version>
145
                        <specification-version>1.37</specification-version>
145
                        <specification-version>1.45</specification-version>
146
                    </run-dependency>
146
                    </run-dependency>
147
                </dependency>
147
                </dependency>
148
                <dependency>
148
                <dependency>
(-)a/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/Bundle.properties (+3 lines)
Lines 629-631 Link Here
629
    If selected, Additional Compiler Options are not used for running files or project.
629
    If selected, Additional Compiler Options are not used for running files or project.
630
AddProcessorOption.valueTextField.text=
630
AddProcessorOption.valueTextField.text=
631
TXT_CopyLibraries=Copy Dependent &Libraries
631
TXT_CopyLibraries=Copy Dependent &Libraries
632
LBL_Profile=&Profile:
633
AN_Profile=Profile:
634
AD_Profile=JDK 8 Compact Profile
(-)a/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerSources.form (-5 / +53 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.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
3
<Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
4
  <AuxValues>
4
  <AuxValues>
Lines 406-412 Link Here
406
          </AuxValues>
406
          </AuxValues>
407
          <Constraints>
407
          <Constraints>
408
            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
408
            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
409
              <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="13" weightX="0.0" weightY="0.0"/>
409
              <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="13" weightX="0.0" weightY="0.0"/>
410
            </Constraint>
410
            </Constraint>
411
          </Constraints>
411
          </Constraints>
412
        </Component>
412
        </Component>
Lines 429-435 Link Here
429
          </AuxValues>
429
          </AuxValues>
430
          <Constraints>
430
          <Constraints>
431
            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
431
            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
432
              <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="0" fill="2" ipadX="0" ipadY="0" insetsTop="8" insetsLeft="0" insetsBottom="0" insetsRight="12" anchor="17" weightX="0.0" weightY="0.0"/>
432
              <GridBagConstraints gridX="0" gridY="2" gridWidth="1" gridHeight="0" fill="2" ipadX="0" ipadY="0" insetsTop="8" insetsLeft="0" insetsBottom="0" insetsRight="12" anchor="17" weightX="0.0" weightY="0.0"/>
433
            </Constraint>
433
            </Constraint>
434
          </Constraints>
434
          </Constraints>
435
        </Component>
435
        </Component>
Lines 446-464 Link Here
446
          </Properties>
446
          </Properties>
447
          <Constraints>
447
          <Constraints>
448
            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
448
            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
449
              <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="0" fill="2" ipadX="0" ipadY="0" insetsTop="8" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
449
              <GridBagConstraints gridX="-1" gridY="2" gridWidth="1" gridHeight="0" fill="2" ipadX="0" ipadY="0" insetsTop="8" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
450
            </Constraint>
450
            </Constraint>
451
          </Constraints>
451
          </Constraints>
452
        </Component>
452
        </Component>
453
        <Container class="javax.swing.JPanel" name="jPanel2">
453
        <Container class="javax.swing.JPanel" name="jPanel2">
454
          <Constraints>
454
          <Constraints>
455
            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
455
            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
456
              <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="0.0"/>
456
              <GridBagConstraints gridX="2" 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="0.0"/>
457
            </Constraint>
457
            </Constraint>
458
          </Constraints>
458
          </Constraints>
459
459
460
          <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
460
          <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
461
        </Container>
461
        </Container>
462
        <Component class="javax.swing.JLabel" name="jLabel6">
463
          <Properties>
464
            <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
465
              <ComponentRef name="profile"/>
466
            </Property>
467
            <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
468
              <ResourceString bundle="org/netbeans/modules/java/j2seproject/ui/customizer/Bundle.properties" key="LBL_Profile" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
469
            </Property>
470
          </Properties>
471
          <AccessibilityProperties>
472
            <Property name="AccessibleContext.accessibleName" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
473
              <ResourceString bundle="org/netbeans/modules/java/j2seproject/ui/customizer/Bundle.properties" key="LBL_Profile" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
474
            </Property>
475
          </AccessibilityProperties>
476
          <AuxValues>
477
            <AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
478
          </AuxValues>
479
          <Constraints>
480
            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
481
              <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="12" insetsBottom="0" insetsRight="12" anchor="21" weightX="0.0" weightY="0.0"/>
482
            </Constraint>
483
          </Constraints>
484
        </Component>
485
        <Component class="javax.swing.JComboBox" name="profile">
486
          <Properties>
487
            <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
488
              <StringArray count="4">
489
                <StringItem index="0" value="Item 1"/>
490
                <StringItem index="1" value="Item 2"/>
491
                <StringItem index="2" value="Item 3"/>
492
                <StringItem index="3" value="Item 4"/>
493
              </StringArray>
494
            </Property>
495
          </Properties>
496
          <AccessibilityProperties>
497
            <Property name="AccessibleContext.accessibleName" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
498
              <ResourceString bundle="org/netbeans/modules/java/j2seproject/ui/customizer/Bundle.properties" key="AN_Profile" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
499
            </Property>
500
            <Property name="AccessibleContext.accessibleDescription" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
501
              <ResourceString bundle="org/netbeans/modules/java/j2seproject/ui/customizer/Bundle.properties" key="AD_Profile" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
502
            </Property>
503
          </AccessibilityProperties>
504
          <Constraints>
505
            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
506
              <GridBagConstraints gridX="-1" gridY="1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
507
            </Constraint>
508
          </Constraints>
509
        </Component>
462
      </SubComponents>
510
      </SubComponents>
463
    </Container>
511
    </Container>
464
  </SubComponents>
512
  </SubComponents>
(-)a/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerSources.java (-2 / +48 lines)
Lines 58-63 Link Here
58
import javax.swing.table.TableColumn;
58
import javax.swing.table.TableColumn;
59
import javax.swing.table.TableModel;
59
import javax.swing.table.TableModel;
60
import org.netbeans.modules.java.api.common.project.ui.customizer.SourceRootsUi;
60
import org.netbeans.modules.java.api.common.project.ui.customizer.SourceRootsUi;
61
import org.netbeans.modules.java.api.common.ui.PlatformUiSupport;
61
import org.netbeans.spi.java.project.support.ui.IncludeExcludeVisualizer;
62
import org.netbeans.spi.java.project.support.ui.IncludeExcludeVisualizer;
62
import org.netbeans.spi.project.ui.support.ProjectCustomizer;
63
import org.netbeans.spi.project.ui.support.ProjectCustomizer;
63
import org.openide.DialogDescriptor;
64
import org.openide.DialogDescriptor;
Lines 65-70 Link Here
65
import org.openide.NotifyDescriptor;
66
import org.openide.NotifyDescriptor;
66
import org.openide.filesystems.FileObject;
67
import org.openide.filesystems.FileObject;
67
import org.openide.filesystems.FileUtil;
68
import org.openide.filesystems.FileUtil;
69
import org.openide.modules.SpecificationVersion;
68
import org.openide.util.HelpCtx;
70
import org.openide.util.HelpCtx;
69
import org.openide.util.NbBundle;
71
import org.openide.util.NbBundle;
70
72
Lines 122-142 Link Here
122
        emTSR.setRelatedEditMediator( emSR );
124
        emTSR.setRelatedEditMediator( emSR );
123
        this.sourceLevel.setEditable(false);
125
        this.sourceLevel.setEditable(false);
124
        this.sourceLevel.setModel(uiProperties.JAVAC_SOURCE_MODEL);
126
        this.sourceLevel.setModel(uiProperties.JAVAC_SOURCE_MODEL);
125
        this.sourceLevel.setRenderer(uiProperties.JAVAC_SOURCE_RENDERER);        
127
        this.sourceLevel.setRenderer(uiProperties.JAVAC_SOURCE_RENDERER);
126
        uiProperties.JAVAC_SOURCE_MODEL.addListDataListener(new ListDataListener () {
128
        uiProperties.JAVAC_SOURCE_MODEL.addListDataListener(new ListDataListener () {
127
            public void intervalAdded(ListDataEvent e) {
129
            public void intervalAdded(ListDataEvent e) {
128
                enableSourceLevel ();
130
                enableSourceLevel ();
131
                enableProfiles();
129
            }
132
            }
130
133
131
            public void intervalRemoved(ListDataEvent e) {
134
            public void intervalRemoved(ListDataEvent e) {
132
                enableSourceLevel ();
135
                enableSourceLevel ();
136
                enableProfiles();
133
            }
137
            }
134
138
135
            public void contentsChanged(ListDataEvent e) {
139
            public void contentsChanged(ListDataEvent e) {
136
                enableSourceLevel ();
140
                enableSourceLevel ();
141
                enableProfiles();
137
            }                                    
142
            }                                    
138
        });
143
        });
144
        this.profile.setEditable(false);
145
        this.profile.setModel(uiProperties.JAVAC_PROFILE_MODEL);
146
        this.profile.setRenderer(uiProperties.JAVAC_PROFILE_RENDERER);
139
        enableSourceLevel ();
147
        enableSourceLevel ();
148
        enableProfiles();
140
        this.originalEncoding = this.uiProperties.getProject().evaluator().getProperty(J2SEProjectProperties.SOURCE_ENCODING);
149
        this.originalEncoding = this.uiProperties.getProject().evaluator().getProperty(J2SEProjectProperties.SOURCE_ENCODING);
141
        if (this.originalEncoding == null) {
150
        if (this.originalEncoding == null) {
142
            this.originalEncoding = Charset.defaultCharset().name();
151
            this.originalEncoding = Charset.defaultCharset().name();
Lines 245-250 Link Here
245
    private void enableSourceLevel () {
254
    private void enableSourceLevel () {
246
        this.sourceLevel.setEnabled(sourceLevel.getItemCount()>0);
255
        this.sourceLevel.setEnabled(sourceLevel.getItemCount()>0);
247
    }
256
    }
257
258
    private void enableProfiles() {
259
        final Object si = this.sourceLevel.getSelectedItem();
260
        final boolean pe = si != null &&
261
              PlatformUiSupport.getSourceLevel(si) != null &&
262
              new SpecificationVersion("1.8").compareTo(PlatformUiSupport.getSourceLevel(si)) <= 0; //NOI18N
263
        this.profile.setEnabled(pe);
264
        this.jLabel6.setEnabled(pe);
265
    }
248
    
266
    
249
    private static class ResizableRowHeightTable extends JTable {
267
    private static class ResizableRowHeightTable extends JTable {
250
268
Lines 339-344 Link Here
339
        jLabel5 = new javax.swing.JLabel();
357
        jLabel5 = new javax.swing.JLabel();
340
        encoding = new javax.swing.JComboBox();
358
        encoding = new javax.swing.JComboBox();
341
        jPanel2 = new javax.swing.JPanel();
359
        jPanel2 = new javax.swing.JPanel();
360
        jLabel6 = new javax.swing.JLabel();
361
        profile = new javax.swing.JComboBox();
342
362
343
        setLayout(new java.awt.GridBagLayout());
363
        setLayout(new java.awt.GridBagLayout());
344
364
Lines 610-615 Link Here
610
            }
630
            }
611
        });
631
        });
612
        gridBagConstraints = new java.awt.GridBagConstraints();
632
        gridBagConstraints = new java.awt.GridBagConstraints();
633
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
613
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
634
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
614
        jPanel1.add(includeExcludeButton, gridBagConstraints);
635
        jPanel1.add(includeExcludeButton, gridBagConstraints);
615
        includeExcludeButton.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CustomizerSources.class, "AD_CustomizerSources_Include")); // NOI18N
636
        includeExcludeButton.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CustomizerSources.class, "AD_CustomizerSources_Include")); // NOI18N
Lines 618-624 Link Here
618
        org.openide.awt.Mnemonics.setLocalizedText(jLabel5, org.openide.util.NbBundle.getMessage(CustomizerSources.class, "TXT_Encoding")); // NOI18N
639
        org.openide.awt.Mnemonics.setLocalizedText(jLabel5, org.openide.util.NbBundle.getMessage(CustomizerSources.class, "TXT_Encoding")); // NOI18N
619
        gridBagConstraints = new java.awt.GridBagConstraints();
640
        gridBagConstraints = new java.awt.GridBagConstraints();
620
        gridBagConstraints.gridx = 0;
641
        gridBagConstraints.gridx = 0;
621
        gridBagConstraints.gridy = 1;
642
        gridBagConstraints.gridy = 2;
622
        gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
643
        gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
623
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
644
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
624
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
645
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
Lines 628-645 Link Here
628
649
629
        encoding.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
650
        encoding.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
630
        gridBagConstraints = new java.awt.GridBagConstraints();
651
        gridBagConstraints = new java.awt.GridBagConstraints();
652
        gridBagConstraints.gridy = 2;
631
        gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
653
        gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
632
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
654
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
633
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
655
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
634
        gridBagConstraints.insets = new java.awt.Insets(8, 0, 0, 0);
656
        gridBagConstraints.insets = new java.awt.Insets(8, 0, 0, 0);
635
        jPanel1.add(encoding, gridBagConstraints);
657
        jPanel1.add(encoding, gridBagConstraints);
636
        gridBagConstraints = new java.awt.GridBagConstraints();
658
        gridBagConstraints = new java.awt.GridBagConstraints();
659
        gridBagConstraints.gridx = 2;
660
        gridBagConstraints.gridy = 1;
637
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
661
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
638
        gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
662
        gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
639
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
663
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
640
        gridBagConstraints.weightx = 1.0;
664
        gridBagConstraints.weightx = 1.0;
641
        jPanel1.add(jPanel2, gridBagConstraints);
665
        jPanel1.add(jPanel2, gridBagConstraints);
642
666
667
        jLabel6.setLabelFor(profile);
668
        org.openide.awt.Mnemonics.setLocalizedText(jLabel6, org.openide.util.NbBundle.getMessage(CustomizerSources.class, "LBL_Profile")); // NOI18N
669
        gridBagConstraints = new java.awt.GridBagConstraints();
670
        gridBagConstraints.gridx = 0;
671
        gridBagConstraints.gridy = 1;
672
        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
673
        gridBagConstraints.insets = new java.awt.Insets(4, 12, 0, 12);
674
        jPanel1.add(jLabel6, gridBagConstraints);
675
        jLabel6.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CustomizerSources.class, "LBL_Profile")); // NOI18N
676
677
        profile.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
678
        gridBagConstraints = new java.awt.GridBagConstraints();
679
        gridBagConstraints.gridy = 1;
680
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
681
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
682
        gridBagConstraints.insets = new java.awt.Insets(4, 0, 0, 0);
683
        jPanel1.add(profile, gridBagConstraints);
684
        profile.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CustomizerSources.class, "AN_Profile")); // NOI18N
685
        profile.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CustomizerSources.class, "AD_Profile")); // NOI18N
686
643
        gridBagConstraints = new java.awt.GridBagConstraints();
687
        gridBagConstraints = new java.awt.GridBagConstraints();
644
        gridBagConstraints.gridx = 0;
688
        gridBagConstraints.gridx = 0;
645
        gridBagConstraints.gridy = 3;
689
        gridBagConstraints.gridy = 3;
Lines 675-684 Link Here
675
    private javax.swing.JLabel jLabel3;
719
    private javax.swing.JLabel jLabel3;
676
    private javax.swing.JLabel jLabel4;
720
    private javax.swing.JLabel jLabel4;
677
    private javax.swing.JLabel jLabel5;
721
    private javax.swing.JLabel jLabel5;
722
    private javax.swing.JLabel jLabel6;
678
    private javax.swing.JPanel jPanel1;
723
    private javax.swing.JPanel jPanel1;
679
    private javax.swing.JPanel jPanel2;
724
    private javax.swing.JPanel jPanel2;
680
    private javax.swing.JScrollPane jScrollPane1;
725
    private javax.swing.JScrollPane jScrollPane1;
681
    private javax.swing.JScrollPane jScrollPane2;
726
    private javax.swing.JScrollPane jScrollPane2;
727
    private javax.swing.JComboBox profile;
682
    private javax.swing.JTextField projectLocation;
728
    private javax.swing.JTextField projectLocation;
683
    private javax.swing.JButton removeSourceRoot;
729
    private javax.swing.JButton removeSourceRoot;
684
    private javax.swing.JButton removeTestRoot;
730
    private javax.swing.JButton removeTestRoot;
(-)a/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/J2SEProjectProperties.java (+7 lines)
Lines 147-152 Link Here
147
    public static final String JAR_COMPRESS = "jar.compress"; // NOI18N
147
    public static final String JAR_COMPRESS = "jar.compress"; // NOI18N
148
    public static final String JAVAC_SOURCE = "javac.source"; // NOI18N
148
    public static final String JAVAC_SOURCE = "javac.source"; // NOI18N
149
    public static final String JAVAC_TARGET = "javac.target"; // NOI18N
149
    public static final String JAVAC_TARGET = "javac.target"; // NOI18N
150
    public static final String JAVAC_PROFILE = "javac.profile"; // NOI18N
150
    public static final String JAVAC_DEBUG = "javac.debug"; // NOI18N
151
    public static final String JAVAC_DEBUG = "javac.debug"; // NOI18N
151
    public static final String JAVAC_DEPRECATION = "javac.deprecation"; // NOI18N
152
    public static final String JAVAC_DEPRECATION = "javac.deprecation"; // NOI18N
152
    public static final String JAVAC_COMPILER_ARG = "javac.compilerargs";    //NOI18N
153
    public static final String JAVAC_COMPILER_ARG = "javac.compilerargs";    //NOI18N
Lines 195-200 Link Here
195
    DefaultTableModel SOURCE_ROOTS_MODEL;
196
    DefaultTableModel SOURCE_ROOTS_MODEL;
196
    DefaultTableModel TEST_ROOTS_MODEL;
197
    DefaultTableModel TEST_ROOTS_MODEL;
197
    ComboBoxModel JAVAC_SOURCE_MODEL;
198
    ComboBoxModel JAVAC_SOURCE_MODEL;
199
    ComboBoxModel JAVAC_PROFILE_MODEL;
198
     
200
     
199
    // CustomizerLibraries
201
    // CustomizerLibraries
200
    DefaultListModel JAVAC_CLASSPATH_MODEL;
202
    DefaultListModel JAVAC_CLASSPATH_MODEL;
Lines 207-212 Link Here
207
    ListCellRenderer CLASS_PATH_LIST_RENDERER;
209
    ListCellRenderer CLASS_PATH_LIST_RENDERER;
208
    ListCellRenderer PLATFORM_LIST_RENDERER;
210
    ListCellRenderer PLATFORM_LIST_RENDERER;
209
    ListCellRenderer JAVAC_SOURCE_RENDERER;
211
    ListCellRenderer JAVAC_SOURCE_RENDERER;
212
    ListCellRenderer JAVAC_PROFILE_RENDERER;
210
    Document SHARED_LIBRARIES_MODEL;
213
    Document SHARED_LIBRARIES_MODEL;
211
    
214
    
212
    // CustomizerCompile
215
    // CustomizerCompile
Lines 325-330 Link Here
325
        PLATFORM_LIST_RENDERER = PlatformUiSupport.createPlatformListCellRenderer();
328
        PLATFORM_LIST_RENDERER = PlatformUiSupport.createPlatformListCellRenderer();
326
        JAVAC_SOURCE_MODEL = PlatformUiSupport.createSourceLevelComboBoxModel (PLATFORM_MODEL, evaluator.getProperty(JAVAC_SOURCE), evaluator.getProperty(JAVAC_TARGET));
329
        JAVAC_SOURCE_MODEL = PlatformUiSupport.createSourceLevelComboBoxModel (PLATFORM_MODEL, evaluator.getProperty(JAVAC_SOURCE), evaluator.getProperty(JAVAC_TARGET));
327
        JAVAC_SOURCE_RENDERER = PlatformUiSupport.createSourceLevelListCellRenderer ();
330
        JAVAC_SOURCE_RENDERER = PlatformUiSupport.createSourceLevelListCellRenderer ();
331
        JAVAC_PROFILE_MODEL = PlatformUiSupport.createProfileComboBoxModel(JAVAC_SOURCE_MODEL, evaluator.getProperty(JAVAC_PROFILE), null);
332
        JAVAC_PROFILE_RENDERER = PlatformUiSupport.createProfileListCellRenderer();
333
328
        SHARED_LIBRARIES_MODEL = new PlainDocument(); 
334
        SHARED_LIBRARIES_MODEL = new PlainDocument(); 
329
        try {
335
        try {
330
            SHARED_LIBRARIES_MODEL.insertString(0, project.getAntProjectHelper().getLibrariesLocation(), null);
336
            SHARED_LIBRARIES_MODEL.insertString(0, project.getAntProjectHelper().getLibrariesLocation(), null);
Lines 578-583 Link Here
578
                J2SEProject.PROJECT_CONFIGURATION_NAMESPACE,
584
                J2SEProject.PROJECT_CONFIGURATION_NAMESPACE,
579
                PLATFORM_MODEL.getSelectedItem(),
585
                PLATFORM_MODEL.getSelectedItem(),
580
                JAVAC_SOURCE_MODEL.getSelectedItem(),
586
                JAVAC_SOURCE_MODEL.getSelectedItem(),
587
                JAVAC_PROFILE_MODEL.getSelectedItem(),
581
                !isFXProject);
588
                !isFXProject);
582
                                
589
                                
583
        // Handle other special cases
590
        // Handle other special cases

Return to bug 226713