# HG changeset patch # User František Kučera # Date 1702750175 -3600 # Node ID 41e91ea94acbf26a7689e29638ce4a6b94720a1e # Parent 9abe4cd1f308a88dd4500ffb2f8183f6c3b00a1d přesun pluginu pro jEdit do složky extra diff -r 9abe4cd1f308 -r 41e91ea94acb extra/rozsirene-atributy-jedit/build.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extra/rozsirene-atributy-jedit/build.xml Sat Dec 16 19:09:35 2023 +0100 @@ -0,0 +1,12 @@ + + + Builds, tests, and runs the project rozsirene-atributy-jedit. + + + + + + + + + diff -r 9abe4cd1f308 -r 41e91ea94acb extra/rozsirene-atributy-jedit/nbproject/build-impl.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extra/rozsirene-atributy-jedit/nbproject/build-impl.xml Sat Dec 16 19:09:35 2023 +0100 @@ -0,0 +1,1436 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + 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 + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 9abe4cd1f308 -r 41e91ea94acb extra/rozsirene-atributy-jedit/nbproject/genfiles.properties --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extra/rozsirene-atributy-jedit/nbproject/genfiles.properties Sat Dec 16 19:09:35 2023 +0100 @@ -0,0 +1,8 @@ +build.xml.data.CRC32=7277d265 +build.xml.script.CRC32=adeb86a8 +build.xml.stylesheet.CRC32=28e38971@1.50.3.46 +# 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=ba482802 +nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48 diff -r 9abe4cd1f308 -r 41e91ea94acb extra/rozsirene-atributy-jedit/nbproject/project.properties --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extra/rozsirene-atributy-jedit/nbproject/project.properties Sat Dec 16 19:09:35 2023 +0100 @@ -0,0 +1,87 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +application.title=rozsirene-atributy-jedit +application.vendor=fiki +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/rozsirene-atributy-jedit.jar +dist.javadoc.dir=${dist.dir}/javadoc +endorsed.classpath= +excludes= +file.reference.jedit.jar=/usr/share/jedit/jedit.jar +includes=** +jar.archive.disabled=${jnlp.enabled} +jar.compress=false +jar.index=${jnlp.enabled} +javac.classpath=\ + ${file.reference.jedit.jar}:\ + ${reference.rozsirene-atributy.jar} +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +jnlp.codebase.type=no.codebase +jnlp.descriptor=application +jnlp.enabled=false +jnlp.mixed.code=default +jnlp.offline-allowed=false +jnlp.signed=false +jnlp.signing= +jnlp.signing.alias= +jnlp.signing.keystore= +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=true +platform.active=default_platform +project.rozsirene-atributy=../rozsirene-atributy +reference.rozsirene-atributy.jar=${project.rozsirene-atributy}/dist/rozsirene-atributy.jar +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project +# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value +# or test-sys-prop.name=value to set system properties for unit tests): +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff -r 9abe4cd1f308 -r 41e91ea94acb extra/rozsirene-atributy-jedit/nbproject/project.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extra/rozsirene-atributy-jedit/nbproject/project.xml Sat Dec 16 19:09:35 2023 +0100 @@ -0,0 +1,25 @@ + + + org.netbeans.modules.java.j2seproject + + + rozsirene-atributy-jedit + + + + + + + + + + rozsirene-atributy + jar + + jar + clean + jar + + + + diff -r 9abe4cd1f308 -r 41e91ea94acb extra/rozsirene-atributy-jedit/src/RozsireneAtributy.props --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extra/rozsirene-atributy-jedit/src/RozsireneAtributy.props Sat Dec 16 19:09:35 2023 +0100 @@ -0,0 +1,21 @@ +plugin.cz.frantovo.rozsireneAtributy.jedit.Plugin.activate=defer +plugin.cz.frantovo.rozsireneAtributy.jedit.Plugin.name=Roz\u0161\u00ed\u0159en\u00e9 atributy +plugin.cz.frantovo.rozsireneAtributy.jedit.Plugin.author=Franti\u0161ek Ku\u010dera +plugin.cz.frantovo.rozsireneAtributy.jedit.Plugin.version=0.1 + +plugin.cz.frantovo.rozsireneAtributy.jedit.Plugin.depend.0=jedit 04.00.00.00 +#Pot\u0159eba kv\u016fli API pro pr\u00e1ci s roz\u0161\u00ed\u0159en\u00fdmi atributy soubor\u016f +plugin.cz.frantovo.rozsireneAtributy.jedit.Plugin.depend.1=jdk 1.7 +plugin.cz.frantovo.rozsireneAtributy.jedit.Plugin.description=Slou\u017e\u00ed k zobrazov\u00e1n\u00ed a editaci roz\u0161\u00ed\u0159en\u00fdch atribut\u016f upravovan\u00e9ho souboru. +plugin.cz.frantovo.rozsireneAtributy.jedit.Plugin.usePluginHome=true + +rozsireneAtributy-panel.name.label=Roz\u0161\u00ed\u0159en\u00e9 atributy 1 +#N\u00e1zev panelu +rozsireneAtributy-panel.title=Roz\u0161\u00ed\u0159en\u00e9 atributy + +plugin.cz.frantovo.rozsireneAtributy.jedit.Plugin.menu=rozsireneAtributy-zobrazit + + +rozsireneAtributy.label=Roz\u0161\u00ed\u0159en\u00e9 atributy 4 +#Polo\u017eka v nab\u00eddce +rozsireneAtributy-zobrazit.label=Zobrazit panel diff -r 9abe4cd1f308 -r 41e91ea94acb extra/rozsirene-atributy-jedit/src/actions.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extra/rozsirene-atributy-jedit/src/actions.xml Sat Dec 16 19:09:35 2023 +0100 @@ -0,0 +1,8 @@ + + + + + wm.addDockableWindow("rozsireneAtributy-panel"); + + + \ No newline at end of file diff -r 9abe4cd1f308 -r 41e91ea94acb extra/rozsirene-atributy-jedit/src/cz/frantovo/rozsireneAtributy/jedit/DokovatelnyPanel.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extra/rozsirene-atributy-jedit/src/cz/frantovo/rozsireneAtributy/jedit/DokovatelnyPanel.java Sat Dec 16 19:09:35 2023 +0100 @@ -0,0 +1,140 @@ +/** + * Rozšířené atributy – program na správu rozšířených atributů souborů + * Copyright © 2012 František Kučera (frantovo.cz) + * + * 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 3 of the License. + * + * 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 this program. If not, see . + */ +package cz.frantovo.rozsireneAtributy.jedit; + +import cz.frantovo.rozsireneAtributy.gui.Model; +import cz.frantovo.rozsireneAtributy.gui.Panel; +import java.awt.BorderLayout; +import java.io.File; +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; +import org.gjt.sp.jedit.EBMessage; +import org.gjt.sp.jedit.EditBus; +import org.gjt.sp.jedit.View; +import org.gjt.sp.jedit.msg.EditPaneUpdate; + +/** + * + * @author Ing. František Kučera (frantovo.cz) + */ +public class DokovatelnyPanel extends JPanel implements EBComponent { + + private static final Logger log = Logger + .getLogger(DokovatelnyPanel.class.getName()); + private View view; + private Panel panel; + + public DokovatelnyPanel(final View view, final String position) { + this.view = view; + setLayout(new BorderLayout()); + změňSoubor(view.getBuffer(), false); + } + + /** + * Zaregistrujeme se, aby nám chodily události editoru. + */ + @Override + public void addNotify() { + super.addNotify(); + EditBus.addToBus(this); + } + + /** + * @see #addNotify() + */ + @Override + public void removeNotify() { + super.removeNotify(); + EditBus.removeFromBus(this); + } + + /** + * 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 + */ + @Override + public void handleMessage(EBMessage událost) { + try { + if (událost instanceof EditPaneUpdate) { + 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()) { + // 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 + // událost instanceof PropertiesChanged + } catch (Exception e) { + log.log(Level.WARNING, "Chyba při zpracování: " + událost, e); + } + + } + + private void změňSoubor(Buffer b, boolean využijAtributy) { + try { + File s = new File(b.getPath()); + + if (s.isFile() && s.canRead()) { + Model m = new Model(s); + + if (panel == null) { + panel = new Panel(m); + removeAll(); + add(panel, BorderLayout.CENTER); + } else { + 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); + } + } catch (IOException e) { + 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!"); + } +} diff -r 9abe4cd1f308 -r 41e91ea94acb extra/rozsirene-atributy-jedit/src/cz/frantovo/rozsireneAtributy/jedit/Plugin.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extra/rozsirene-atributy-jedit/src/cz/frantovo/rozsireneAtributy/jedit/Plugin.java Sat Dec 16 19:09:35 2023 +0100 @@ -0,0 +1,42 @@ +/** + * Rozšířené atributy – program na správu rozšířených atributů souborů + * Copyright © 2012 František Kučera (frantovo.cz) + * + * 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 3 of the License. + * + * 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 this program. If not, see . + */ +package cz.frantovo.rozsireneAtributy.jedit; + +import org.gjt.sp.jedit.EBMessage; +import org.gjt.sp.jedit.EBPlugin; + +/** + * + * @author Ing. František Kučera (frantovo.cz) + */ +public class Plugin extends EBPlugin { + + @Override + public void start() { + super.start(); + } + + @Override + public void stop() { + super.stop(); + } + + @Override + public void handleMessage(EBMessage message) { + super.handleMessage(message); + } +} diff -r 9abe4cd1f308 -r 41e91ea94acb extra/rozsirene-atributy-jedit/src/dockables.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extra/rozsirene-atributy-jedit/src/dockables.xml Sat Dec 16 19:09:35 2023 +0100 @@ -0,0 +1,7 @@ + + + + + new cz.frantovo.rozsireneAtributy.jedit.DokovatelnyPanel(view, position); + + diff -r 9abe4cd1f308 -r 41e91ea94acb java/rozsirene-atributy-jedit/build.xml --- a/java/rozsirene-atributy-jedit/build.xml Sat Dec 16 14:48:17 2023 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - Builds, tests, and runs the project rozsirene-atributy-jedit. - - - - - - - - - diff -r 9abe4cd1f308 -r 41e91ea94acb java/rozsirene-atributy-jedit/nbproject/build-impl.xml --- a/java/rozsirene-atributy-jedit/nbproject/build-impl.xml Sat Dec 16 14:48:17 2023 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1436 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set src.dir - Must set test.src.dir - Must set build.dir - Must set dist.dir - Must set build.classes.dir - Must set dist.javadoc.dir - Must set build.test.classes.dir - Must set build.test.results.dir - Must set build.classes.excludes - Must set dist.jar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set javac.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - No tests executed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set JVM to use for profiling in profiler.info.jvm - Must set profiler agent JVM arguments in profiler.info.jvmargs.agent - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To run this application from the command line without Ant, try: - - java -jar "${dist.jar.resolved}" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set run.class - - - - Must select one file in the IDE or set run.class - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set debug.class - - - - - Must select one file in the IDE or set debug.class - - - - - Must set fix.includes - - - - - - - - - - This target only works when run from inside the NetBeans IDE. - - - - - - - - - Must select one file in the IDE or set profile.class - This target only works when run from inside the NetBeans IDE. - - - - - - - - - This target only works when run from inside the NetBeans IDE. - - - - - - - - - - - - - This target only works when run from inside the NetBeans IDE. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - - - Some tests failed; see details above. - - - - - - - - - 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 - - - - - - - - - - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9abe4cd1f308 -r 41e91ea94acb java/rozsirene-atributy-jedit/nbproject/genfiles.properties --- a/java/rozsirene-atributy-jedit/nbproject/genfiles.properties Sat Dec 16 14:48:17 2023 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -build.xml.data.CRC32=7277d265 -build.xml.script.CRC32=adeb86a8 -build.xml.stylesheet.CRC32=28e38971@1.50.3.46 -# 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=ba482802 -nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48 diff -r 9abe4cd1f308 -r 41e91ea94acb java/rozsirene-atributy-jedit/nbproject/project.properties --- a/java/rozsirene-atributy-jedit/nbproject/project.properties Sat Dec 16 14:48:17 2023 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -annotation.processing.enabled=true -annotation.processing.enabled.in.editor=false -annotation.processing.processors.list= -annotation.processing.run.all.processors=true -annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output -application.title=rozsirene-atributy-jedit -application.vendor=fiki -build.classes.dir=${build.dir}/classes -build.classes.excludes=**/*.java,**/*.form -# This directory is removed when the project is cleaned: -build.dir=build -build.generated.dir=${build.dir}/generated -build.generated.sources.dir=${build.dir}/generated-sources -# Only compile against the classpath explicitly listed here: -build.sysclasspath=ignore -build.test.classes.dir=${build.dir}/test/classes -build.test.results.dir=${build.dir}/test/results -# Uncomment to specify the preferred debugger connection transport: -#debug.transport=dt_socket -debug.classpath=\ - ${run.classpath} -debug.test.classpath=\ - ${run.test.classpath} -# This directory is removed when the project is cleaned: -dist.dir=dist -dist.jar=${dist.dir}/rozsirene-atributy-jedit.jar -dist.javadoc.dir=${dist.dir}/javadoc -endorsed.classpath= -excludes= -file.reference.jedit.jar=/usr/share/jedit/jedit.jar -includes=** -jar.archive.disabled=${jnlp.enabled} -jar.compress=false -jar.index=${jnlp.enabled} -javac.classpath=\ - ${file.reference.jedit.jar}:\ - ${reference.rozsirene-atributy.jar} -# Space-separated list of extra javac options -javac.compilerargs= -javac.deprecation=false -javac.processorpath=\ - ${javac.classpath} -javac.source=1.7 -javac.target=1.7 -javac.test.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -javac.test.processorpath=\ - ${javac.test.classpath} -javadoc.additionalparam= -javadoc.author=false -javadoc.encoding=${source.encoding} -javadoc.noindex=false -javadoc.nonavbar=false -javadoc.notree=false -javadoc.private=false -javadoc.splitindex=true -javadoc.use=true -javadoc.version=false -javadoc.windowtitle= -jnlp.codebase.type=no.codebase -jnlp.descriptor=application -jnlp.enabled=false -jnlp.mixed.code=default -jnlp.offline-allowed=false -jnlp.signed=false -jnlp.signing= -jnlp.signing.alias= -jnlp.signing.keystore= -meta.inf.dir=${src.dir}/META-INF -mkdist.disabled=true -platform.active=default_platform -project.rozsirene-atributy=../rozsirene-atributy -reference.rozsirene-atributy.jar=${project.rozsirene-atributy}/dist/rozsirene-atributy.jar -run.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -# Space-separated list of JVM arguments used when running the project -# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value -# or test-sys-prop.name=value to set system properties for unit tests): -run.jvmargs= -run.test.classpath=\ - ${javac.test.classpath}:\ - ${build.test.classes.dir} -source.encoding=UTF-8 -src.dir=src -test.src.dir=test diff -r 9abe4cd1f308 -r 41e91ea94acb java/rozsirene-atributy-jedit/nbproject/project.xml --- a/java/rozsirene-atributy-jedit/nbproject/project.xml Sat Dec 16 14:48:17 2023 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ - - - org.netbeans.modules.java.j2seproject - - - rozsirene-atributy-jedit - - - - - - - - - - rozsirene-atributy - jar - - jar - clean - jar - - - - diff -r 9abe4cd1f308 -r 41e91ea94acb java/rozsirene-atributy-jedit/src/RozsireneAtributy.props --- a/java/rozsirene-atributy-jedit/src/RozsireneAtributy.props Sat Dec 16 14:48:17 2023 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ -plugin.cz.frantovo.rozsireneAtributy.jedit.Plugin.activate=defer -plugin.cz.frantovo.rozsireneAtributy.jedit.Plugin.name=Roz\u0161\u00ed\u0159en\u00e9 atributy -plugin.cz.frantovo.rozsireneAtributy.jedit.Plugin.author=Franti\u0161ek Ku\u010dera -plugin.cz.frantovo.rozsireneAtributy.jedit.Plugin.version=0.1 - -plugin.cz.frantovo.rozsireneAtributy.jedit.Plugin.depend.0=jedit 04.00.00.00 -#Pot\u0159eba kv\u016fli API pro pr\u00e1ci s roz\u0161\u00ed\u0159en\u00fdmi atributy soubor\u016f -plugin.cz.frantovo.rozsireneAtributy.jedit.Plugin.depend.1=jdk 1.7 -plugin.cz.frantovo.rozsireneAtributy.jedit.Plugin.description=Slou\u017e\u00ed k zobrazov\u00e1n\u00ed a editaci roz\u0161\u00ed\u0159en\u00fdch atribut\u016f upravovan\u00e9ho souboru. -plugin.cz.frantovo.rozsireneAtributy.jedit.Plugin.usePluginHome=true - -rozsireneAtributy-panel.name.label=Roz\u0161\u00ed\u0159en\u00e9 atributy 1 -#N\u00e1zev panelu -rozsireneAtributy-panel.title=Roz\u0161\u00ed\u0159en\u00e9 atributy - -plugin.cz.frantovo.rozsireneAtributy.jedit.Plugin.menu=rozsireneAtributy-zobrazit - - -rozsireneAtributy.label=Roz\u0161\u00ed\u0159en\u00e9 atributy 4 -#Polo\u017eka v nab\u00eddce -rozsireneAtributy-zobrazit.label=Zobrazit panel diff -r 9abe4cd1f308 -r 41e91ea94acb java/rozsirene-atributy-jedit/src/actions.xml --- a/java/rozsirene-atributy-jedit/src/actions.xml Sat Dec 16 14:48:17 2023 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - - - - - wm.addDockableWindow("rozsireneAtributy-panel"); - - - \ No newline at end of file diff -r 9abe4cd1f308 -r 41e91ea94acb java/rozsirene-atributy-jedit/src/cz/frantovo/rozsireneAtributy/jedit/DokovatelnyPanel.java --- a/java/rozsirene-atributy-jedit/src/cz/frantovo/rozsireneAtributy/jedit/DokovatelnyPanel.java Sat Dec 16 14:48:17 2023 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,140 +0,0 @@ -/** - * Rozšířené atributy – program na správu rozšířených atributů souborů - * Copyright © 2012 František Kučera (frantovo.cz) - * - * 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 3 of the License. - * - * 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 this program. If not, see . - */ -package cz.frantovo.rozsireneAtributy.jedit; - -import cz.frantovo.rozsireneAtributy.gui.Model; -import cz.frantovo.rozsireneAtributy.gui.Panel; -import java.awt.BorderLayout; -import java.io.File; -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; -import org.gjt.sp.jedit.EBMessage; -import org.gjt.sp.jedit.EditBus; -import org.gjt.sp.jedit.View; -import org.gjt.sp.jedit.msg.EditPaneUpdate; - -/** - * - * @author Ing. František Kučera (frantovo.cz) - */ -public class DokovatelnyPanel extends JPanel implements EBComponent { - - private static final Logger log = Logger - .getLogger(DokovatelnyPanel.class.getName()); - private View view; - private Panel panel; - - public DokovatelnyPanel(final View view, final String position) { - this.view = view; - setLayout(new BorderLayout()); - změňSoubor(view.getBuffer(), false); - } - - /** - * Zaregistrujeme se, aby nám chodily události editoru. - */ - @Override - public void addNotify() { - super.addNotify(); - EditBus.addToBus(this); - } - - /** - * @see #addNotify() - */ - @Override - public void removeNotify() { - super.removeNotify(); - EditBus.removeFromBus(this); - } - - /** - * 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 - */ - @Override - public void handleMessage(EBMessage událost) { - try { - if (událost instanceof EditPaneUpdate) { - 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()) { - // 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 - // událost instanceof PropertiesChanged - } catch (Exception e) { - log.log(Level.WARNING, "Chyba při zpracování: " + událost, e); - } - - } - - private void změňSoubor(Buffer b, boolean využijAtributy) { - try { - File s = new File(b.getPath()); - - if (s.isFile() && s.canRead()) { - Model m = new Model(s); - - if (panel == null) { - panel = new Panel(m); - removeAll(); - add(panel, BorderLayout.CENTER); - } else { - 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); - } - } catch (IOException e) { - 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!"); - } -} diff -r 9abe4cd1f308 -r 41e91ea94acb java/rozsirene-atributy-jedit/src/cz/frantovo/rozsireneAtributy/jedit/Plugin.java --- a/java/rozsirene-atributy-jedit/src/cz/frantovo/rozsireneAtributy/jedit/Plugin.java Sat Dec 16 14:48:17 2023 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/** - * Rozšířené atributy – program na správu rozšířených atributů souborů - * Copyright © 2012 František Kučera (frantovo.cz) - * - * 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 3 of the License. - * - * 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 this program. If not, see . - */ -package cz.frantovo.rozsireneAtributy.jedit; - -import org.gjt.sp.jedit.EBMessage; -import org.gjt.sp.jedit.EBPlugin; - -/** - * - * @author Ing. František Kučera (frantovo.cz) - */ -public class Plugin extends EBPlugin { - - @Override - public void start() { - super.start(); - } - - @Override - public void stop() { - super.stop(); - } - - @Override - public void handleMessage(EBMessage message) { - super.handleMessage(message); - } -} diff -r 9abe4cd1f308 -r 41e91ea94acb java/rozsirene-atributy-jedit/src/dockables.xml --- a/java/rozsirene-atributy-jedit/src/dockables.xml Sat Dec 16 14:48:17 2023 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ - - - - - new cz.frantovo.rozsireneAtributy.jedit.DokovatelnyPanel(view, position); - -