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

(-)a/utilities/nbproject/project.xml (+9 lines)
Lines 64-69 made subject to such option by the copyr Link Here
64
                    </run-dependency>
64
                    </run-dependency>
65
                </dependency>
65
                </dependency>
66
                <dependency>
66
                <dependency>
67
                    <code-name-base>org.netbeans.modules.editor.lib2</code-name-base>
68
                    <build-prerequisite/>
69
                    <compile-dependency/>
70
                    <run-dependency>
71
                        <release-version>1</release-version>
72
                        <specification-version>1.6</specification-version>
73
                    </run-dependency>
74
                </dependency>
75
                <dependency>
67
                    <code-name-base>org.netbeans.modules.queries</code-name-base>
76
                    <code-name-base>org.netbeans.modules.queries</code-name-base>
68
                    <build-prerequisite/>
77
                    <build-prerequisite/>
69
                    <compile-dependency/>
78
                    <compile-dependency/>
(-)a/utilities/src/org/netbeans/modules/search/BasicSearchForm.java (-1 / +15 lines)
Lines 85-90 import org.jdesktop.layout.GroupLayout.P Link Here
85
import org.jdesktop.layout.GroupLayout.ParallelGroup;
85
import org.jdesktop.layout.GroupLayout.ParallelGroup;
86
import org.jdesktop.layout.GroupLayout.SequentialGroup;
86
import org.jdesktop.layout.GroupLayout.SequentialGroup;
87
import org.jdesktop.layout.LayoutStyle;
87
import org.jdesktop.layout.LayoutStyle;
88
import org.netbeans.api.editor.EditorRegistry;
88
import org.openide.ErrorManager;
89
import org.openide.ErrorManager;
89
import org.openide.awt.Mnemonics;
90
import org.openide.awt.Mnemonics;
90
import org.openide.util.Exceptions;
91
import org.openide.util.Exceptions;
Lines 136-142 final class BasicSearchForm extends JPan Link Here
136
             * BasicSearchCriteria.isSearchAndReplace() would return 'false'. */
137
             * BasicSearchCriteria.isSearchAndReplace() would return 'false'. */
137
            searchCriteria.setReplaceString("");                        //NOI18N
138
            searchCriteria.setReplaceString("");                        //NOI18N
138
        }
139
        }
139
140
        
140
        /*
141
        /*
141
         * Interaction must be already set up when we set values, otherwise
142
         * Interaction must be already set up when we set values, otherwise
142
         * state of the dialog might not be corresponding to the values,
143
         * state of the dialog might not be corresponding to the values,
Lines 147-152 final class BasicSearchForm extends JPan Link Here
147
            initPreviousValues();
148
            initPreviousValues();
148
        } else {
149
        } else {
149
            initValuesFromHistory();
150
            initValuesFromHistory();
151
        }
152
        
153
        /* Search for text selected editor */
154
        JTextComponent c = EditorRegistry.lastFocusedComponent();
155
        if (c != null) {
156
            String selText = c.getSelectedText();
157
            if (selText != null && selText.length() > 0) {
158
                int n = selText.indexOf( '\n' );
159
                if (n >= 0 ) selText = selText.substring(0, n);
160
                cboxTextToFind.setSelectedIndex(-1);
161
                textToFindEditor.setText(selText);
162
                searchCriteria.setTextPattern(selText);
163
            }
150
        }
164
        }
151
    }
165
    }
152
166

Return to bug 68387