products/sources/formale Sprachen/Isabelle/Tools/jEdit/dist/macros/Files image not shown  

Quellcode-Bibliothek

© Kompilation durch diese Firma

[Weder Korrektheit noch Funktionsfähigkeit der Software werden zugesichert.]

Datei: TestScenarioAndResults.txt   Sprache: Text

Untersuchungsergebnis.bsh Download desCS {CS[93] Ada[105] Abap[133]}zum Wurzelverzeichnis wechseln

/*
 * Glob_Close.bsh - a BeanShell macro for jEdit that closes
 * all open buffers matching a given glob pattern.
 *
 * Copyright (C) 2003-2004 Ollie Rutherfurd <[email protected]>
 *
 * $Id: Glob_Close.bsh 22276 2012-09-29 11:59:27Z kerik-sf $
 */


import java.util.regex.Pattern;

//Localization
final static String GlobPatternLabel = jEdit.getProperty("macro.rs.GlobClose.GlobPattern.label""Glob Pattern:");
final static String ErrorGlobPattern = jEdit.getProperty("macro.rs.GlobClose.ErrorGlobPattern.error""Error in glob pattern:");
 
//Process
void globClose(View view)
{
 String glob = Macros.input(view, GlobPatternLabel);
 if(glob == null || glob.length() == 0)
  return;

 Pattern re = null;
 try
 {
  re = Pattern.compile(StandardUtilities.globToRE(glob));
 }
 catch(Exception e)
 {
  Macros.error(view, ErrorGlobPattern + " " + e.toString());
  return;
 }

 Buffer[] buffers = jEdit.getBuffers();
 for(int i=0; i < buffers.length; i++)
 {
  if(re.matcher(buffers[i].getPath()).matches())
   jEdit.closeBuffer(view,buffers[i]);
 }
}

globClose(view);

/*

<listitem>
<para><filename>Glob_Close.bsh</filename></para>
<abstract><para>
Closes all open buffers matching a given glob pattern.
</para></abstract>
</listitem>

*/


[ zur Elbe Produktseite wechseln0.94Quellennavigators  ]