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

(-)a/refactoring.java/apichanges.xml (+16 lines)
 Lines 49-54    Link Here 
49
        <apidef name="JavaRefactoringAPI">Java Refactoring API</apidef>
49
        <apidef name="JavaRefactoringAPI">Java Refactoring API</apidef>
50
    </apidefs>
50
    </apidefs>
51
    <changes>
51
    <changes>
52
        <change id="FilterSourcePackages">
53
            <api name="JavaRefactoringAPI"/>
54
            <summary>Added SOURCEFILE constant to JavaWhereUsedFilters.</summary>
55
            <version major="1" minor="54"/>
56
            <date day="27" month="11" year="2014"/>
57
            <author login="ralphbenjamin"/>
58
            <compatibility addition="yes"/>
59
            <description>
60
                <p>
61
                    To support filtering the opposite of test sources, the constant
62
                    SOURCEFILE is added to the enum JavaWhereUsedFilters.
63
                </p>    
64
            </description>
65
            <class package="org.netbeans.modules.refactoring.java.spi" name="JavaWhereUsedFilters"/>
66
            <issue number="248250"/>
67
        </change>
52
        <change id="DocTrees">
68
        <change id="DocTrees">
53
            <api name="JavaRefactoringAPI"/>
69
            <api name="JavaRefactoringAPI"/>
54
            <summary>RefactoringVisitor has support for visiting DocTrees</summary>
70
            <summary>RefactoringVisitor has support for visiting DocTrees</summary>
(-)a/refactoring.java/nbproject/project.properties (-1 / +1 lines)
 Lines 2-8    Link Here 
2
javadoc.arch=${basedir}/arch.xml
2
javadoc.arch=${basedir}/arch.xml
3
javadoc.apichanges=${basedir}/apichanges.xml
3
javadoc.apichanges=${basedir}/apichanges.xml
4
4
5
spec.version.base=1.53.0
5
spec.version.base=1.54.0
6
#test configs
6
#test configs
7
test.config.find.includes=\
7
test.config.find.includes=\
8
    **/FindUsagesSuite.class
8
    **/FindUsagesSuite.class
(-)a/refactoring.java/src/org/netbeans/modules/refactoring/java/plugins/JavaWhereUsedQueryPlugin.java (-5 / +15 lines)
 Lines 484-489    Link Here 
484
                ImageUtilities.loadImageIcon("org/netbeans/modules/refactoring/java/resources/found_item_import.png", false));
484
                ImageUtilities.loadImageIcon("org/netbeans/modules/refactoring/java/resources/found_item_import.png", false));
485
        filtersDescription.addFilter(JavaWhereUsedFilters.COMMENT.getKey(), "Comment filter", true,
485
        filtersDescription.addFilter(JavaWhereUsedFilters.COMMENT.getKey(), "Comment filter", true,
486
                ImageUtilities.loadImageIcon("org/netbeans/modules/refactoring/java/resources/found_item_comment.png", false));
486
                ImageUtilities.loadImageIcon("org/netbeans/modules/refactoring/java/resources/found_item_comment.png", false));
487
        filtersDescription.addFilter(JavaWhereUsedFilters.SOURCEFILE.getKey(), "Source filter", true,
488
                ImageUtilities.loadImageIcon("org/netbeans/modules/refactoring/java/resources/found_item_source.png", false));
487
        filtersDescription.addFilter(JavaWhereUsedFilters.TESTFILE.getKey(), "Test filter", true,
489
        filtersDescription.addFilter(JavaWhereUsedFilters.TESTFILE.getKey(), "Test filter", true,
488
                ImageUtilities.loadImageIcon("org/netbeans/modules/refactoring/java/resources/found_item_test.png", false));
490
                ImageUtilities.loadImageIcon("org/netbeans/modules/refactoring/java/resources/found_item_test.png", false));
489
    }
491
    }
 Lines 549-559    Link Here 
549
                    }
551
                    }
550
                    elements.add(refactoring, el);
552
                    elements.add(refactoring, el);
551
                }
553
                }
552
                if(fromTestRoot && !foundElements.isEmpty()) {
554
                if(!foundElements.isEmpty()) {
553
                    usedFilters.add(JavaWhereUsedFilters.TESTFILE.getKey());
555
                    if(fromTestRoot) {
554
                }
556
                        usedFilters.add(JavaWhereUsedFilters.TESTFILE.getKey());
555
                if(!foundElements.isEmpty() && findVisitor.usagesInComments()) {
557
                    }
556
                    usedFilters.add(JavaWhereUsedFilters.COMMENT.getKey());
558
                    if(!fromTestRoot) {
559
                        usedFilters.add(JavaWhereUsedFilters.SOURCEFILE.getKey());
560
                    }
561
                    if(findVisitor.usagesInComments()) {
562
                        usedFilters.add(JavaWhereUsedFilters.COMMENT.getKey());
563
                    }
557
                }
564
                }
558
            }
565
            }
559
            Collection<TreePath> result = new ArrayList<>();
566
            Collection<TreePath> result = new ArrayList<>();
 Lines 573-578    Link Here 
573
            if(fromTestRoot && !result.isEmpty()) {
580
            if(fromTestRoot && !result.isEmpty()) {
574
                usedFilters.add(JavaWhereUsedFilters.TESTFILE.getKey());
581
                usedFilters.add(JavaWhereUsedFilters.TESTFILE.getKey());
575
            }
582
            }
583
            if(!fromTestRoot && !result.isEmpty()) {
584
                usedFilters.add(JavaWhereUsedFilters.SOURCEFILE.getKey());
585
            }
576
            if(inImport.get()) {
586
            if(inImport.get()) {
577
                usedFilters.add(JavaWhereUsedFilters.IMPORT.getKey());
587
                usedFilters.add(JavaWhereUsedFilters.IMPORT.getKey());
578
            }
588
            }
(-)a/refactoring.java/src/org/netbeans/modules/refactoring/java/spi/JavaWhereUsedFilters.java (-1 / +5 lines)
 Lines 51-57    Link Here 
51
51
52
    IMPORT("filter-import"),
52
    IMPORT("filter-import"),
53
    COMMENT("filter-comment"),
53
    COMMENT("filter-comment"),
54
    TESTFILE("filter-testfile");
54
    TESTFILE("filter-testfile"),
55
    /**
56
     * @since 1.54
57
     */
58
    SOURCEFILE("filter-sourcefile");
55
    private final String key;
59
    private final String key;
56
60
57
    private JavaWhereUsedFilters(String key) {
61
    private JavaWhereUsedFilters(String key) {

Return to bug 248250
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