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

(-)a/dlight.remote.impl/nbproject/project.xml (-1 / +1 lines)
Lines 86-92 Link Here
86
                    <build-prerequisite/>
86
                    <build-prerequisite/>
87
                    <compile-dependency/>
87
                    <compile-dependency/>
88
                    <run-dependency>
88
                    <run-dependency>
89
                        <specification-version>9.0</specification-version>
89
                        <specification-version>9.6</specification-version>
90
                    </run-dependency>
90
                    </run-dependency>
91
                </dependency>
91
                </dependency>
92
                <dependency>
92
                <dependency>
(-)a/dlight.remote.impl/src/org/netbeans/modules/remote/impl/fs/RemoteFileSystem.java (+2 lines)
Lines 618-623 Link Here
618
        }
618
        }
619
        if (attrName.equals(FileObject.DEFAULT_LINE_SEPARATOR_ATTR)) {
619
        if (attrName.equals(FileObject.DEFAULT_LINE_SEPARATOR_ATTR)) {
620
            return "\n"; // NOI18N
620
            return "\n"; // NOI18N
621
        } else if (attrName.equals(FileObject.DEFAULT_PATHNAME_SEPARATOR_ATTR)) {
622
            return "/"; // NOI18N
621
        } else if (attrName.equals(READONLY_ATTRIBUTES)) {
623
        } else if (attrName.equals(READONLY_ATTRIBUTES)) {
622
            return Boolean.FALSE;
624
            return Boolean.FALSE;
623
        } else if (attrName.equals("isRemoteAndSlow")) { // NOI18N
625
        } else if (attrName.equals("isRemoteAndSlow")) { // NOI18N
(-)a/projectui/nbproject/project.xml (-17 / +17 lines)
Lines 76-81 Link Here
76
                    </run-dependency>
76
                    </run-dependency>
77
                </dependency>
77
                </dependency>
78
                <dependency>
78
                <dependency>
79
                    <code-name-base>org.netbeans.api.templates</code-name-base>
80
                    <build-prerequisite/>
81
                    <compile-dependency/>
82
                    <run-dependency>
83
                        <specification-version>1.0</specification-version>
84
                    </run-dependency>
85
                </dependency>
86
                <dependency>
79
                    <code-name-base>org.netbeans.core.execution</code-name-base>
87
                    <code-name-base>org.netbeans.core.execution</code-name-base>
80
                    <run-dependency>
88
                    <run-dependency>
81
                        <release-version>1</release-version>
89
                        <release-version>1</release-version>
Lines 200-206 Link Here
200
                    <build-prerequisite/>
208
                    <build-prerequisite/>
201
                    <compile-dependency/>
209
                    <compile-dependency/>
202
                    <run-dependency>
210
                    <run-dependency>
203
                        <specification-version>9.0</specification-version>
211
                        <specification-version>9.6</specification-version>
204
                    </run-dependency>
212
                    </run-dependency>
205
                </dependency>
213
                </dependency>
206
                <dependency>
214
                <dependency>
Lines 220-233 Link Here
220
                    </run-dependency>
228
                    </run-dependency>
221
                </dependency>
229
                </dependency>
222
                <dependency>
230
                <dependency>
223
                    <code-name-base>org.netbeans.api.templates</code-name-base>
224
                    <build-prerequisite/>
225
                    <compile-dependency/>
226
                    <run-dependency>
227
                        <specification-version>1.0</specification-version>
228
                    </run-dependency>
229
                </dependency>
230
                <dependency>
231
                    <code-name-base>org.openide.modules</code-name-base>
231
                    <code-name-base>org.openide.modules</code-name-base>
232
                    <build-prerequisite/>
232
                    <build-prerequisite/>
233
                    <compile-dependency/>
233
                    <compile-dependency/>
Lines 252-265 Link Here
252
                    </run-dependency>
252
                    </run-dependency>
253
                </dependency>
253
                </dependency>
254
                <dependency>
254
                <dependency>
255
                    <code-name-base>org.openide.util.ui</code-name-base>
256
                    <build-prerequisite/>
257
                    <compile-dependency/>
258
                    <run-dependency>
259
                        <specification-version>9.3</specification-version>
260
                    </run-dependency>
261
                </dependency>
262
                <dependency>
263
                    <code-name-base>org.openide.util</code-name-base>
255
                    <code-name-base>org.openide.util</code-name-base>
264
                    <build-prerequisite/>
256
                    <build-prerequisite/>
265
                    <compile-dependency/>
257
                    <compile-dependency/>
Lines 276-281 Link Here
276
                    </run-dependency>
268
                    </run-dependency>
277
                </dependency>
269
                </dependency>
278
                <dependency>
270
                <dependency>
271
                    <code-name-base>org.openide.util.ui</code-name-base>
272
                    <build-prerequisite/>
273
                    <compile-dependency/>
274
                    <run-dependency>
275
                        <specification-version>9.3</specification-version>
276
                    </run-dependency>
277
                </dependency>
278
                <dependency>
279
                    <code-name-base>org.openide.windows</code-name-base>
279
                    <code-name-base>org.openide.windows</code-name-base>
280
                    <build-prerequisite/>
280
                    <build-prerequisite/>
281
                    <compile-dependency/>
281
                    <compile-dependency/>
(-)a/projectui/src/org/netbeans/modules/project/ui/SimpleTargetChooserPanelGUI.java (-9 / +25 lines)
Lines 91-97 Link Here
91
    private final SourceGroup[] folders;
91
    private final SourceGroup[] folders;
92
    private boolean isFolder;
92
    private boolean isFolder;
93
    private boolean freeFileExtension;
93
    private boolean freeFileExtension;
94
    
94
    private final char separatorChar;
95
95
    @SuppressWarnings("LeakingThisInConstructor")
96
    @SuppressWarnings("LeakingThisInConstructor")
96
    @Messages("LBL_SimpleTargetChooserPanel_Name=Name and Location")
97
    @Messages("LBL_SimpleTargetChooserPanel_Name=Name and Location")
97
    public SimpleTargetChooserPanelGUI( @NullAllowed Project project, @NonNull SourceGroup[] folders, Component bottomPanel, boolean isFolder, boolean freeFileExtension) {
98
    public SimpleTargetChooserPanelGUI( @NullAllowed Project project, @NonNull SourceGroup[] folders, Component bottomPanel, boolean isFolder, boolean freeFileExtension) {
Lines 99-104 Link Here
99
        this.folders = folders.clone();
100
        this.folders = folders.clone();
100
        this.isFolder = isFolder;
101
        this.isFolder = isFolder;
101
        this.freeFileExtension = freeFileExtension;
102
        this.freeFileExtension = freeFileExtension;
103
        this.separatorChar = getPathNameSeparator(project, folders);
102
        initComponents();
104
        initComponents();
103
        
105
        
104
        locationComboBox.setRenderer( CELL_RENDERER );
106
        locationComboBox.setRenderer( CELL_RENDERER );
Lines 117-122 Link Here
117
        
119
        
118
        setName(LBL_SimpleTargetChooserPanel_Name());
120
        setName(LBL_SimpleTargetChooserPanel_Name());
119
    }
121
    }
122
123
    private static char getPathNameSeparator(@NullAllowed Project project, @NonNull SourceGroup[] folders) {
124
        FileObject fo = null;
125
        if (folders != null && folders.length > 0) {
126
            fo = folders[0].getRootFolder();
127
        } else if (project != null) {
128
            fo = project.getProjectDirectory();
129
        }
130
        String separator = null;
131
        if (fo != null) {
132
            separator = (String) fo.getAttribute(FileObject.DEFAULT_PATHNAME_SEPARATOR_ATTR);
133
        }
134
        return (separator == null || separator.isEmpty()) ? File.separatorChar : separator.charAt(0);
135
    }
120
    
136
    
121
    @Messages({
137
    @Messages({
122
        "# 0 - original template name",
138
        "# 0 - original template name",
Lines 163-169 Link Here
163
            folderTextField.setText(getRelativeNativeName(rootFolder, preselectedFolder));
179
            folderTextField.setText(getRelativeNativeName(rootFolder, preselectedFolder));
164
        }
180
        }
165
        else if (project == null && preselectedFolder != null) {
181
        else if (project == null && preselectedFolder != null) {
166
            folderTextField.setText(preselectedFolder.getPath().replace('/', File.separatorChar));
182
            folderTextField.setText(preselectedFolder.getPath().replace('/', this.separatorChar));
167
        }
183
        }
168
184
169
        String ext = template == null ? "" : template.getExt(); // NOI18N
185
        String ext = template == null ? "" : template.getExt(); // NOI18N
Lines 245-255 Link Here
245
//                String home = System.getProperty("user.home");
261
//                String home = System.getProperty("user.home");
246
//                if (home != null && new File(home).isDirectory()) {
262
//                if (home != null && new File(home).isDirectory()) {
247
//                    FileObject homeFileObject = FileUtil.toFileObject(FileUtil.normalizeFile(new File(home)));
263
//                    FileObject homeFileObject = FileUtil.toFileObject(FileUtil.normalizeFile(new File(home)));
248
//                    folderName = FileUtil.getFileDisplayName(homeFileObject) + File.separatorChar + folderName;
264
//                    folderName = FileUtil.getFileDisplayName(homeFileObject) + this.separatorChar + folderName;
249
//                }
265
//                }
250
//            }
266
//            }
251
//
267
//
252
            return folderName.replace( File.separatorChar, '/' ); // NOI18N
268
            return folderName.replace( this.separatorChar, '/' ); // NOI18N
253
        }
269
        }
254
    }
270
    }
255
    
271
    
Lines 451-457 Link Here
451
            path = FileUtil.getRelativePath( root, folder );            
467
            path = FileUtil.getRelativePath( root, folder );            
452
        }
468
        }
453
        
469
        
454
        return path == null ? "" : path.replace( '/', File.separatorChar ); // NOI18N
470
        return path == null ? "" : path.replace( '/', this.separatorChar ); // NOI18N
455
    }
471
    }
456
    
472
    
457
    private void updateCreatedFolder() {
473
    private void updateCreatedFolder() {
Lines 470-476 Link Here
470
            ( folderName.endsWith("/") || folderName.endsWith( File.separator ) || folderName.length() == 0 ? "" : "/" ) + // NOI18N
486
            ( folderName.endsWith("/") || folderName.endsWith( File.separator ) || folderName.length() == 0 ? "" : "/" ) + // NOI18N
471
            documentName + (!freeFileExtension || documentName.indexOf('.') == -1 ? expectedExtension : "");
487
            documentName + (!freeFileExtension || documentName.indexOf('.') == -1 ? expectedExtension : "");
472
            
488
            
473
        fileTextField.setText( createdFileName.replace( '/', File.separatorChar ) ); // NOI18N    
489
        fileTextField.setText( createdFileName.replace( '/', this.separatorChar ) ); // NOI18N
474
            
490
            
475
        changeSupport.fireChange();
491
        changeSupport.fireChange();
476
    }
492
    }
Lines 491-501 Link Here
491
507
492
                fo = BrowseFolders.showDialog( new SourceGroup[] { group },
508
                fo = BrowseFolders.showDialog( new SourceGroup[] { group },
493
                                               project,
509
                                               project,
494
                                               folderTextField.getText().replace( File.separatorChar, '/' ) ); // NOI18N
510
                                               folderTextField.getText().replace( this.separatorChar, '/' ) ); // NOI18N
495
511
496
                if ( fo != null && fo.isFolder() ) {
512
                if ( fo != null && fo.isFolder() ) {
497
                    String relPath = FileUtil.getRelativePath( group.getRootFolder(), fo );
513
                    String relPath = FileUtil.getRelativePath( group.getRootFolder(), fo );
498
                    folderTextField.setText( relPath.replace( '/', File.separatorChar ) ); // NOI18N
514
                    folderTextField.setText( relPath.replace( '/', this.separatorChar ) ); // NOI18N
499
                }
515
                }
500
            }
516
            }
501
            else {
517
            else {
Lines 525-531 Link Here
525
                    if (path == null) {
541
                    if (path == null) {
526
                         path = fo.getPath();
542
                         path = fo.getPath();
527
                    }
543
                    }
528
                    folderTextField.setText( path.replace( '/', File.separatorChar ) ); // NOI18N
544
                    folderTextField.setText( path.replace( '/', this.separatorChar ) ); // NOI18N
529
                }
545
                }
530
            }
546
            }
531
        }
547
        }

Return to bug 248653