# HG changeset patch # User František Kučera # Date 1410016761 -7200 # Node ID 56b731d14aec6012bae69649b6dada93d79a3119 # Parent ed9ec17aa67fe026e55a8d8dcb718a94ad6e999d in-ini: skeleton diff -r ed9ec17aa67f -r 56b731d14aec java/alt2xml-in-ini/build.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/alt2xml-in-ini/build.xml Sat Sep 06 17:19:21 2014 +0200 @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project alt2xml-in-ini. + + + diff -r ed9ec17aa67f -r 56b731d14aec java/alt2xml-in-ini/config/META-INF/services/cz.frantovo.alt2xml.Alt2XmlReaderFactory --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/alt2xml-in-ini/config/META-INF/services/cz.frantovo.alt2xml.Alt2XmlReaderFactory Sat Sep 06 17:19:21 2014 +0200 @@ -0,0 +1,1 @@ +cz.frantovo.alt2xml.in.ini.ReaderFactory diff -r ed9ec17aa67f -r 56b731d14aec java/alt2xml-in-ini/nbproject/build-impl.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/alt2xml-in-ini/nbproject/build-impl.xml Sat Sep 06 17:19:21 2014 +0200 @@ -0,0 +1,1438 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set src.config.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 ed9ec17aa67f -r 56b731d14aec java/alt2xml-in-ini/nbproject/genfiles.properties --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/alt2xml-in-ini/nbproject/genfiles.properties Sat Sep 06 17:19:21 2014 +0200 @@ -0,0 +1,8 @@ +build.xml.data.CRC32=baf64108 +build.xml.script.CRC32=df5287a4 +build.xml.stylesheet.CRC32=8064a381@1.74.2.48 +# 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=baf64108 +nbproject/build-impl.xml.script.CRC32=ddfd8d33 +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.74.2.48 diff -r ed9ec17aa67f -r 56b731d14aec java/alt2xml-in-ini/nbproject/project.properties --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/alt2xml-in-ini/nbproject/project.properties Sat Sep 06 17:19:21 2014 +0200 @@ -0,0 +1,77 @@ +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=alt2xml-in-ini +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} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/alt2xml-in-ini.jar +dist.javadoc.dir=${dist.dir}/javadoc +endorsed.classpath= +excludes= +includes=** +jar.compress=false +javac.classpath=\ + ${reference.alt2xml-lib-input.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= +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=true +platform.active=default_platform +project.alt2xml-lib-input=../alt2xml-lib-input +reference.alt2xml-lib-input.jar=${project.alt2xml-lib-input}/dist/alt2xml-lib-input.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. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.config.dir=config +src.dir=src +test.src.dir=test diff -r ed9ec17aa67f -r 56b731d14aec java/alt2xml-in-ini/nbproject/project.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/alt2xml-in-ini/nbproject/project.xml Sat Sep 06 17:19:21 2014 +0200 @@ -0,0 +1,26 @@ + + + org.netbeans.modules.java.j2seproject + + + alt2xml-in-ini + + + + + + + + + + + alt2xml-lib-input + jar + + jar + clean + jar + + + + diff -r ed9ec17aa67f -r 56b731d14aec java/alt2xml-in-ini/src/cz/frantovo/alt2xml/in/ini/Reader.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/alt2xml-in-ini/src/cz/frantovo/alt2xml/in/ini/Reader.java Sat Sep 06 17:19:21 2014 +0200 @@ -0,0 +1,51 @@ +/** + * Alt2XML + * Copyright © 2014 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, or + * (at your option) any later version. + * + * 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.alt2xml.in.ini; + +import cz.frantovo.alt2xml.AbstractAlt2XmlReader; +import java.io.IOException; +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; + +/** + * + * @author Ing. František Kučera (frantovo.cz) + */ +public class Reader extends AbstractAlt2XmlReader { + + @Override + public void parse(InputSource input) throws IOException, SAXException { + outputStart(); + // TODO: INI → SAX + outputEnd(); + } + + private void outputStart() throws SAXException { + contentHandler.startDocument(); + contentHandler.lineBreak(); + contentHandler.startElement(null, null, "ini", null); + contentHandler.lineBreak(); + } + + private void outputEnd() throws SAXException { + contentHandler.endElement(null, null, "ini"); + contentHandler.lineBreak(); + contentHandler.endDocument(); + } + +} diff -r ed9ec17aa67f -r 56b731d14aec java/alt2xml-in-ini/src/cz/frantovo/alt2xml/in/ini/ReaderFactory.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/alt2xml-in-ini/src/cz/frantovo/alt2xml/in/ini/ReaderFactory.java Sat Sep 06 17:19:21 2014 +0200 @@ -0,0 +1,41 @@ +/** + * Alt2XML + * Copyright © 2014 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, or + * (at your option) any later version. + * + * 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.alt2xml.in.ini; + +import cz.frantovo.alt2xml.Alt2XmlRegexReaderFactory; +import java.util.regex.Pattern; +import org.xml.sax.XMLReader; + +/** + * + * @author Ing. František Kučera (frantovo.cz) + */ +public class ReaderFactory extends Alt2XmlRegexReaderFactory { + + private static final Pattern pattern = Pattern.compile("^.*\\.(ini|desktop)$"); + + @Override + protected Pattern getSystemIdPattern() { + return pattern; + } + + @Override + public XMLReader getReader() { + return new Reader(); + } +} diff -r ed9ec17aa67f -r 56b731d14aec scripts/alt2xml.sh --- a/scripts/alt2xml.sh Sat Sep 06 17:17:37 2014 +0200 +++ b/scripts/alt2xml.sh Sat Sep 06 17:19:21 2014 +0200 @@ -10,6 +10,7 @@ INPUT_PLUGINS=( "$DIR/java/alt2xml-in-properties/dist/alt2xml-in-properties.jar" + "$DIR/java/alt2xml-in-ini/dist/alt2xml-in-ini.jar" "$DIR/java/alt2xml-in-json/dist/alt2xml-in-json.jar" "$DIR/../temp/lib/json_simple-1.1.jar"