ichiba.ch Download the KAYWA Reader!
En | De | Fr

Feed2Mobile

Le Funes - Code-Folding en NetBeans


Si buscamos que NetBeans oculte nuestro código al igual que realiza con el código autogenerado debemos agregar solamente dos comentarios, que incluyen un tag de apertura y uno de cierre (al estilo XML) al inicio y fin respectivamente de la porción de código a ocultar:

comentario inicio: //<editor-fold defaultstate=”collapsed” desc=”Alguna Descripción”>

comentario fin: //</editor-fold>

en donde incluimos:

  • desc = Descripción que se mostrará al ocultar el texto
  • defaultstate = si es igual a “collpsed”, cuando NetBeans abra el archivo esta sección se encontrará cerrada por defecto

por ejemplo si tenemos el siguiente código al que queremos realizarle code folding:


public static void main(final String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {

        @Override
        public void run() {
            Test011_ConfExterno t = new Test011_ConfExterno();
            t.setLocationRelativeTo(null);
            t.setVisible(true);
        }
    });
}

Simplemente agregamos los comentarios y listo:


// <editorfold defaultstate="collapsed" desc="Metodo Main">
public static void main(final String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {

        @Override
        public void run() {
            Test011_ConfExterno t = new Test011_ConfExterno();
            t.setLocationRelativeTo(null);
            t.setVisible(true);
        }
    });
}
// </editorfold>

Note: this is how this feed will look on your mobile device.

Get mobile!

This QR Code will let any user whose mobile phone is equipped with a QR Code Reader to easily reach and bookmark the mobile version of «Le Funes»

To add this QR Code to your Blog or Website, simply copy-paste the following Javascript blurb into your Blog template.

Feed2Mobile v1.0-BETA3 CONTACT US: KAYWA // TECHNOPARKSTRASSE 1 // 8005 ZUERICH // SWITZERLAND // info@kaywa.com