Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quellcode-Bibliothek

© Kompilation durch diese Firma

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

Datei:   Sprache: Unknown

Haftungsausschluß.bsh KontaktLatech {Latech[91] CS[96] C[122]}diese Dinge liegen außhalb unserer Verantwortung

/*
 * Insert_Selection.bsh - Inserts the contents of the
 * current selection (assuming it's the path to a file)
 * into the current buffer -- replacing the selected
 * text.  Text must be selected and it must not span
 * multiple lines.
 *
 * Copyright (C) 2004 Ollie Rutherfurd <[email protected]>
 *
 * $Id: Insert_Selection.bsh 23971 2015-08-08 19:37:35Z daleanson $
 */

insertSelected(View view, String path){

 // read into temporary buffer
 Buffer b = jEdit.openTemporary(view,null,path,false);
 try{
  if(b == null)
   return;

  while(!b.isLoaded())
   VFSManager.waitForRequests();
  String text = b.getText(0,b.getLength());
  view.getTextArea().setSelectedText(text);
 }finally{
  if(b != null)
   jEdit._closeBuffer(null, b);
 }
}

 String selected = view.getTextArea().getSelectedText();
 if(selected == null || selected.indexOf('\n') != -1)
  Toolkit.getDefaultToolkit().beep();
 else
  insertSelected(view,selected);

/*

<listitem>
 <para><filename>Insert_Selection.bsh</filename></para>
 <abstract><para>Assumes the current selection is 
 file path and tries replaces the selection with the
 contents of the file.  Does nothing if no text is 
 selected or the selection spans multiple lines.
 </para></abstract>
</listitem>

*/

[ Seitenstruktur0.78Drucken  ]

                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik