/* Koders Search V3.1
* (c) 2008/06/12, by Thorsten Willert (thorsten.willert@gmx.de)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
import javax.swing.border.*;
void koderssearch()
{
keyWord = new StringBuffer();
buffer.readLock();
int pos = textArea.getCaretPosition();
textArea.selectWord();
keyWord = textArea.getSelectedText();
textArea.setCaretPosition(pos);
buffer.readUnlock();
//==============================================================================
String sTitle = "www.koders.com - Koders Search V3.1, by Thorsten Willert";
String[] sLanguages = {"AUTO","*","ActionScript","Ada","ASP","Assembler","C","C#","Cpp","Cobol","ColdFusion","Delphi","Eiffel","Erlang","Fortran","Java","JavaScript","JSP","Lisp","Lua","Mathematica","Matlab","ObjectiveC","Perl","PHP","Prolog","Python","Ruby","Scheme","Smalltalk","SQL","Tcl","VB","VB.NET"};
String[] sLicense = {"*","AFL","AL20","ASL","APSL","BSD","CPL","EPL10","GTPL","GPL","LGPL","IBMPL","IOSL","MSCL","MSPL","MSRL","MSVSSDK","MITD","MPL10","MPL11","NPL10","NPL11","OSL","PSFL","SPL","W3C","WXWLL","ZLL","ZPL"};
//==============================================================================
JFrame dialog = new JFrame(sTitle);
content = new JPanel(new BorderLayout() );
dialog.setContentPane(content);
dialog.setResizable(false);
buttonPanel = new JPanel(new GridLayout(1,4,3,3) );
buttonPanel.setBorder( new EmptyBorder(3,3,3,3) );
buttonPanel.add( new JLabel("Language:") );
ComboType = new JComboBox();
for ( int i=0;i < sLanguages.length; i++) ComboType.addItem( sLanguages[i] );
buttonPanel.add( ComboType );
ComboType.setToolTipText("Select your programming language.
AUTO uses the edit-mode from the current buffer.");
ButtonLicense = new JButton("License:"); // url doesn't work here!
ButtonLicense.addActionListener(this);
ButtonLicense.setToolTipText("Click for Open Source License Information");
ButtonLicense.setContentAreaFilled( false );
ButtonLicense.setBorderPainted( false );
buttonPanel.add( ButtonLicense );
ComboLicense = new JComboBox();
buttonPanel.add( ComboLicense );
for ( int i=0;i < sLicense.length; i++) ComboLicense.addItem( sLicense[i] );
content.add(buttonPanel, "Center");
ComboLicense.setToolTipText("Select your license.");
ButtonSearchTerms = new JButton("Get");
ButtonSearchTerms.addActionListener(this);
buttonPanel.add( ButtonSearchTerms );
ButtonSearchTerms.setToolTipText("Get the word unter the cursor.");
SearchField = new HistoryTextField("macro.Koders_Search_Terms");
buttonPanel.add( SearchField );
SearchField.setToolTipText("
<search terms> | Search for <search terms> within files. |
cdef:<search terms> | Search for classes whose name contains <search terms> |
mdef:<search terms> | Search for methods whose name contains <search terms> |
idef:<search terms> | Search for interfaces whose name contains <search terms> |
file:<search terms> | Search for files with names that match the <search terms> |