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

(-)a/java.sourceui/apichanges.xml (-2 / +15 lines)
Lines 3-9 Link Here
3
<!--
3
<!--
4
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
5
5
6
Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
6
Copyright 1997-2011 Oracle and/or its affiliates. All rights reserved.
7
7
8
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
8
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
9
Other names may be trademarks of their respective owners.
9
Other names may be trademarks of their respective owners.
Lines 30-36 Link Here
30
Contributor(s):
30
Contributor(s):
31
31
32
The Original Software is NetBeans. The Initial Developer of the Original
32
The Original Software is NetBeans. The Initial Developer of the Original
33
Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
33
Software is Sun Microsystems, Inc. Portions Copyright 1997-2011 Sun
34
Microsystems, Inc. All Rights Reserved.
34
Microsystems, Inc. All Rights Reserved.
35
35
36
If you wish your version of this file to be governed by only the CDDL
36
If you wish your version of this file to be governed by only the CDDL
Lines 109-114 Link Here
109
109
110
    <changes>
110
    <changes>
111
111
112
        <change id="TypeElementFinder-find">
113
            <api name="general"/>
114
            <summary>Added overload method for TypeElementFinder.find which allows to specify the prefilled initial text</summary>
115
            <version major="1" minor="24"/>
116
            <date day="20" month="9" year="2011"/>
117
            <author login="jlahoda"/>
118
            <compatibility addition="yes" binary="compatible" deletion="no" deprecation="no" modification="no" semantic="compatible" source="compatible"/>
119
            <description>
120
                Added overload method for <code>TypeElementFinder.find</code> which allows to specify the prefilled initial text.
121
            </description>
122
            <class package="org.netbeans.api.java.source.ui" name="TypeElementFinder"/>
123
            <issue number="125811"/>
124
        </change>
112
        <change id="ElementJavadoc-getTextAsync">
125
        <change id="ElementJavadoc-getTextAsync">
113
            <api name="general"/>
126
            <api name="general"/>
114
            <summary>Added asynchronous version of getText method into ElementJavadoc </summary>
127
            <summary>Added asynchronous version of getText method into ElementJavadoc </summary>
(-)a/java.sourceui/nbproject/project.properties (-1 / +1 lines)
Lines 2-5 Link Here
2
javac.compilerargs=-Xlint -Xlint:-serial
2
javac.compilerargs=-Xlint -Xlint:-serial
3
javac.source=1.6
3
javac.source=1.6
4
javadoc.arch=${basedir}/arch.xml
4
javadoc.arch=${basedir}/arch.xml
5
spec.version.base=1.23.0
5
spec.version.base=1.24.0
(-)a/java.sourceui/nbproject/project.xml (-1 / +10 lines)
Lines 6-11 Link Here
6
            <code-name-base>org.netbeans.modules.java.sourceui</code-name-base>
6
            <code-name-base>org.netbeans.modules.java.sourceui</code-name-base>
7
            <module-dependencies>
7
            <module-dependencies>
8
                <dependency>
8
                <dependency>
9
                    <code-name-base>org.netbeans.api.annotations.common</code-name-base>
10
                    <build-prerequisite/>
11
                    <compile-dependency/>
12
                    <run-dependency>
13
                        <release-version>1</release-version>
14
                        <specification-version>1.10</specification-version>
15
                    </run-dependency>
16
                </dependency>
17
                <dependency>
9
                    <code-name-base>org.netbeans.api.java</code-name-base>
18
                    <code-name-base>org.netbeans.api.java</code-name-base>
10
                    <build-prerequisite/>
19
                    <build-prerequisite/>
11
                    <compile-dependency/>
20
                    <compile-dependency/>
Lines 98-104 Link Here
98
                    <compile-dependency/>
107
                    <compile-dependency/>
99
                    <run-dependency>
108
                    <run-dependency>
100
                        <release-version>1</release-version>
109
                        <release-version>1</release-version>
101
                        <specification-version>1.20</specification-version>
110
                        <specification-version>1.25</specification-version>
102
                    </run-dependency>
111
                    </run-dependency>
103
                </dependency>
112
                </dependency>
104
                <dependency>
113
                <dependency>
(-)a/java.sourceui/src/org/netbeans/api/java/source/ui/TypeElementFinder.java (-2 / +20 lines)
Lines 46-51 Link Here
46
46
47
import java.util.Set;
47
import java.util.Set;
48
import javax.lang.model.element.TypeElement;
48
import javax.lang.model.element.TypeElement;
49
import org.netbeans.api.annotations.common.CheckForNull;
50
import org.netbeans.api.annotations.common.NullAllowed;
49
import org.netbeans.api.java.source.ClassIndex;
51
import org.netbeans.api.java.source.ClassIndex;
50
import org.netbeans.api.java.source.ClasspathInfo;
52
import org.netbeans.api.java.source.ClasspathInfo;
51
import org.netbeans.api.java.source.ElementHandle;
53
import org.netbeans.api.java.source.ElementHandle;
Lines 67-80 Link Here
67
69
68
    /**
70
    /**
69
     * Searches for classes on given classpath using defined restrictions.
71
     * Searches for classes on given classpath using defined restrictions.
72
     *
73
     * @param cpInfo classpath used for search; optional, can be null,
74
     * everything available will be searched
75
     * @param customizer possibility to add restrictions to search result;
76
     * optional, can be null, no restriction will be applied
77
     * @return found type or null if dialog was canceled
78
     */
79
    public static @CheckForNull ElementHandle<TypeElement> find(@NullAllowed ClasspathInfo cpInfo, @NullAllowed final Customizer customizer) {
80
        return find(cpInfo, null, customizer);
81
    }
82
83
    /**
84
     * Searches for classes on given classpath using defined restrictions.
70
     * 
85
     * 
71
     * @param cpInfo classpath used for search; optional, can be null,
86
     * @param cpInfo classpath used for search; optional, can be null,
72
     * everything available will be searched
87
     * everything available will be searched
88
     * @param initialText text that should be prefilled in the type name text field, or null to prefill text automatically from the context
73
     * @param customizer possibility to add restrictions to search result; 
89
     * @param customizer possibility to add restrictions to search result; 
74
     * optional, can be null, no restriction will be applied
90
     * optional, can be null, no restriction will be applied
75
     * @return found type or null if dialog was canceled
91
     * @return found type or null if dialog was canceled
92
     * @since 1.24
76
     */
93
     */
77
    public static ElementHandle<TypeElement> find(ClasspathInfo cpInfo, final Customizer customizer) {
94
    public static @CheckForNull ElementHandle<TypeElement> find(@NullAllowed ClasspathInfo cpInfo, @NullAllowed String initialText, @NullAllowed final Customizer customizer) {
78
95
79
        // create filter only if client wants to customize the result
96
        // create filter only if client wants to customize the result
80
        TypeBrowser.Filter typeBrowserFilter = null;
97
        TypeBrowser.Filter typeBrowserFilter = null;
Lines 91-97 Link Here
91
        }
108
        }
92
        
109
        
93
        TypeDescriptor typeDescriptor = TypeBrowser.browse(
110
        TypeDescriptor typeDescriptor = TypeBrowser.browse(
94
                NbBundle.getMessage(TypeElementFinder.class, "DLG_FindType"), 
111
                NbBundle.getMessage(TypeElementFinder.class, "DLG_FindType"),
112
                initialText,
95
                typeBrowserFilter,
113
                typeBrowserFilter,
96
                new JavaTypeProvider(cpInfo, customizer == null ? null : customizer)
114
                new JavaTypeProvider(cpInfo, customizer == null ? null : customizer)
97
                );
115
                );

Return to bug 125811