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

(-)a/java.project/src/org/netbeans/modules/java/project/Bundle.properties (+2 lines)
Lines 135-140 Link Here
135
ERR_JavaTargetChooser_WrongPlatform=Wrong source level of the project. You will NOT be able to compile this file since it contains JDK 1.5 features. 
135
ERR_JavaTargetChooser_WrongPlatform=Wrong source level of the project. You will NOT be able to compile this file since it contains JDK 1.5 features. 
136
ERR_JavaTargetChooser_InvalidFolder=The Package is not a folder
136
ERR_JavaTargetChooser_InvalidFolder=The Package is not a folder
137
137
138
INFO_JavaTargetChooser_ProvideName=Provide valid Java Class name.
139
138
# copied from project/ui/Bundle
140
# copied from project/ui/Bundle
139
MSG_fs_or_folder_does_not_exist=The target folder does not exist.
141
MSG_fs_or_folder_does_not_exist=The target folder does not exist.
140
MSG_fs_is_readonly=The target folder is read-only.
142
MSG_fs_is_readonly=The target folder is read-only.
(-)a/java.project/src/org/netbeans/modules/java/project/JavaTargetChooserPanel.java (-9 / +20 lines)
Lines 114-120 Link Here
114
    }
114
    }
115
115
116
    public boolean isValid() {              
116
    public boolean isValid() {              
117
        if (gui == null || gui.getTargetName() == null) {
117
        if (gui == null) {
118
           setErrorMessage( null );
118
           setErrorMessage( null );
119
           return false;
119
           return false;
120
        }        
120
        }        
Lines 140-146 Link Here
140
            }
140
            }
141
        }
141
        }
142
        else {
142
        else {
143
            if ( !isValidTypeIdentifier( gui.getTargetName() ) ) {
143
            if (gui.getTargetName() == null) {
144
                setInfoMessage("INFO_JavaTargetChooser_ProvideName");
145
                return false;
146
            } 
147
            else if ( !isValidTypeIdentifier( gui.getTargetName() ) ) {
144
                setErrorMessage( "ERR_JavaTargetChooser_InvalidClass" );
148
                setErrorMessage( "ERR_JavaTargetChooser_InvalidClass" );
145
                return false;
149
                return false;
146
            }
150
            }
Lines 166-172 Link Here
166
        }
170
        }
167
        String errorMessage = canUseFileName (rootFolder, gui.getPackageFileName(), gui.getTargetName(), template.getExt ());        
171
        String errorMessage = canUseFileName (rootFolder, gui.getPackageFileName(), gui.getTargetName(), template.getExt ());        
168
        if (gui != null) {
172
        if (gui != null) {
169
            setLocalizedErrorMessage (errorMessage);
173
            setLocalizedMessage(WizardDescriptor.PROP_ERROR_MESSAGE, errorMessage);
170
        }
174
        }
171
        if (errorMessage!=null) returnValue=false;                
175
        if (errorMessage!=null) returnValue=false;                
172
        
176
        
Lines 261-275 Link Here
261
    
265
    
262
    private void setErrorMessage( String key ) {
266
    private void setErrorMessage( String key ) {
263
        if ( key == null ) {
267
        if ( key == null ) {
264
            setLocalizedErrorMessage ( "" ); // NOI18N
268
            setLocalizedMessage(WizardDescriptor.PROP_ERROR_MESSAGE, null);
265
        }
269
        } else {
266
        else {
270
            setLocalizedMessage(WizardDescriptor.PROP_ERROR_MESSAGE, NbBundle.getMessage(JavaTargetChooserPanelGUI.class, key));
267
            setLocalizedErrorMessage ( NbBundle.getMessage( JavaTargetChooserPanelGUI.class, key) ); // NOI18N
268
        }
271
        }
269
    }
272
    }
270
    
273
    
271
    private void setLocalizedErrorMessage (String message) {
274
    private void setInfoMessage(String key) {
272
        wizard.putProperty ("WizardPanel_errorMessage", message); // NOI18N
275
        if (key == null) {
276
            setLocalizedMessage(WizardDescriptor.PROP_INFO_MESSAGE, null);
277
        } else {
278
            setLocalizedMessage(WizardDescriptor.PROP_INFO_MESSAGE, NbBundle.getMessage(JavaTargetChooserPanelGUI.class, key));
279
        }
280
    }
281
    
282
    private void setLocalizedMessage(String msgType, String message) {
283
        wizard.putProperty(msgType, message);
273
    }
284
    }
274
    
285
    
275
    private FileObject getTargetFolderFromGUI (WizardDescriptor wd) {
286
    private FileObject getTargetFolderFromGUI (WizardDescriptor wd) {
(-)a/java.project/src/org/netbeans/modules/java/project/NewJavaFileWizardIterator.java (-3 / +3 lines)
Lines 173-179 Link Here
173
        panels = createPanels( wiz );
173
        panels = createPanels( wiz );
174
        // Make sure list of steps is accurate.
174
        // Make sure list of steps is accurate.
175
        String[] beforeSteps = null;
175
        String[] beforeSteps = null;
176
        Object prop = wiz.getProperty ("WizardPanel_contentData"); // NOI18N
176
        Object prop = wiz.getProperty(WizardDescriptor.PROP_CONTENT_DATA);
177
        if (prop != null && prop instanceof String[]) {
177
        if (prop != null && prop instanceof String[]) {
178
            beforeSteps = (String[])prop;
178
            beforeSteps = (String[])prop;
179
        }
179
        }
Lines 189-197 Link Here
189
            if (c instanceof JComponent) { // assume Swing components
189
            if (c instanceof JComponent) { // assume Swing components
190
                JComponent jc = (JComponent)c;
190
                JComponent jc = (JComponent)c;
191
                // Step #.
191
                // Step #.
192
                jc.putClientProperty("WizardPanel_contentSelectedIndex", new Integer(i)); // NOI18N
192
                jc.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, new Integer(i));
193
                // Step name (actually the whole list for reference).
193
                // Step name (actually the whole list for reference).
194
                jc.putClientProperty("WizardPanel_contentData", steps); // NOI18N
194
                jc.putClientProperty(WizardDescriptor.PROP_CONTENT_DATA, steps);
195
            }
195
            }
196
        }
196
        }
197
    }
197
    }
(-)a/java.project/src/org/netbeans/spi/java/project/support/ui/MakeSharableVisualPanel1.java (-3 / +3 lines)
Lines 90-109 Link Here
90
        String location = getLibraryLocation();
90
        String location = getLibraryLocation();
91
        boolean wrong = false;
91
        boolean wrong = false;
92
        if (new File(location).isAbsolute()) {
92
        if (new File(location).isAbsolute()) {
93
            settings.putProperty("WizardPanel_errorMessage", // NOI18N
93
            settings.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE,
94
                    org.openide.util.NbBundle.getMessage(MakeSharableVisualPanel1.class, "WARN_MakeSharable.absolutePath"));
94
                    org.openide.util.NbBundle.getMessage(MakeSharableVisualPanel1.class, "WARN_MakeSharable.absolutePath"));
95
            wrong = true;
95
            wrong = true;
96
        } else {
96
        } else {
97
            File projectLoc = FileUtil.toFile(helper.getProjectDirectory());
97
            File projectLoc = FileUtil.toFile(helper.getProjectDirectory());
98
            File libLoc = PropertyUtils.resolveFile(projectLoc, location);
98
            File libLoc = PropertyUtils.resolveFile(projectLoc, location);
99
            if (!CollocationQuery.areCollocated(projectLoc, libLoc)) {
99
            if (!CollocationQuery.areCollocated(projectLoc, libLoc)) {
100
                settings.putProperty("WizardPanel_errorMessage", // NOI18N
100
                settings.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE,
101
                        org.openide.util.NbBundle.getMessage(MakeSharableVisualPanel1.class, "WARN_makeSharable.relativePath"));
101
                        org.openide.util.NbBundle.getMessage(MakeSharableVisualPanel1.class, "WARN_makeSharable.relativePath"));
102
                wrong = true;
102
                wrong = true;
103
            }
103
            }
104
        }
104
        }
105
        if (!wrong) {
105
        if (!wrong) {
106
            settings.putProperty("WizardPanel_errorMessage", null);// NOI18N
106
            settings.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, null);
107
        }
107
        }
108
108
109
        return true;
109
        return true;
(-)a/java.project/src/org/netbeans/spi/java/project/support/ui/SharableLibrariesUtils.java (-5 / +5 lines)
Lines 287-301 Link Here
287
            if (c instanceof JComponent) { // assume Swing components
287
            if (c instanceof JComponent) { // assume Swing components
288
                JComponent jc = (JComponent) c;
288
                JComponent jc = (JComponent) c;
289
                // Sets step number of a component
289
                // Sets step number of a component
290
                jc.putClientProperty("WizardPanel_contentSelectedIndex", new Integer(i));
290
                jc.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, new Integer(i));
291
                // Sets steps names for a panel
291
                // Sets steps names for a panel
292
                jc.putClientProperty("WizardPanel_contentData", steps);
292
                jc.putClientProperty(WizardDescriptor.PROP_CONTENT_DATA, steps);
293
                // Turn on subtitle creation on each step
293
                // Turn on subtitle creation on each step
294
                jc.putClientProperty("WizardPanel_autoWizardStyle", Boolean.TRUE);
294
                jc.putClientProperty(WizardDescriptor.PROP_AUTO_WIZARD_STYLE, Boolean.TRUE);
295
                // Show steps on the left side with the image on the background
295
                // Show steps on the left side with the image on the background
296
                jc.putClientProperty("WizardPanel_contentDisplayed", Boolean.TRUE);
296
                jc.putClientProperty(WizardDescriptor.PROP_CONTENT_DISPLAYED, Boolean.TRUE);
297
                // Turn on numbering of all steps
297
                // Turn on numbering of all steps
298
                jc.putClientProperty("WizardPanel_contentNumbered", Boolean.TRUE);
298
                jc.putClientProperty(WizardDescriptor.PROP_CONTENT_NUMBERED, Boolean.TRUE);
299
            }
299
            }
300
        }
300
        }
301
        return panels;
301
        return panels;

Return to bug 138128