# HG changeset patch # User František Kučera # Date 1345288965 -7200 # Node ID 907c5c7c20ce6a5fbf08112cb96a5cfde4eea06c # Parent 75b7d41b74287dc69278e151208ffee0db813384 Doplněk pro jEdit – základ. diff -r 75b7d41b7428 -r 907c5c7c20ce .hgignore --- a/.hgignore Fri Dec 30 12:37:30 2011 +0100 +++ b/.hgignore Sat Aug 18 13:22:45 2012 +0200 @@ -1,3 +1,7 @@ java/rozsirene-atributy/dist/* java/rozsirene-atributy/build/* java/rozsirene-atributy/nbproject/private/* + +java/rozsirene-atributy-jedit/dist/* +java/rozsirene-atributy-jedit/build/* +java/rozsirene-atributy-jedit/nbproject/private/* diff -r 75b7d41b7428 -r 907c5c7c20ce java/rozsirene-atributy-jedit/nbproject/build-impl.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/rozsirene-atributy-jedit/nbproject/build-impl.xml Sat Aug 18 13:22:45 2012 +0200 @@ -0,0 +1,1067 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 -cp "${run.classpath.with.dist.jar}" ${main.class} + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + + + + + + + + + + Must select one file in the IDE or set profile.class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 one file in the IDE or set test.class + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 75b7d41b7428 -r 907c5c7c20ce java/rozsirene-atributy-jedit/nbproject/genfiles.properties --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/rozsirene-atributy-jedit/nbproject/genfiles.properties Sat Aug 18 13:22:45 2012 +0200 @@ -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=03d441a8 +nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.3.46 diff -r 75b7d41b7428 -r 907c5c7c20ce java/rozsirene-atributy-jedit/nbproject/project.properties --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/rozsirene-atributy-jedit/nbproject/project.properties Sat Aug 18 13:22:45 2012 +0200 @@ -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} +# 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}:\ + ${reference.rozsirene-atributy.jar} +# 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 75b7d41b7428 -r 907c5c7c20ce java/rozsirene-atributy-jedit/nbproject/project.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/rozsirene-atributy-jedit/nbproject/project.xml Sat Aug 18 13:22:45 2012 +0200 @@ -0,0 +1,25 @@ + + + org.netbeans.modules.java.j2seproject + + + rozsirene-atributy-jedit + + + + + + + + + + rozsirene-atributy + jar + + jar + clean + jar + + + + diff -r 75b7d41b7428 -r 907c5c7c20ce java/rozsirene-atributy-jedit/src/RozsireneAtributy.props --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/rozsirene-atributy-jedit/src/RozsireneAtributy.props Sat Aug 18 13:22:45 2012 +0200 @@ -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 75b7d41b7428 -r 907c5c7c20ce java/rozsirene-atributy-jedit/src/actions.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/rozsirene-atributy-jedit/src/actions.xml Sat Aug 18 13:22:45 2012 +0200 @@ -0,0 +1,8 @@ + + + + + wm.addDockableWindow("rozsireneAtributy-panel"); + + + \ No newline at end of file diff -r 75b7d41b7428 -r 907c5c7c20ce java/rozsirene-atributy-jedit/src/cz/frantovo/rozsireneAtributy/jedit/DokovatelnyPanel.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/rozsirene-atributy-jedit/src/cz/frantovo/rozsireneAtributy/jedit/DokovatelnyPanel.java Sat Aug 18 13:22:45 2012 +0200 @@ -0,0 +1,74 @@ +package cz.frantovo.rozsireneAtributy.jedit; + +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.swing.JPanel; +import javax.swing.JTextArea; +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 JTextArea pokus = new JTextArea("..."); + private View view; + + public DokovatelnyPanel(final View view, final String position) { + this.view = view; + add(pokus); + } + + /** + * 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()) { + změňSoubor(view.getBuffer()); + } + } + // událost instanceof BufferUpdate + // událost instanceof PropertiesChanged + } catch (Exception e) { + log.log(Level.WARNING, "Chyba při zpracování události: " + událost, e); + } + + } + + private void změňSoubor(Buffer b) { + pokus.setText(b.getPath()); + } +} diff -r 75b7d41b7428 -r 907c5c7c20ce java/rozsirene-atributy-jedit/src/cz/frantovo/rozsireneAtributy/jedit/Plugin.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/rozsirene-atributy-jedit/src/cz/frantovo/rozsireneAtributy/jedit/Plugin.java Sat Aug 18 13:22:45 2012 +0200 @@ -0,0 +1,26 @@ +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 75b7d41b7428 -r 907c5c7c20ce java/rozsirene-atributy-jedit/src/dockables.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/rozsirene-atributy-jedit/src/dockables.xml Sat Aug 18 13:22:45 2012 +0200 @@ -0,0 +1,7 @@ + + + + + new cz.frantovo.rozsireneAtributy.jedit.DokovatelnyPanel(view, position); + + \ No newline at end of file diff -r 75b7d41b7428 -r 907c5c7c20ce java/rozsirene-atributy/nbproject/build-impl.xml --- a/java/rozsirene-atributy/nbproject/build-impl.xml Fri Dec 30 12:37:30 2011 +0100 +++ b/java/rozsirene-atributy/nbproject/build-impl.xml Sat Aug 18 13:22:45 2012 +0200 @@ -20,10 +20,10 @@ --> - + - + @@ -198,6 +198,7 @@ + @@ -384,6 +385,7 @@ + @@ -514,7 +516,7 @@ - + @@ -839,6 +841,14 @@ --> + + + + + + + + @@ -850,6 +860,7 @@ + diff -r 75b7d41b7428 -r 907c5c7c20ce java/rozsirene-atributy/nbproject/genfiles.properties --- a/java/rozsirene-atributy/nbproject/genfiles.properties Fri Dec 30 12:37:30 2011 +0100 +++ b/java/rozsirene-atributy/nbproject/genfiles.properties Sat Aug 18 13:22:45 2012 +0200 @@ -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=ca43bb03 -nbproject/build-impl.xml.script.CRC32=184465be -nbproject/build-impl.xml.stylesheet.CRC32=0ae3a408@1.44.1.45 +nbproject/build-impl.xml.script.CRC32=dad65463 +nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.1.46