# HG changeset patch # User František Kučera # Date 1702249715 -3600 # Node ID 1d345074992ca147ea07e648d5ef7785b55704e9 # Parent 8f2d112a3635b6dc395e118a54602048b73da258 jedit: přidání dosud neuložených změn diff -r 8f2d112a3635 -r 1d345074992c java/rozsirene-atributy-jedit/nbproject/build-impl.xml --- a/java/rozsirene-atributy-jedit/nbproject/build-impl.xml Sun Dec 10 23:59:24 2023 +0100 +++ b/java/rozsirene-atributy-jedit/nbproject/build-impl.xml Mon Dec 11 00:08:35 2023 +0100 @@ -12,9 +12,9 @@ - execution - debugging - javadoc - - junit compilation - - junit execution - - junit debugging + - test compilation + - test execution + - test debugging - applet - cleanup @@ -46,14 +46,15 @@ - - + + + @@ -71,16 +72,20 @@ - + - - + + + - - - + + + + + + @@ -91,12 +96,6 @@ - - - - - - @@ -115,24 +114,12 @@ - + - + - - - - - - - - - - - - @@ -156,6 +143,7 @@ + @@ -168,6 +156,7 @@ + @@ -185,7 +174,15 @@ - + + + + + + + + + @@ -195,11 +192,38 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -253,6 +277,7 @@ + @@ -292,6 +317,7 @@ + @@ -332,11 +358,57 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -344,33 +416,277 @@ + + + - - - - - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -384,7 +700,7 @@ - + @@ -402,10 +718,13 @@ - + Must set JVM to use for profiling in profiler.info.jvm Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + @@ -456,13 +775,14 @@ - + + @@ -479,13 +799,15 @@ + - + + @@ -512,12 +834,15 @@ + + + - - + + @@ -528,8 +853,8 @@ - - + + @@ -557,7 +882,7 @@ - + - - + + + - - + + + - - - - - - + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + - java -cp "${run.classpath.with.dist.jar}" ${main.class} + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - To run this application from the command line without Ant, try: - - java -jar "${dist.jar.resolved}" - - + - + + - + + - + + + This target only works when run from inside the NetBeans IDE. @@ -788,8 +1120,9 @@ - + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. @@ -797,12 +1130,8 @@ - - + + This target only works when run from inside the NetBeans IDE. @@ -814,12 +1143,8 @@ - - + + This target only works when run from inside the NetBeans IDE. @@ -842,6 +1167,42 @@ + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + @@ -927,14 +1291,14 @@ - + Some tests failed; see details above. @@ -947,39 +1311,40 @@ Must select some files in the IDE or set test.includes - + Some tests failed; see details above. + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + - + Must select one file in the IDE or set test.class - - - - - - - - - - - - - - - + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + @@ -1037,6 +1402,7 @@ + @@ -1051,9 +1417,12 @@ - - - + + + + + + diff -r 8f2d112a3635 -r 1d345074992c java/rozsirene-atributy-jedit/nbproject/genfiles.properties --- a/java/rozsirene-atributy-jedit/nbproject/genfiles.properties Sun Dec 10 23:59:24 2023 +0100 +++ b/java/rozsirene-atributy-jedit/nbproject/genfiles.properties Mon Dec 11 00:08:35 2023 +0100 @@ -4,5 +4,5 @@ # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. nbproject/build-impl.xml.data.CRC32=7277d265 -nbproject/build-impl.xml.script.CRC32=03d441a8 -nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.3.46 +nbproject/build-impl.xml.script.CRC32=ba482802 +nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48 diff -r 8f2d112a3635 -r 1d345074992c java/rozsirene-atributy-jedit/src/cz/frantovo/rozsireneAtributy/jedit/DokovatelnyPanel.java --- a/java/rozsirene-atributy-jedit/src/cz/frantovo/rozsireneAtributy/jedit/DokovatelnyPanel.java Sun Dec 10 23:59:24 2023 +0100 +++ b/java/rozsirene-atributy-jedit/src/cz/frantovo/rozsireneAtributy/jedit/DokovatelnyPanel.java Mon Dec 11 00:08:35 2023 +0100 @@ -24,6 +24,7 @@ import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; +import javax.swing.JOptionPane; import javax.swing.JPanel; import org.gjt.sp.jedit.Buffer; import org.gjt.sp.jedit.EBComponent; @@ -45,7 +46,7 @@ public DokovatelnyPanel(final View view, final String position) { this.view = view; setLayout(new BorderLayout()); - změňSoubor(view.getBuffer()); + změňSoubor(view.getBuffer(), false); } /** @@ -67,8 +68,8 @@ } /** - * Zpracujeme události editoru. - * Zajímá nás přepnutí na jiný soubor – abychom pro něj zobrazili atributy. + * Zpracujeme události editoru. Zajímá nás přepnutí na jiný soubor – abychom + * pro něj zobrazili atributy. * * @param událost událost editoru */ @@ -79,7 +80,13 @@ EditPaneUpdate epu = (EditPaneUpdate) událost; // Chodí nám všechny události – potřebujeme filtrovat jen ty pro naše okno. if (view == epu.getEditPane().getView()) { - změňSoubor(view.getBuffer()); + // zajímá nás jen přepnutí souboru + if (epu.getWhat() == EditPaneUpdate.BUFFER_CHANGED) { + /** + * TODO: je soubor nově otevřený? + */ + změňSoubor(view.getBuffer(), epu.getWhat() == EditPaneUpdate.CREATED); + } } } // událost instanceof BufferUpdate @@ -90,7 +97,7 @@ } - private void změňSoubor(Buffer b) { + private void změňSoubor(Buffer b, boolean využijAtributy) { try { File s = new File(b.getPath()); @@ -105,6 +112,10 @@ panel.setModel(m); } + if (využijAtributy) { + využijAtributy(m, b); + } + } else { // TODO: zobrazit chybu log.log(Level.WARNING, "Soubor neexistuje nebo nemáme práva na čtení: {0}", s); @@ -113,4 +124,14 @@ log.log(Level.WARNING, "Chyba při změně souboru.", e); } } + + /** + * Nastaví jEdit podle atributů daného souboru: - odsazování - kódování + * + * @param m model obsahující atributy + * @param b soubor otevřený v editoru + */ + private void využijAtributy(Model m, Buffer b) { + JOptionPane.showMessageDialog(panel, "Nový soubor!"); + } }