/jEdit/tags/jedit-3-2-2/macros/Misc/List_Plugin_Internal_Names.bsh
# · Unknown · 52 lines · 47 code · 5 blank · 0 comment · 0 complexity · 53b33926ec6ee6ff31fca92340027e44 MD5 · raw file
- /*
- * List_Plugin_Internal_Names.bsh - a BeanShell macro script for the
- * jEdit text editor - lists installed plugins by internal working name
- * Copyright (C) 2001 John Gellene
- * jgellene@nyc.rr.com
- *
- * 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 the jEdit program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: List_Plugin_Internal_Names.bsh 3791 2001-09-02 05:36:59Z spestov $
- */
- void listPluginNames()
- {
- EditPlugin[] ep =jEdit.getPlugins();
- if(ep == null)
- {
- Macros.error(view, "Plugin list not found");
- return;
- }
- jEdit.newFile(view);
- Vector v = new Vector(ep.length);
- for(int i = 0; i < ep.length; ++i)
- {
- v.addElement(ep[i].getClassName());
- }
- MiscUtilities.quicksort(v, new MiscUtilities.StringICaseCompare());
- sb = new StringBuffer(ep.length * 16);
- for(i = 0; i < v.size(); ++i)
- {
- sb.append((String)v.elementAt(i));
- sb.append('\n');
- }
- textArea.setSelectedText(sb.toString());
- }
- listPluginNames();
- // end of List_Plugin_Internal_Names.bsh