Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
View | Details | Raw Unified | Return to bug 89204 | Differences between
and this patch

Collapse All | Expand All

(-)form/nbproject/project.xml (+9 lines)
 Lines 65-70    Link Here 
65
                    </run-dependency>
65
                    </run-dependency>
66
                </dependency>
66
                </dependency>
67
                <dependency>
67
                <dependency>
68
                    <code-name-base>org.netbeans.modules.java.project</code-name-base>
69
                    <build-prerequisite/>
70
                    <compile-dependency/>
71
                    <run-dependency>
72
                        <release-version>1</release-version>
73
                        <specification-version>1.11</specification-version>
74
                    </run-dependency>
75
                </dependency>
76
                <dependency>
68
                    <code-name-base>org.netbeans.modules.projectapi</code-name-base>
77
                    <code-name-base>org.netbeans.modules.projectapi</code-name-base>
69
                    <build-prerequisite/>
78
                    <build-prerequisite/>
70
                    <compile-dependency/>
79
                    <compile-dependency/>
(-)form/src/org/netbeans/modules/i18n/form/I18nServiceImpl.java (-7 / +22 lines)
 Lines 26-32    Link Here 
26
import java.beans.PropertyEditor;
26
import java.beans.PropertyEditor;
27
import java.io.IOException;
27
import java.io.IOException;
28
import java.util.*;
28
import java.util.*;
29
30
import org.openide.ErrorManager;
29
import org.openide.ErrorManager;
31
import org.openide.DialogDisplayer;
30
import org.openide.DialogDisplayer;
32
import org.openide.filesystems.FileObject;
31
import org.openide.filesystems.FileObject;
 Lines 37-47    Link Here 
37
import org.openide.DialogDescriptor;
36
import org.openide.DialogDescriptor;
38
import org.openide.util.NbBundle;
37
import org.openide.util.NbBundle;
39
import org.netbeans.api.java.classpath.ClassPath;
38
import org.netbeans.api.java.classpath.ClassPath;
40
39
import org.netbeans.api.java.project.JavaProjectConstants;
40
import org.netbeans.api.project.FileOwnerQuery;
41
import org.netbeans.api.project.Project;
42
import org.netbeans.api.project.ProjectUtils;
43
import org.netbeans.api.project.SourceGroup;
44
import org.netbeans.api.project.Sources;
41
import org.netbeans.modules.properties.*;
45
import org.netbeans.modules.properties.*;
42
import org.netbeans.modules.i18n.*;
46
import org.netbeans.modules.i18n.*;
43
import org.netbeans.modules.i18n.java.JavaResourceHolder;
47
import org.netbeans.modules.i18n.java.JavaResourceHolder;
44
45
import org.netbeans.modules.form.I18nService;
48
import org.netbeans.modules.form.I18nService;
46
import org.netbeans.modules.form.I18nValue;
49
import org.netbeans.modules.form.I18nValue;
47
50
 Lines 461-478    Link Here 
461
            return null;
464
            return null;
462
465
463
        FileObject folder;
466
        FileObject folder;
464
        String fileName;
465
        ClassPath cp = ClassPath.getClassPath(srcDataObject.getPrimaryFile(), ClassPath.SOURCE);
467
        ClassPath cp = ClassPath.getClassPath(srcDataObject.getPrimaryFile(), ClassPath.SOURCE);
468
        FileObject root = cp.getRoots()[0];
469
        String fileName;
466
        int idx = filePath.lastIndexOf('/');
470
        int idx = filePath.lastIndexOf('/');
471
        boolean hasCustomRes = false;
472
        Project owner = FileOwnerQuery.getOwner(srcDataObject.getPrimaryFile());
473
        if (owner != null) {
474
            // this is for projects that have split sources/resources folder structures.
475
            Sources srcs = ProjectUtils.getSources(owner);
476
            SourceGroup[] grps = srcs.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_RESOURCES);
477
            if (grps != null && grps.length > 0) {
478
                hasCustomRes = true;
479
                root = grps[0].getRootFolder();
480
            }
481
        }
467
        if (idx < 0) { // default package
482
        if (idx < 0) { // default package
468
            folder = cp.getRoots()[0];
483
            folder = root;
469
            fileName = filePath;
484
            fileName = filePath;
470
        }
485
        }
471
        else {
486
        else {
472
            String folderPath = filePath.substring(0, idx);
487
            String folderPath = filePath.substring(0, idx);
473
            folder = cp.findResource(folderPath);
488
            folder = cp.findResource(folderPath);
474
            if (folder == null) {
489
            if (folder == null || hasCustomRes) {
475
                folder = FileUtil.createFolder(cp.getRoots()[0], folderPath);
490
                folder = FileUtil.createFolder(root, folderPath);
476
            }
491
            }
477
            fileName = filePath.substring(idx + 1);
492
            fileName = filePath.substring(idx + 1);
478
        }
493
        }

Return to bug 89204
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo