You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(103) |
Jun
(121) |
Jul
(16) |
Aug
(67) |
Sep
(126) |
Oct
(161) |
Nov
(164) |
Dec
(588) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(394) |
Feb
(181) |
Mar
(131) |
Apr
(180) |
May
(255) |
Jun
(11) |
Jul
(79) |
Aug
(70) |
Sep
(274) |
Oct
(138) |
Nov
(195) |
Dec
(8) |
2008 |
Jan
(3) |
Feb
(142) |
Mar
(162) |
Apr
(124) |
May
(148) |
Jun
(157) |
Jul
(425) |
Aug
(373) |
Sep
(264) |
Oct
(315) |
Nov
(225) |
Dec
(6) |
2009 |
Jan
(67) |
Feb
(78) |
Mar
(279) |
Apr
(294) |
May
(92) |
Jun
(65) |
Jul
(134) |
Aug
(41) |
Sep
(138) |
Oct
(125) |
Nov
(126) |
Dec
(122) |
2010 |
Jan
(15) |
Feb
(48) |
Mar
(9) |
Apr
(195) |
May
(373) |
Jun
(507) |
Jul
(42) |
Aug
(16) |
Sep
(38) |
Oct
(81) |
Nov
(64) |
Dec
(18) |
2011 |
Jan
(13) |
Feb
(12) |
Mar
(39) |
Apr
(1) |
May
(2) |
Jun
(27) |
Jul
(27) |
Aug
(31) |
Sep
(14) |
Oct
(102) |
Nov
(20) |
Dec
(37) |
2012 |
Jan
(22) |
Feb
(1) |
Mar
(1) |
Apr
(2) |
May
(2) |
Jun
(18) |
Jul
(6) |
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
(47) |
Jun
(7) |
Jul
(107) |
Aug
|
Sep
|
Oct
(112) |
Nov
(31) |
Dec
(17) |
2014 |
Jan
(29) |
Feb
(111) |
Mar
(34) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(18) |
Dec
(10) |
From: <aki...@us...> - 2010-11-13 18:23:14
|
Revision: 8782 http://gridarta.svn.sourceforge.net/gridarta/?rev=8782&view=rev Author: akirschbaum Date: 2010-11-13 17:32:50 +0000 (Sat, 13 Nov 2010) Log Message: ----------- Clean up module dependencies. Modified Paths: -------------- trunk/atrinik.iml trunk/build.xml trunk/crossfire.iml trunk/daimonin.iml trunk/gridarta.iml trunk/model.iml trunk/preferences.iml trunk/textedit.iml trunk/utils.iml Modified: trunk/atrinik.iml =================================================================== --- trunk/atrinik.iml 2010-11-10 18:08:54 UTC (rev 8781) +++ trunk/atrinik.iml 2010-11-13 17:32:50 UTC (rev 8782) @@ -11,6 +11,7 @@ <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="module" module-name="gridarta" /> + <orderEntry type="module" module-name="model" /> <orderEntry type="module" module-name="utils" /> <orderEntry type="module-library"> <library> @@ -24,7 +25,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/log4j-1.2.13.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/bsh-commands-2.0b4.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -33,7 +34,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/junit-4.2.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-action-0.1.0.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -42,7 +43,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-tod-0.1.0.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-misc-trunk-1398.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -51,7 +52,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-misc-trunk-1398.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-prefs-0.1.0.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -60,7 +61,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-prefs-0.1.0.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-tod-0.1.0.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -69,7 +70,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-action-0.1.0.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-util-trunk-1379.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -78,17 +79,16 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-util-trunk-1379.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/junit-4.2.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> </library> </orderEntry> - <orderEntry type="module" module-name="model" /> <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/bsh-commands-2.0b4.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/log4j-1.2.13.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2010-11-10 18:08:54 UTC (rev 8781) +++ trunk/build.xml 2010-11-13 17:32:50 UTC (rev 8782) @@ -54,6 +54,85 @@ <property name="svn.tag.targetUrl" value="${svn.baseUrl}/tags/${project.version.major}.${project.version.minor}.${project.version.patch}"/> <property name="svn.tag.message" value="Creating release tag for version ${project.version.major}.${project.version.minor}.${project.version.patch}"/> + <path id="path.class.atrinik.app"> + <pathelement location="dest/atrinik/app"/> + </path> + <path id="path.class.atrinik.test"> + <path refid="path.class.atrinik.app"/> + <pathelement location="dest/atrinik/test"/> + </path> + + <path id="path.class.crossfire.app"> + <pathelement location="dest/crossfire/app"/> + </path> + <path id="path.class.crossfire.test"> + <path refid="path.class.crossfire.app"/> + <pathelement location="dest/crossfire/test"/> + </path> + + <path id="path.class.daimonin.app"> + <pathelement location="dest/daimonin/app"/> + </path> + <path id="path.class.daimonin.test"> + <path refid="path.class.daimonin.app"/> + <pathelement location="dest/daimonin/test"/> + </path> + + <path id="path.class.gridarta.app"> + <pathelement location="dest/gridarta/app"/> + </path> + <path id="path.class.gridarta.test"> + <path refid="path.class.gridarta.app"/> + <pathelement location="dest/gridarta/test"/> + </path> + + <path id="path.class.model.app"> + <pathelement location="dest/model/app"/> + </path> + <path id="path.class.model.test"> + <path refid="path.class.model.app"/> + <pathelement location="dest/model/test"/> + </path> + + <path id="path.class.preferences.app"> + <pathelement location="dest/preferences/app"/> + </path> + <path id="path.class.preferences.test"> + <path refid="path.class.preferences.app"/> + <pathelement location="dest/preferences/test"/> + </path> + + <path id="path.class.textedit.app"> + <pathelement location="dest/textedit/app"/> + </path> + <path id="path.class.textedit.test"> + <path refid="path.class.textedit.app"/> + <pathelement location="dest/textedit/test"/> + </path> + + <path id="path.class.utils.app"> + <pathelement location="dest/utils/app"/> + </path> + <path id="path.class.utils.test"> + <path refid="path.class.utils.app"/> + <pathelement location="dest/utils/test"/> + </path> + + <path id="path.lib.annotations" location="lib/annotations.jar"/> + <path id="path.lib.bsh-core" location="lib/bsh-core-2.0b4.jar"/> + <path id="path.lib.bsh-util" location="lib/bsh-util-2.0b4.jar"/> + <path id="path.lib.getopt" location="lib/java-getopt-1.0.13.jar"/> + <path id="path.lib.japi-swing-about" location="lib/japi-lib-swing-about-0.1.0.jar"/> + <path id="path.lib.japi-swing-action" location="lib/japi-lib-swing-action-0.1.0.jar"/> + <path id="path.lib.japi-swing-misc" location="lib/japi-lib-swing-misc-trunk-1398.jar"/> + <path id="path.lib.japi-swing-prefs" location="lib/japi-lib-swing-prefs-0.1.0.jar"/> + <path id="path.lib.japi-swing-tod" location="lib/japi-lib-swing-tod-0.1.0.jar"/> + <path id="path.lib.japi-util" location="lib/japi-lib-util-trunk-1379.jar"/> + <path id="path.lib.japi-xml" location="lib/japi-lib-xml-0.1.0.jar"/> + <path id="path.lib.jdom" location="lib/jdom.jar"/> + <path id="path.lib.log4j" location="lib/log4j-1.2.13.jar"/> + <path id="path.lib.junit" location="lib/junit-4.2.jar"/> + <path id="xsltpath"> <fileset dir="lib" includes="**/*.jar"/> </path> @@ -226,30 +305,27 @@ <mkdir dir="dest/atrinik/app"/> <javac srcdir="atrinik/src/app" destdir="dest/atrinik/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> - <fileset dir="lib" includes="annotations.jar"/> - <fileset dir="lib" includes="japi-lib-swing-action-0.1.0.jar"/> - <fileset dir="lib" includes="japi-lib-swing-misc-trunk-1398.jar"/> - <fileset dir="lib" includes="japi-lib-swing-prefs-0.1.0.jar"/> - <fileset dir="lib" includes="japi-lib-util-trunk-1379.jar"/> - <fileset dir="lib" includes="log4j-1.2.13.jar"/> - <pathelement location="dest/gridarta/app"/> - <pathelement location="dest/model/app"/> - <pathelement location="dest/preferences/app"/> - <pathelement location="dest/utils/app"/> + <path refid="path.class.gridarta.app"/> + <path refid="path.class.model.app"/> + <path refid="path.class.utils.app"/> + <path refid="path.lib.annotations"/> + <path refid="path.lib.japi-swing-action"/> + <path refid="path.lib.japi-swing-misc"/> + <path refid="path.lib.japi-swing-prefs"/> + <path refid="path.lib.log4j"/> </classpath> <compilerarg line="${javac.args}"/> </javac> <mkdir dir="dest/atrinik/test"/> <javac srcdir="atrinik/src/test" destdir="dest/atrinik/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> - <fileset dir="lib" includes="annotations.jar"/> - <fileset dir="lib" includes="japi-lib-swing-action-0.1.0.jar"/> - <fileset dir="lib" includes="junit-4.2.jar"/> - <pathelement location="dest/atrinik/app"/> - <pathelement location="dest/gridarta/app"/> - <pathelement location="dest/model/app"/> - <pathelement location="dest/model/test"/> - <pathelement location="dest/utils/app"/> + <path refid="path.class.atrinik.app"/> + <path refid="path.class.gridarta.test"/> + <path refid="path.class.model.test"/> + <path refid="path.class.utils.test"/> + <path refid="path.lib.annotations"/> + <path refid="path.lib.japi-swing-action"/> + <path refid="path.lib.junit"/> </classpath> <compilerarg line="${javac.args}"/> </javac> @@ -262,30 +338,27 @@ <mkdir dir="dest/crossfire/app"/> <javac srcdir="crossfire/src/app" destdir="dest/crossfire/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> - <fileset dir="lib" includes="annotations.jar"/> - <fileset dir="lib" includes="japi-lib-swing-action-0.1.0.jar"/> - <fileset dir="lib" includes="japi-lib-swing-misc-trunk-1398.jar"/> - <fileset dir="lib" includes="japi-lib-swing-prefs-0.1.0.jar"/> - <fileset dir="lib" includes="log4j-1.2.13.jar"/> - <pathelement location="dest/gridarta/app"/> - <pathelement location="dest/model/app"/> - <pathelement location="dest/preferences/app"/> - <pathelement location="dest/utils/app"/> + <path refid="path.class.gridarta.app"/> + <path refid="path.class.model.app"/> + <path refid="path.class.utils.app"/> + <path refid="path.lib.annotations"/> + <path refid="path.lib.japi-swing-action"/> + <path refid="path.lib.japi-swing-misc"/> + <path refid="path.lib.japi-swing-prefs"/> + <path refid="path.lib.log4j"/> </classpath> <compilerarg line="${javac.args}"/> </javac> <mkdir dir="dest/crossfire/test"/> <javac srcdir="crossfire/src/test" destdir="dest/crossfire/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> - <fileset dir="lib" includes="annotations.jar"/> - <fileset dir="lib" includes="japi-lib-swing-action-0.1.0.jar"/> - <fileset dir="lib" includes="junit-4.2.jar"/> - <pathelement location="dest/crossfire/app"/> - <pathelement location="dest/gridarta/app"/> - <pathelement location="dest/gridarta/test"/> - <pathelement location="dest/model/app"/> - <pathelement location="dest/model/test"/> - <pathelement location="dest/utils/app"/> + <path refid="path.class.crossfire.app"/> + <path refid="path.class.gridarta.test"/> + <path refid="path.class.model.test"/> + <path refid="path.class.utils.test"/> + <path refid="path.lib.annotations"/> + <path refid="path.lib.japi-swing-action"/> + <path refid="path.lib.junit"/> </classpath> <compilerarg line="${javac.args}"/> </javac> @@ -298,27 +371,25 @@ <mkdir dir="dest/daimonin/app"/> <javac srcdir="daimonin/src/app" destdir="dest/daimonin/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> - <fileset dir="lib" includes="annotations.jar"/> - <fileset dir="lib" includes="japi-lib-swing-action-0.1.0.jar"/> - <fileset dir="lib" includes="japi-lib-swing-misc-trunk-1398.jar"/> - <fileset dir="lib" includes="japi-lib-swing-prefs-0.1.0.jar"/> - <fileset dir="lib" includes="japi-lib-util-trunk-1379.jar"/> - <fileset dir="lib" includes="log4j-1.2.13.jar"/> - <pathelement location="dest/gridarta/app"/> - <pathelement location="dest/model/app"/> - <pathelement location="dest/utils/app"/> + <path refid="path.class.gridarta.app"/> + <path refid="path.class.model.app"/> + <path refid="path.class.utils.app"/> + <path refid="path.lib.annotations"/> + <path refid="path.lib.japi-swing-action"/> + <path refid="path.lib.japi-swing-misc"/> + <path refid="path.lib.japi-swing-prefs"/> + <path refid="path.lib.log4j"/> </classpath> <compilerarg line="${javac.args}"/> </javac> <mkdir dir="dest/daimonin/test"/> <javac srcdir="daimonin/src/test" destdir="dest/daimonin/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> - <fileset dir="lib" includes="annotations.jar"/> - <fileset dir="lib" includes="junit-4.2.jar"/> - <pathelement location="dest/daimonin/app"/> - <pathelement location="dest/gridarta/app"/> - <pathelement location="dest/model/app"/> - <pathelement location="dest/utils/app"/> + <path refid="path.class.daimonin.app"/> + <path refid="path.class.gridarta.test"/> + <path refid="path.class.model.test"/> + <path refid="path.class.utils.test"/> + <path refid="path.lib.junit"/> </classpath> <compilerarg line="${javac.args}"/> </javac> @@ -331,35 +402,35 @@ <mkdir dir="dest/gridarta/app"/> <javac srcdir="src/app" destdir="dest/gridarta/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> - <fileset dir="lib" includes="annotations.jar"/> - <fileset dir="lib" includes="bsh-core-2.0b4.jar"/> - <fileset dir="lib" includes="bsh-util-2.0b4.jar"/> - <fileset dir="lib" includes="japi-lib-swing-about-0.1.0.jar"/> - <fileset dir="lib" includes="japi-lib-swing-action-0.1.0.jar"/> - <fileset dir="lib" includes="japi-lib-swing-misc-trunk-1398.jar"/> - <fileset dir="lib" includes="japi-lib-swing-prefs-0.1.0.jar"/> - <fileset dir="lib" includes="japi-lib-swing-tod-0.1.0.jar"/> - <fileset dir="lib" includes="japi-lib-util-trunk-1379.jar"/> - <fileset dir="lib" includes="java-getopt-1.0.13.jar"/> - <fileset dir="lib" includes="jdom.jar"/> - <fileset dir="lib" includes="log4j-1.2.13.jar"/> - <pathelement location="dest/model/app"/> - <pathelement location="dest/preferences/app"/> - <pathelement location="dest/textedit/app"/> - <pathelement location="dest/utils/app"/> + <path refid="path.class.model.app"/> + <path refid="path.class.preferences.app"/> + <path refid="path.class.textedit.app"/> + <path refid="path.class.utils.app"/> + <path refid="path.lib.annotations"/> + <path refid="path.lib.bsh-core"/> + <path refid="path.lib.bsh-util"/> + <path refid="path.lib.getopt"/> + <path refid="path.lib.japi-swing-about"/> + <path refid="path.lib.japi-swing-action"/> + <path refid="path.lib.japi-swing-misc"/> + <path refid="path.lib.japi-swing-prefs"/> + <path refid="path.lib.japi-swing-tod"/> + <path refid="path.lib.japi-util"/> + <path refid="path.lib.jdom"/> + <path refid="path.lib.log4j"/> </classpath> <compilerarg line="${javac.args}"/> </javac> <mkdir dir="dest/gridarta/test"/> <javac srcdir="src/test" destdir="dest/gridarta/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> - <fileset dir="lib" includes="annotations.jar"/> - <fileset dir="lib" includes="junit-4.2.jar"/> - <pathelement location="dest/gridarta/app"/> - <pathelement location="dest/model/app"/> - <pathelement location="dest/preferences/app"/> - <pathelement location="dest/model/test"/> - <pathelement location="dest/utils/app"/> + <path refid="path.class.gridarta.app"/> + <path refid="path.class.model.test"/> + <path refid="path.class.preferences.test"/> + <path refid="path.class.textedit.test"/> + <path refid="path.class.utils.test"/> + <path refid="path.lib.annotations"/> + <path refid="path.lib.junit"/> </classpath> <compilerarg line="${javac.args}"/> </javac> @@ -372,29 +443,26 @@ <mkdir dir="dest/model/app"/> <javac srcdir="model/src/app" destdir="dest/model/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> - <fileset dir="lib" includes="annotations.jar"/> - <fileset dir="lib" includes="japi-lib-swing-action-0.1.0.jar"/> - <fileset dir="lib" includes="japi-lib-swing-misc-trunk-1398.jar"/> - <fileset dir="lib" includes="japi-lib-util-trunk-1379.jar"/> - <fileset dir="lib" includes="japi-lib-xml-0.1.0.jar"/> - <fileset dir="lib" includes="jdom.jar"/> - <fileset dir="lib" includes="log4j-1.2.13.jar"/> - <pathelement location="dest/utils/app"/> + <path refid="path.class.utils.app"/> + <path refid="path.lib.annotations"/> + <path refid="path.lib.japi-swing-action"/> + <path refid="path.lib.japi-swing-misc"/> + <path refid="path.lib.japi-util"/> + <path refid="path.lib.japi-xml"/> + <path refid="path.lib.jdom"/> + <path refid="path.lib.log4j"/> </classpath> <compilerarg line="${javac.args}"/> </javac> <mkdir dir="dest/model/test"/> <javac srcdir="model/src/test" destdir="dest/model/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> - <fileset dir="lib" includes="annotations.jar"/> - <fileset dir="lib" includes="japi-lib-swing-action-0.1.0.jar"/> - <fileset dir="lib" includes="japi-lib-swing-misc-trunk-1398.jar"/> - <fileset dir="lib" includes="japi-lib-util-trunk-1379.jar"/> - <fileset dir="lib" includes="junit-4.2.jar"/> - <fileset dir="lib" includes="log4j-1.2.13.jar"/> - <pathelement location="dest/model/app"/> - <pathelement location="dest/utils/app"/> - <pathelement location="dest/utils/test"/> + <path refid="path.class.model.app"/> + <path refid="path.class.utils.test"/> + <path refid="path.lib.annotations"/> + <path refid="path.lib.japi-swing-misc"/> + <path refid="path.lib.junit"/> + <path refid="path.lib.log4j"/> </classpath> <compilerarg line="${javac.args}"/> </javac> @@ -407,18 +475,16 @@ <mkdir dir="dest/preferences/app"/> <javac srcdir="preferences/src/app" destdir="dest/preferences/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> - <fileset dir="lib" includes="annotations.jar"/> - <fileset dir="lib" includes="japi-lib-swing-action-0.1.0.jar"/> - <fileset dir="lib" includes="log4j-1.2.13.jar"/> + <path refid="path.lib.annotations"/> + <path refid="path.lib.japi-swing-action"/> + <path refid="path.lib.log4j"/> </classpath> <compilerarg line="${javac.args}"/> </javac> <mkdir dir="dest/preferences/test"/> <javac srcdir="preferences/src/test" destdir="dest/preferences/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> - <fileset dir="lib" includes="annotations.jar"/> - <fileset dir="lib" includes="junit-4.2.jar"/> - <pathelement location="dest/preferences/app"/> + <path refid="path.class.preferences.app"/> </classpath> <compilerarg line="${javac.args}"/> </javac> @@ -431,19 +497,18 @@ <mkdir dir="dest/textedit/app"/> <javac srcdir="textedit/src/app" destdir="dest/textedit/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> - <fileset dir="lib" includes="annotations.jar"/> - <fileset dir="lib" includes="japi-lib-swing-action-0.1.0.jar"/> - <fileset dir="lib" includes="log4j-1.2.13.jar"/> - <pathelement location="dest/utils/app"/> + <path refid="path.class.utils.app"/> + <path refid="path.lib.annotations"/> + <path refid="path.lib.japi-swing-action"/> + <path refid="path.lib.log4j"/> </classpath> <compilerarg line="${javac.args}"/> </javac> <mkdir dir="dest/textedit/test"/> <javac srcdir="textedit/src/test" destdir="dest/textedit/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> - <fileset dir="lib" includes="annotations.jar"/> - <fileset dir="lib" includes="junit-4.2.jar"/> - <pathelement location="dest/textedit/app"/> + <path refid="path.class.textedit.app"/> + <path refid="path.class.utils.test"/> </classpath> <compilerarg line="${javac.args}"/> </javac> @@ -456,21 +521,21 @@ <mkdir dir="dest/utils/app"/> <javac srcdir="utils/src/app" destdir="dest/utils/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> - <fileset dir="lib" includes="annotations.jar"/> - <fileset dir="lib" includes="japi-lib-swing-action-0.1.0.jar"/> - <fileset dir="lib" includes="japi-lib-util-trunk-1379.jar"/> - <fileset dir="lib" includes="log4j-1.2.13.jar"/> + <path refid="path.lib.annotations"/> + <path refid="path.lib.japi-swing-action"/> + <path refid="path.lib.japi-util"/> + <path refid="path.lib.log4j"/> </classpath> <compilerarg line="${javac.args}"/> </javac> <mkdir dir="dest/utils/test"/> <javac srcdir="utils/src/test" destdir="dest/utils/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> - <fileset dir="lib" includes="annotations.jar"/> - <fileset dir="lib" includes="japi-lib-swing-action-0.1.0.jar"/> - <fileset dir="lib" includes="japi-lib-util-trunk-1379.jar"/> - <fileset dir="lib" includes="junit-4.2.jar"/> - <pathelement location="dest/utils/app"/> + <path refid="path.class.utils.app"/> + <path refid="path.lib.annotations"/> + <path refid="path.lib.japi-swing-action"/> + <path refid="path.lib.japi-util"/> + <path refid="path.lib.junit"/> </classpath> <compilerarg line="${javac.args}"/> </javac> @@ -531,22 +596,14 @@ </classpath> <sourcepath> <pathelement path="${user.javadoc.javasrc}"/> - <pathelement path="src/app"/> - <pathelement path="src/test"/> - <pathelement path="atrinik/src/app"/> - <pathelement path="atrinik/src/test"/> - <pathelement path="crossfire/src/app"/> - <pathelement path="crossfire/src/test"/> - <pathelement path="daimonin/src/app"/> - <pathelement path="daimonin/src/test"/> - <pathelement path="model/src/app"/> - <pathelement path="model/src/test"/> - <pathelement path="preferences/src/app"/> - <pathelement path="preferences/src/test"/> - <pathelement path="textedit/src/app"/> - <pathelement path="textedit/src/test"/> - <pathelement path="utils/src/app"/> - <pathelement path="utils/src/test"/> + <path refid="path.class.atrinik.test"/> + <path refid="path.class.crossfire.test"/> + <path refid="path.class.daimonin.test"/> + <path refid="path.class.gridarta.test"/> + <path refid="path.class.model.test"/> + <path refid="path.class.preferences.test"/> + <path refid="path.class.textedit.test"/> + <path refid="path.class.utils.test"/> </sourcepath> <packageset dir="src/app" defaultexcludes="yes"/> <packageset dir="src/test" defaultexcludes="yes"/> @@ -728,12 +785,7 @@ </target> <target name="checkstyle" description="Runs checkstyle to style-check the source code"> - <taskdef resource="checkstyletask.properties" classpath="lib/checkstyle-all-5.0.jar"> - <classpath> - <pathelement path="lib/antlr.jar"/> - <pathelement path="lib/commons-beanutils-core.jar"/> - </classpath> - </taskdef> + <taskdef resource="checkstyletask.properties" classpath="lib/checkstyle-all-5.0.jar"/> <mkdir dir="dest/doc"/> <checkstyle config="src/checkstyle.xml" failOnViolation="true"> <formatter type="plain" tofile="dest/doc/checkstyle_report.txt"/> @@ -782,22 +834,14 @@ </classpath> <sourcepath> <pathelement path="${user.javadoc.javasrc}"/> - <pathelement path="src/app"/> - <pathelement path="src/test"/> - <pathelement path="atrinik/src/app"/> - <pathelement path="atrinik/src/test"/> - <pathelement path="crossfire/src/app"/> - <pathelement path="crossfire/src/test"/> - <pathelement path="daimonin/src/app"/> - <pathelement path="daimonin/src/test"/> - <pathelement path="model/src/app"/> - <pathelement path="model/src/test"/> - <pathelement path="preferences/src/app"/> - <pathelement path="preferences/src/test"/> - <pathelement path="textedit/src/app"/> - <pathelement path="textedit/src/test"/> - <pathelement path="utils/src/app"/> - <pathelement path="utils/src/test"/> + <path refid="path.class.atrinik.test"/> + <path refid="path.class.crossfire.test"/> + <path refid="path.class.daimonin.test"/> + <path refid="path.class.gridarta.test"/> + <path refid="path.class.model.test"/> + <path refid="path.class.preferences.test"/> + <path refid="path.class.textedit.test"/> + <path refid="path.class.utils.test"/> </sourcepath> <packageset dir="src/app" defaultexcludes="yes"/> <packageset dir="src/test" defaultexcludes="yes"/> @@ -858,15 +902,13 @@ <mkdir dir="docs/test"/> <junit printsummary="no" haltonfailure="yes"> <classpath> - <fileset dir="lib" includes="japi-lib-swing-action-0.1.0.jar"/> - <fileset dir="lib" includes="log4j-1.2.13.jar"/> - <fileset dir="lib" includes="junit-4.2.jar"/> - <pathelement location="dest/atrinik/app"/> - <pathelement location="dest/atrinik/test"/> - <pathelement location="dest/gridarta/app"/> - <pathelement location="dest/model/app"/> - <pathelement location="dest/model/test"/> - <pathelement location="dest/utils/app"/> + <path refid="path.class.atrinik.test"/> + <path refid="path.class.gridarta.test"/> + <path refid="path.class.model.test"/> + <path refid="path.class.utils.test"/> + <path refid="path.lib.japi-swing-action"/> + <path refid="path.lib.junit"/> + <path refid="path.lib.log4j"/> </classpath> <formatter type="plain"/> <formatter type="xml"/> @@ -884,16 +926,13 @@ <mkdir dir="docs/test"/> <junit printsummary="no" haltonfailure="yes"> <classpath> - <fileset dir="lib" includes="japi-lib-swing-action-0.1.0.jar"/> - <fileset dir="lib" includes="log4j-1.2.13.jar"/> - <fileset dir="lib" includes="junit-4.2.jar"/> - <pathelement location="dest/crossfire/app"/> - <pathelement location="dest/crossfire/test"/> - <pathelement location="dest/gridarta/app"/> - <pathelement location="dest/gridarta/test"/> - <pathelement location="dest/model/app"/> - <pathelement location="dest/model/test"/> - <pathelement location="dest/utils/app"/> + <path refid="path.class.crossfire.test"/> + <path refid="path.class.gridarta.test"/> + <path refid="path.class.model.test"/> + <path refid="path.class.utils.test"/> + <path refid="path.lib.japi-swing-action"/> + <path refid="path.lib.junit"/> + <path refid="path.lib.log4j"/> </classpath> <formatter type="plain"/> <formatter type="xml"/> @@ -911,12 +950,13 @@ <mkdir dir="docs/test"/> <junit printsummary="no" haltonfailure="yes"> <classpath> - <fileset dir="lib" includes="junit-4.2.jar"/> - <pathelement location="dest/daimonin/app"/> - <pathelement location="dest/daimonin/test"/> - <pathelement location="dest/gridarta/app"/> - <pathelement location="dest/model/app"/> - <pathelement location="dest/utils/app"/> + <path refid="path.class.daimonin.test"/> + <path refid="path.class.gridarta.test"/> + <path refid="path.class.model.test"/> + <path refid="path.class.utils.test"/> + <path refid="path.lib.japi-swing-action"/> + <path refid="path.lib.junit"/> + <path refid="path.lib.log4j"/> </classpath> <formatter type="plain"/> <formatter type="xml"/> @@ -934,14 +974,12 @@ <mkdir dir="docs/test"/> <junit printsummary="no" haltonfailure="yes"> <classpath> - <fileset dir="lib" includes="japi-lib-swing-action-0.1.0.jar"/> - <fileset dir="lib" includes="log4j-1.2.13.jar"/> - <fileset dir="lib" includes="junit-4.2.jar"/> - <pathelement location="dest/gridarta/app"/> - <pathelement location="dest/gridarta/test"/> - <pathelement location="dest/model/app"/> - <pathelement location="dest/model/test"/> - <pathelement location="dest/utils/app"/> + <path refid="path.class.gridarta.test"/> + <path refid="path.class.model.test"/> + <path refid="path.class.utils.test"/> + <path refid="path.lib.japi-swing-action"/> + <path refid="path.lib.junit"/> + <path refid="path.lib.log4j"/> </classpath> <formatter type="plain"/> <formatter type="xml"/> @@ -959,15 +997,12 @@ <mkdir dir="docs/test"/> <junit printsummary="no" haltonfailure="yes"> <classpath> - <fileset dir="lib" includes="japi-lib-swing-action-0.1.0.jar"/> - <fileset dir="lib" includes="japi-lib-xml-0.1.0.jar"/> - <fileset dir="lib" includes="log4j-1.2.13.jar"/> - <fileset dir="lib" includes="junit-4.2.jar"/> - <pathelement location="dest/gridarta/app"/> - <pathelement location="dest/model/app"/> - <pathelement location="dest/model/test"/> - <pathelement location="dest/utils/app"/> - <pathelement location="dest/utils/test"/> + <path refid="path.class.model.test"/> + <path refid="path.class.utils.test"/> + <path refid="path.lib.japi-swing-action"/> + <path refid="path.lib.japi-xml"/> + <path refid="path.lib.junit"/> + <path refid="path.lib.log4j"/> <pathelement location="resource"/> </classpath> <formatter type="plain"/> @@ -986,9 +1021,7 @@ <mkdir dir="docs/test"/> <junit printsummary="no" haltonfailure="yes"> <classpath> - <fileset dir="lib" includes="junit-4.2.jar"/> - <pathelement location="dest/preferences/app"/> - <pathelement location="dest/preferences/test"/> + <path refid="path.class.preferences.test"/> </classpath> <formatter type="plain"/> <formatter type="xml"/> @@ -1006,9 +1039,7 @@ <mkdir dir="docs/test"/> <junit printsummary="no" haltonfailure="yes"> <classpath> - <fileset dir="lib" includes="junit-4.2.jar"/> - <pathelement location="dest/textedit/app"/> - <pathelement location="dest/textedit/test"/> + <path refid="path.class.textedit.test"/> </classpath> <formatter type="plain"/> <formatter type="xml"/> @@ -1026,10 +1057,9 @@ <mkdir dir="docs/test"/> <junit printsummary="no" haltonfailure="yes"> <classpath> - <fileset dir="lib" includes="japi-lib-util-trunk-1379.jar"/> - <fileset dir="lib" includes="junit-4.2.jar"/> - <pathelement location="dest/utils/app"/> - <pathelement location="dest/utils/test"/> + <path refid="path.class.utils.test"/> + <path refid="path.lib.japi-util"/> + <path refid="path.lib.junit"/> </classpath> <formatter type="plain"/> <formatter type="xml"/> Modified: trunk/crossfire.iml =================================================================== --- trunk/crossfire.iml 2010-11-10 18:08:54 UTC (rev 8781) +++ trunk/crossfire.iml 2010-11-13 17:32:50 UTC (rev 8782) @@ -12,6 +12,7 @@ <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="module" module-name="gridarta" /> + <orderEntry type="module" module-name="model" /> <orderEntry type="module" module-name="utils" /> <orderEntry type="module-library"> <library> @@ -25,7 +26,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/log4j-1.2.13.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/bsh-commands-2.0b4.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -34,7 +35,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/junit-4.2.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/bsh-core-2.0b4.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -43,7 +44,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/jdom.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/bsh-util-2.0b4.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -52,7 +53,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/bsh-core-2.0b4.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-action-0.1.0.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -61,7 +62,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/bsh-util-2.0b4.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-misc-trunk-1398.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -70,7 +71,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-tod-0.1.0.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-prefs-0.1.0.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -79,7 +80,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-misc-trunk-1398.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-tod-0.1.0.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -88,7 +89,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-prefs-0.1.0.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-util-trunk-1379.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -97,7 +98,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-action-0.1.0.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/java-getopt-1.0.13.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -106,7 +107,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-util-trunk-1379.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/jdom.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -115,17 +116,16 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/java-getopt-1.0.13.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/junit-4.2.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> </library> </orderEntry> - <orderEntry type="module" module-name="model" /> <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/bsh-commands-2.0b4.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/log4j-1.2.13.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> Modified: trunk/daimonin.iml =================================================================== --- trunk/daimonin.iml 2010-11-10 18:08:54 UTC (rev 8781) +++ trunk/daimonin.iml 2010-11-13 17:32:50 UTC (rev 8782) @@ -11,6 +11,7 @@ <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="module" module-name="gridarta" /> + <orderEntry type="module" module-name="model" /> <orderEntry type="module" module-name="utils" /> <orderEntry type="module-library"> <library> @@ -24,7 +25,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/log4j-1.2.13.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/bsh-commands-2.0b4.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -33,7 +34,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/junit-4.2.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-action-0.1.0.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -42,7 +43,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-tod-0.1.0.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-misc-trunk-1398.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -51,7 +52,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-misc-trunk-1398.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-prefs-0.1.0.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -60,7 +61,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-prefs-0.1.0.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-tod-0.1.0.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -69,7 +70,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-action-0.1.0.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-util-trunk-1379.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -78,17 +79,16 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-util-trunk-1379.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/junit-4.2.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> </library> </orderEntry> - <orderEntry type="module" module-name="model" /> <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/bsh-commands-2.0b4.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/log4j-1.2.13.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> Modified: trunk/gridarta.iml =================================================================== --- trunk/gridarta.iml 2010-11-10 18:08:54 UTC (rev 8781) +++ trunk/gridarta.iml 2010-11-13 17:32:50 UTC (rev 8782) @@ -18,9 +18,10 @@ </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="module" module-name="model" /> + <orderEntry type="module" module-name="preferences" /> + <orderEntry type="module" module-name="textedit" /> <orderEntry type="module" module-name="utils" /> - <orderEntry type="module" module-name="textedit" /> - <orderEntry type="module" module-name="preferences" /> <orderEntry type="module-library"> <library> <CLASSES> @@ -33,7 +34,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/log4j-1.2.13.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/bsh-core-2.0b4.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -42,7 +43,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/junit-4.2.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/bsh-util-2.0b4.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -51,7 +52,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/jdom.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/java-getopt-1.0.13.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -60,7 +61,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/bsh-core-2.0b4.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-lang-0.1.0.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -69,7 +70,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/bsh-util-2.0b4.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-about-0.1.0.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -78,16 +79,18 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-tod-0.1.0.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-action-0.1.0.jar!/" /> </CLASSES> <JAVADOC /> - <SOURCES /> + <SOURCES> + <root url="file://$MODULE_DIR$/../../japi/libs/swing-action/trunk/src/prj" /> + </SOURCES> </library> </orderEntry> <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-about-0.1.0.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-extlib-0.1.0.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -114,7 +117,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-xml-0.1.0.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-tod-0.1.0.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -123,18 +126,16 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-action-0.1.0.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-util-trunk-1379.jar!/" /> </CLASSES> <JAVADOC /> - <SOURCES> - <root url="file://$MODULE_DIR$/../../japi/libs/swing-action/trunk/src/prj" /> - </SOURCES> + <SOURCES /> </library> </orderEntry> <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/java-getopt-1.0.13.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-xml-0.1.0.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -143,17 +144,16 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-util-trunk-1379.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/jdom.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> </library> </orderEntry> - <orderEntry type="module" module-name="model" /> <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-lang-0.1.0.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/junit-4.2.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -162,7 +162,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-extlib-0.1.0.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/log4j-1.2.13.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> Modified: trunk/model.iml =================================================================== --- trunk/model.iml 2010-11-10 18:08:54 UTC (rev 8781) +++ trunk/model.iml 2010-11-13 17:32:50 UTC (rev 8782) @@ -39,7 +39,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/log4j-1.2.13.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-util-trunk-1379.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -48,7 +48,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-util-trunk-1379.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-xml-0.1.0.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -66,7 +66,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-xml-0.1.0.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/junit-4.2.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -75,7 +75,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/junit-4.2.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/log4j-1.2.13.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> Modified: trunk/preferences.iml =================================================================== --- trunk/preferences.iml 2010-11-10 18:08:54 UTC (rev 8781) +++ trunk/preferences.iml 2010-11-13 17:32:50 UTC (rev 8782) @@ -19,7 +19,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/log4j-1.2.13.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-action-0.1.0.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -28,7 +28,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-action-0.1.0.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/log4j-1.2.13.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> Modified: trunk/textedit.iml =================================================================== --- trunk/textedit.iml 2010-11-10 18:08:54 UTC (rev 8781) +++ trunk/textedit.iml 2010-11-13 17:32:50 UTC (rev 8782) @@ -7,10 +7,11 @@ </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="module" module-name="utils" /> <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/log4j-1.2.13.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/annotations.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -19,17 +20,16 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/annotations.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-action-0.1.0.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> </library> </orderEntry> - <orderEntry type="module" module-name="utils" /> <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-action-0.1.0.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/log4j-1.2.13.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> Modified: trunk/utils.iml =================================================================== --- trunk/utils.iml 2010-11-10 18:08:54 UTC (rev 8781) +++ trunk/utils.iml 2010-11-13 17:32:50 UTC (rev 8782) @@ -19,7 +19,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/log4j-1.2.13.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-action-0.1.0.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -28,7 +28,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-action-0.1.0.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-util-trunk-1379.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -46,7 +46,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-util-trunk-1379.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/log4j-1.2.13.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-11-13 18:11:43
|
Revision: 8785 http://gridarta.svn.sourceforge.net/gridarta/?rev=8785&view=rev Author: akirschbaum Date: 2010-11-13 18:11:37 +0000 (Sat, 13 Nov 2010) Log Message: ----------- Remove unused code. Modified Paths: -------------- trunk/build.xml Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2010-11-13 18:06:38 UTC (rev 8784) +++ trunk/build.xml 2010-11-13 18:11:37 UTC (rev 8785) @@ -170,7 +170,6 @@ <delete file="src/doc/dev/SafeCopy.java.xhtml"/> <delete file="src/doc/dev/changelog.xml"/> <delete dir="${docs.dir}"/> - <delete dir="classes"/> <delete file="AtrinikEditor.jar"/> <delete file="CrossfireEditor.jar"/> <delete file="DaimoninEditor.jar"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-11-13 18:06:45
|
Revision: 8784 http://gridarta.svn.sourceforge.net/gridarta/?rev=8784&view=rev Author: akirschbaum Date: 2010-11-13 18:06:38 +0000 (Sat, 13 Nov 2010) Log Message: ----------- Remove outdated build files. Removed Paths: ------------- trunk/atrinik/build.xml trunk/crossfire/build.xml trunk/daimonin/build.xml Property Changed: ---------------- trunk/atrinik/ trunk/crossfire/ trunk/daimonin/ Property changes on: trunk/atrinik ___________________________________________________________________ Modified: svn:ignore - AtrinikEditor.jar build.properties class classes developer.properties tags update.properties + developer.properties update.properties Deleted: trunk/atrinik/build.xml =================================================================== --- trunk/atrinik/build.xml 2010-11-13 17:59:16 UTC (rev 8783) +++ trunk/atrinik/build.xml 2010-11-13 18:06:38 UTC (rev 8784) @@ -1,256 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- - ~ Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. - ~ Copyright (C) 2000-2010 The Gridarta Developers. - ~ - ~ 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 2 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, write to the Free Software Foundation, Inc., - ~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - --> - -<!-- - - This is the Ant buildfile for the Gridarta Editor for Atrinik - - - - Apache Ant is a Java-based cross-platform build tool. - - For more information about Ant, visit <http://ant.apache.org/> - - - - Do not move, edit or delete this file. It should stay in the - - main directory of the Atrinik Editor. - - - - How to use Ant for the Atrinik Editor: - - - - o Install Ant on your system. Make sure both the JAVA_HOME - - and ANT_HOME environment variables are set correctly. - - - - o Change into the Atrinik Editor main directory. - - run "ant" to compile, - - run "ant run" to run the editor. - --> -<project name="Gridarta Editor for Atrinik" default="jar"> - - <!-- set properties and clean build directory --> - <target name="init"> - <property name="package" value="net.sf.gridarta.var.atrinik.maincontrol"/> - <property name="targetName" value="Atrinik"/> - <property file="developer.properties"/> - <property name="src.dir" value="src/app"/> - <property name="lib.dir" value="lib"/> - <property name="devlib.dir" value="devlib/"/> - <!-- Don't forget trailing / ! --> - <property name="test.dir" value="test"/> - <property name="resource.dir" value="resource"/> - <property name="arch.dir" value="../arch"/> - <property name="build.dir.production" value="class/production"/> - <property name="jarname" value="${targetName}Editor.jar"/> - <property name="build.source.version" value="1.5"/> - <property name="build.target.version" value="${build.source.version}"/> - <property name="build.source.encoding" value="utf-8"/> - <property name="checkstyle.path" value="${devlib.dir}checkstyle-all-3.5.jar"/> - <property name="checkstyle.conv" value="${devlib.dir}checkstyle_checks.xml"/> - <property name="todo.file" value="todo.txt"/> - <property name="debug" value="false"/> - <property name="user.ftp.depends" value="yes"/> - <property name="user.ftp.passive" value="yes"/> - <property name="user.ftp.ignoreNoncriticalErrors" value="yes"/> - <property name="build.developer" value="unknown"/> - <property name="javac.args" value="-Xlint:all,-path,-unchecked,-fallthrough,-serial,-deprecation"/> - <property name="javac.fork" value="no"/> - <tstamp> - <format property="build.tstamp" pattern="yyyy-MM-dd HH:mm:ss z" timezone="UTC"/> - </tstamp> - <exec executable="svnversion" outputproperty="build.svnversion" failifexecutionfails="false"/> - <property name="build.svnversion" value="unknown"/> - <property name="build.version" value="Gridzilla"/> - <property name="build.number" value="${build.version} (revision ${build.svnversion})"/> - <echoproperties destfile="build.properties"> - <propertyset negate="true"> - <propertyref prefix="user.ftp"/> - <propertyref prefix="user.scp"/> - </propertyset> - </echoproperties> - </target> - - <!-- create ctags. --> - <target name="ctags" if="user.ctags" depends="init" description="creates tags file with symbol definitions for vim and other editors."> - <exec executable="ctags"> - <arg line="-R ${src.dir}"/> - </exec> - </target> - - <!-- delete and recreate the build directory --> - <target name="clean" description="deletes compiled classes." depends="init"> - <delete dir="${build.dir.production}"/> - <mkdir dir="${build.dir.production}"/> - </target> - - <!-- compiling all Java classes --> - <target name="compile" depends="init,clean,ctags" description="compiles source."> - <javac srcdir="${src.dir}:../src/app:../textedit/src/app:../utils/src/app:../model/src/app:../preferences/src/app" destdir="${build.dir.production}" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" debug="${debug}" excludes="test/**/*.java" fork="${javac.fork}" includeantruntime="false"> - <classpath> - <fileset dir="${lib.dir}" includes="*.jar"/> - <fileset dir="../lib/" includes="*.jar"/> - </classpath> - <compilerarg line="${javac.args}"/> - </javac> - </target> - - <!-- create JAR file --> - <target name="jar" depends="compile" description="compiles source and creates jar."> - <!-- copy the resource files into the build dir --> - <copy todir="${build.dir.production}"> - <fileset dir="${resource.dir}"> - <include name="icons/**/*.*"/> - <include name="resource/**"/> - <include name="system/**/*.*"/> - <exclude name="**/.xvpics/**"/> - </fileset> - </copy> - <copy todir="${build.dir.production}"> - <fileset dir="../src/app" excludes="**/*.java,**/package.html,**/overview.html"/> - <fileset dir="../textedit/src/app" excludes="**/*.java,**/package.html,**/overview.html"/> - <fileset dir="../utils/src/app" excludes="**/*.java,**/package.html,**/overview.html"/> - <fileset dir="../model/src/app" excludes="**/*.java,**/package.html,**/overview.html"/> - <fileset dir="../preferences/src/app" excludes="**/*.java,**/package.html,**/overview.html"/> - </copy> - <copy todir="${build.dir.production}"> - <fileset dir="${src.dir}" includes="**/*.properties"/> - </copy> - <copy todir="${build.dir.production}"> - <fileset dir="../resource"> - <include name="icons/**/*.*"/> - <include name="log4j.properties"/> - <include name="system/**/*.*"/> - <include name="toolbarButtonGraphics/**/*.*"/> - </fileset> - </copy> - <!--copy file="${arch.dir}/archetypes" todir="${build.dir.production}" /--><!--copy file="${arch.dir}/atrinik.0" todir="${build.dir.production}" /--><!--copy file="${arch.dir}/treasures" todir="${build.dir.production}" /--> - <delete dir="${build.dir.production}/customize"/> - - <jar destfile="${jarname}" index="true"> - <!-- pack everything into the jar file --> - <fileset dir="${build.dir.production}" excludes="MANIFEST.MF,test/**"/> - <fileset file="build.properties"/> - <fileset file="../COPYING"/> - <fileset dir="${lib.dir}"> - <include name="*-LICENSE"/> - </fileset> - <fileset dir="../lib"> - <include name="bsh-LICENSE"/> - <include name="java-getopt-1.0.13"/> - <include name="japi.jar-LICENSE"/> - <include name="log4j-1.2.13.jar-LICENSE"/> - <include name="jdom.jar-LICENSE"/> - <include name="java-getopt-1.0.13.jar-LICENSE"/> - </fileset> - <zipfileset src="../lib/log4j-1.2.13.jar"/> - <zipfileset src="../lib/java-getopt-1.0.13.jar"/> - <zipfileset src="../lib/jdom.jar"/> - <zipfileset src="../lib/bsh-core-2.0b4.jar" excludes="META-INF/**"/> - <zipfileset src="../lib/bsh-commands-2.0b4.jar" excludes="META-INF/**"/> - <zipfileset src="../lib/bsh-classgen-2.0b4.jar" excludes="META-INF/**"/> - <zipfileset src="../lib/bsh-util-2.0b4.jar" excludes="META-INF/**"/> - <zipgroupfileset dir="../lib/" includes="japi-*.jar"/> - <!-- creating the manifest --> - <manifest> - <attribute name="Main-Class" value="${package}.AtrinikEditor"/> - <attribute name="SplashScreen-Image" value="icons/CFIntro.gif"/> - </manifest> - </jar> - - <!-- delete the build directory --> - <delete dir="${build.dir.production}"/> - </target> - - <!-- run the jar file with default memory (64 Mb on most systems) --> - <target name="run" depends="init" description="runs editor."> - <java jar="${jarname}" fork="true" failonerror="true"/> - </target> - - <!-- run the jar file with extra memory (128 Mb) --> - <target name="run_high" depends="init" description="runs editor with extra memory (128m)."> - <java jar="${jarname}" fork="true" failonerror="true" maxmemory="128m"/> - </target> - - <!-- Create API documentation. --> - <target name="doc" depends="init" description="creates JavaDoc documentation for editor source."> - <mkdir dir="javadoc"/> - <javadoc destdir="javadoc" locale="en_US" version="yes" author="yes" use="yes" splitindex="yes" windowtitle="${targetName} Editor — API Documentation" doctitle="${targetName} Editor<br />API Documentation" header="${targetName} Editor<br />API Documentation" footer="${targetName} Editor<br />API Documentation" bottom="<div style="text-align:center;">© 2003 Andreas Vogl, Michael Toennies, 2004-2006 The ${targetName} Developers, 2006 The Gridarta Developers. All rights reserved.</div>" serialwarn="yes" charset="utf-8" docencoding="utf-8" source="${build.source.version}" encoding="${build.source.encoding}" linksource="yes" private="yes" overview="src/${package}/overview.html" link="${user.javadoc.link}"> - <classpath> - <fileset dir="${lib.dir}" includes="*.jar" excludes="*.jar-LICENSE"/> - <fileset dir="../lib/" includes="*.jar" excludes="*.jar-LICENSE"/> - </classpath> - <sourcepath path="${src.dir}"/> - <packageset dir="src" defaultexcludes="yes"> - <include name="**"/> - </packageset> - <tag name="todo" description="Todo:"/> - <tag name="used" description="Manually marked as used." enabled="false"/> - <tag name="fixme" description="Fixme:"/> - <tag name="xxx" description="XXX:"/> - <tag name="note" description="Note:"/> - <tag name="devs" description="At Developers:"/> - </javadoc> - </target> - - <!-- Check the source style. - - @see http://checkstyle.sf.net/ - --> - <target name="checkstyle" depends="init" description="performs style checks for source."> - <taskdef resource="checkstyletask.properties" classpath="${checkstyle.path}"/> - <mkdir dir="${test.dir}"/> - <checkstyle config="${checkstyle.conv}"> - <fileset dir="${src.dir}" includes="**/*.java"/> - <formatter type="plain"/> - <formatter type="xml" toFile="${test.dir}/checkstyle_errors.xml"/> - </checkstyle> - </target> - - <!-- Prints a todo list. - - Useful e.g. to parse the list from within vi and jump from todo change to todo change. - --> - <target name="todo" depends="init" description="prints a file with todo information"> - <concat> - <fileset file="${todo.file}"/> - </concat> - </target> - - <target name="preparePublish" description="preparse files to publish" depends="jar"> - <property name="update.number" value="${build.number}"/> - <property name="update.tstamp" value="${build.tstamp}"/> - <property name="update.developer" value="${build.developer}"/> - <property name="update.url" value="${user.update.url}"/> - <echoproperties destfile="update.properties"> - <propertyset> - <propertyref prefix="update"/> - </propertyset> - </echoproperties> - </target> - - <target name="ftpPublish" description="publishes ${jarname} using ftp" depends="preparePublish"> - <ftp server="${user.ftp.host}" userid="${user.ftp.user}" password="${user.ftp.pass}" remotedir="${user.ftp.dir}" depends="${user.ftp.depends}" passive="${user.ftp.passive}" ignoreNoncriticalErrors="${user.ftp.ignoreNoncriticalErrors}"> - <fileset dir="."> - <include name="${jarname}"/> - <include name="update.properties"/> - </fileset> - </ftp> - </target> - - <target name="scpPublish" description="publishes ${jarname} using scp" depends="preparePublish"> - <scp todir="${user.scp.dir}" passphrase="${user.scp.passphrase}" trust="${user.scp.trust}" keyfile="${user.scp.keyfile}"> - <fileset dir="."> - <include name="${jarname}"/> - <include name="update.properties"/> - </fileset> - </scp> - </target> - -</project> Property changes on: trunk/crossfire ___________________________________________________________________ Modified: svn:ignore - build.properties class classes CrossfireEditor.jar developer.properties tags + developer.properties Deleted: trunk/crossfire/build.xml =================================================================== --- trunk/crossfire/build.xml 2010-11-13 17:59:16 UTC (rev 8783) +++ trunk/crossfire/build.xml 2010-11-13 18:06:38 UTC (rev 8784) @@ -1,257 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- - ~ Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. - ~ Copyright (C) 2000-2010 The Gridarta Developers. - ~ - ~ 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 2 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, write to the Free Software Foundation, Inc., - ~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - --> - -<!-- - - This is the Ant buildfile for the Gridarta Editor for Crossfire - - - - Apache Ant is a Java-based cross-platform build tool. - - For more information about Ant, visit <http://ant.apache.org/> - - - - Do not move, edit or delete this file. It should stay in the - - main directory of the Crossfire Editor. - - - - How to use Ant for the Crossfire Editor: - - - - o Install Ant on your system. Make sure both the JAVA_HOME - - and ANT_HOME environment variables are set correctly. - - - - o Change into the Crossfire Editor main directory. - - run "ant" to compile, - - run "ant run" to run the editor. - --> -<project name="Gridarta Editor for Crossfire" default="jar"> - - <!-- set properties and clean build directory --> - <target name="init"> - <property name="package" value="net.sf.gridarta.var.crossfire.maincontrol"/> - <property name="targetName" value="Crossfire"/> - <property file="developer.properties"/> - <property name="src.dir" value="src/app"/> - <property name="lib.dir" value="lib"/> - <property name="devlib.dir" value="devlib/"/> - <!-- Don't forget trailing / ! --> - <property name="test.dir" value="test"/> - <property name="resource.dir" value="resource"/> - <property name="build.dir.production" value="class/production"/> - <property name="jarname" value="${targetName}Editor.jar"/> - <property name="build.source.version" value="1.5"/> - <property name="build.target.version" value="${build.source.version}"/> - <property name="build.source.encoding" value="utf-8"/> - <property name="todo.file" value="todo.txt"/> - <property name="debug" value="false"/> - <property name="user.ftp.depends" value="yes"/> - <property name="user.ftp.passive" value="yes"/> - <property name="user.ftp.ignoreNoncriticalErrors" value="yes"/> - <property name="build.developer" value="unknown"/> - <property name="javac.args" value="-Xlint:all,-path,-unchecked,-fallthrough,-serial,-deprecation"/> - <property name="javac.fork" value="no"/> - <tstamp> - <format property="build.tstamp" pattern="yyyy-MM-dd HH:mm:ss z" timezone="UTC"/> - </tstamp> - <exec executable="svnversion" outputproperty="build.svnversion" failifexecutionfails="false"/> - <property name="build.svnversion" value="unknown"/> - <property name="build.version" value="Gridzilla"/> - <property name="build.number" value="${build.version} (revision ${build.svnversion})"/> - <echoproperties destfile="build.properties"> - <propertyset> - <propertyref prefix="build.developer"/> - <propertyref prefix="build.number"/> - <propertyref prefix="build.tstamp"/> - <propertyref prefix="build.svnversion"/> - <propertyref prefix="build.version"/> - </propertyset> - </echoproperties> - </target> - - <!-- create ctags. --> - <target name="ctags" if="user.ctags" depends="init" description="creates tags file with symbol definitions for vim and other editors."> - <exec executable="ctags"> - <arg line="-R ${src.dir}"/> - </exec> - </target> - - <!-- delete and recreate the build directory --> - <target name="clean" description="deletes compiled classes." depends="init"> - <delete dir="${build.dir.production}"/> - <mkdir dir="${build.dir.production}"/> - </target> - - <!-- compiling all Java classes --> - <target name="compile" depends="init,clean,ctags" description="compiles source."> - <javac srcdir="${src.dir}:../src/app:../textedit/src/app:../utils/src/app:../model/src/app:../preferences/src/app" destdir="${build.dir.production}" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" debug="${debug}" excludes="test/**/*.java" fork="${javac.fork}" includeantruntime="false"> - <classpath> - <fileset dir="${lib.dir}" includes="*.jar"/> - <fileset dir="../lib/" includes="*.jar"/> - </classpath> - <compilerarg line="${javac.args}"/> - </javac> - </target> - - <!-- create JAR file --> - <target name="jar" depends="compile" description="compiles source and creates jar."> - <jar destfile="${jarname}" index="true"> - <!-- pack everything into the jar file --> - <fileset dir="${build.dir.production}" excludes="MANIFEST.MF,test/**"/> - <fileset dir="${src.dir}" includes="**/*.properties,cfpython_menu.def"/> - <fileset file="build.properties"/> - <fileset file="../COPYING"/> - <fileset dir="${lib.dir}"> - <include name="*-LICENSE"/> - </fileset> - <fileset dir="../lib"> - <include name="bsh-LICENSE"/> - <include name="java-getopt-1.0.13"/> - <include name="japi.jar-LICENSE"/> - <include name="log4j-1.2.13.jar-LICENSE"/> - <include name="jdom.jar-LICENSE"/> - <include name="java-getopt-1.0.13.jar-LICENSE"/> - </fileset> - <fileset dir="${resource.dir}"> - <include name="icons/**"/> - <include name="resource/**"/> - <include name="system/**"/> - </fileset> - <fileset dir="../src/app" excludes="**/*.java,**/package.html,**/overview.html"/> - <fileset dir="../textedit/src/app" excludes="**/*.java,**/package.html,**/overview.html"/> - <fileset dir="../utils/src/app" excludes="**/*.java,**/package.html,**/overview.html"/> - <fileset dir="../model/src/app" excludes="**/*.java,**/package.html,**/overview.html"/> - <fileset dir="../preferences/src/app" excludes="**/*.java,**/package.html,**/overview.html"/> - <fileset dir="../resource"> - <include name="icons/**"/> - <include name="log4j.properties"/> - <include name="system/**"/> - <include name="toolbarButtonGraphics/**/*.*"/> - </fileset> - <zipfileset src="../lib/log4j-1.2.13.jar"/> - <zipfileset src="../lib/java-getopt-1.0.13.jar"/> - <zipfileset src="../lib/jdom.jar" excludes="META-INF/**"/> - <zipfileset src="../lib/bsh-core-2.0b4.jar" excludes="META-INF/**"/> - <zipfileset src="../lib/bsh-commands-2.0b4.jar" excludes="META-INF/**"/> - <zipfileset src="../lib/bsh-classgen-2.0b4.jar" excludes="META-INF/**"/> - <zipfileset src="../lib/bsh-util-2.0b4.jar" excludes="META-INF/**"/> - <zipgroupfileset dir="../lib/" includes="japi-*.jar"/> - <!-- creating the manifest --> - <manifest> - <attribute name="Main-Class" value="${package}.CrossfireEditor"/> - <attribute name="SplashScreen-Image" value="icons/CFIntro.gif"/> - </manifest> - </jar> - - <!-- delete the build directory --> - <delete dir="${build.dir.production}"/> - </target> - - <!-- run the jar file with default memory (64 Mb on most systems) --> - <target name="run" depends="init" description="runs editor."> - <java jar="${jarname}" fork="true" failonerror="true"/> - </target> - - <!-- run the jar file with extra memory (128 Mb) --> - <target name="run_high" depends="init" description="runs editor with extra memory (128m)."> - <java jar="${jarname}" fork="true" failonerror="true" maxmemory="128m"/> - </target> - - <!-- Create API documentation. --> - <target name="doc" depends="init" description="creates JavaDoc documentation for editor source."> - <mkdir dir="javadoc"/> - <javadoc destdir="javadoc" locale="en_US" version="yes" author="yes" use="yes" splitindex="yes" windowtitle="${targetName} Editor — API Documentation" doctitle="${targetName} Editor<br />API Documentation" header="${targetName} Editor<br />API Documentation" footer="${targetName} Editor<br />API Documentation" bottom="<div style="text-align:center;">© 2003 Andreas Vogl, Michael Toennies, 2004-2006 The ${targetName} Developers, 2006 The Gridarta Developers. All rights reserved.</div>" serialwarn="yes" charset="utf-8" docencoding="utf-8" source="${build.source.version}" encoding="${build.source.encoding}" linksource="yes" private="yes" overview="src/${package}/overview.html" link="${user.javadoc.link}"> - <classpath> - <fileset dir="${lib.dir}" includes="*.jar" excludes="*.jar-LICENSE"/> - <fileset dir="../lib/" includes="*.jar" excludes="*.jar-LICENSE"/> - </classpath> - <packageset dir="src" defaultexcludes="yes"> - <include name="**"/> - </packageset> - <packageset dir="../src/app" defaultexcludes="yes"> - <include name="**"/> - </packageset> - <packageset dir="../textedit/src/app" defaultexcludes="yes"> - <include name="**"/> - </packageset> - <packageset dir="../utils/src/app" defaultexcludes="yes"> - <include name="**"/> - </packageset> - <packageset dir="../model/src/app" defaultexcludes="yes"> - <include name="**"/> - </packageset> - <packageset dir="../preferences/src/app" defaultexcludes="yes"> - <include name="**"/> - </packageset> - <tag name="todo" description="Todo:"/> - <tag name="used" description="Manually marked as used." enabled="false"/> - <tag name="fixme" description="Fixme:"/> - <tag name="xxx" description="XXX:"/> - <tag name="note" description="Note:"/> - <tag name="devs" description="At Developers:"/> - </javadoc> - </target> - - <!-- Check the source style. - - @see http://checkstyle.sf.net/ - --> - <target name="checkstyle" depends="init" description="performs style checks for source."> - <taskdef resource="checkstyletask.properties" classpath="${checkstyle.path}"/> - <mkdir dir="${test.dir}"/> - <checkstyle config="${checkstyle.conv}"> - <fileset dir="${src.dir}" includes="**/*.java"/> - <formatter type="plain"/> - <formatter type="xml" toFile="${test.dir}/checkstyle_errors.xml"/> - </checkstyle> - </target> - - <!-- Prints a todo list. - - Useful e.g. to parse the list from within vi and jump from todo change to todo change. - --> - <target name="todo" depends="init" description="prints a file with todo information"> - <concat> - <fileset file="${todo.file}"/> - </concat> - </target> - - <target name="preparePublish" description="preparse files to publish" depends="jar"> - <property name="update.number" value="${build.number}"/> - <property name="update.tstamp" value="${build.tstamp}"/> - <property name="update.developer" value="${build.developer}"/> - <property name="update.url" value="${user.update.url}"/> - <echoproperties destfile="update.properties"> - <propertyset> - <propertyref prefix="update"/> - </propertyset> - </echoproperties> - </target> - - <target name="ftpPublish" description="publishes ${jarname} using ftp" depends="preparePublish"> - <ftp server="${user.ftp.host}" userid="${user.ftp.user}" password="${user.ftp.pass}" remotedir="${user.ftp.dir}" depends="${user.ftp.depends}" passive="${user.ftp.passive}" ignoreNoncriticalErrors="${user.ftp.ignoreNoncriticalErrors}"> - <fileset dir="."> - <include name="${jarname}"/> - <include name="update.properties"/> - </fileset> - </ftp> - </target> - - <target name="scpPublish" description="publishes ${jarname} using scp" depends="preparePublish"> - <scp todir="${user.scp.dir}" passphrase="${user.scp.passphrase}" trust="${user.scp.trust}" keyfile="${user.scp.keyfile}"> - <fileset dir="."> - <include name="${jarname}"/> - <include name="update.properties"/> - </fileset> - </scp> - </target> - -</project> Property changes on: trunk/daimonin ___________________________________________________________________ Modified: svn:ignore - build.properties class classes DaimoninEditor.jar developer.properties tags update.properties + developer.properties update.properties Deleted: trunk/daimonin/build.xml =================================================================== --- trunk/daimonin/build.xml 2010-11-13 17:59:16 UTC (rev 8783) +++ trunk/daimonin/build.xml 2010-11-13 18:06:38 UTC (rev 8784) @@ -1,256 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- - ~ Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. - ~ Copyright (C) 2000-2010 The Gridarta Developers. - ~ - ~ 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 2 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, write to the Free Software Foundation, Inc., - ~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - --> - -<!-- - - This is the Ant buildfile for the Gridarta Editor for Daimonin - - - - Apache Ant is a Java-based cross-platform build tool. - - For more information about Ant, visit <http://ant.apache.org/> - - - - Do not move, edit or delete this file. It should stay in the - - main directory of the Daimonin Editor. - - - - How to use Ant for the Daimonin Editor: - - - - o Install Ant on your system. Make sure both the JAVA_HOME - - and ANT_HOME environment variables are set correctly. - - - - o Change into the Daimonin Editor main directory. - - run "ant" to compile, - - run "ant run" to run the editor. - --> -<project name="Gridarta Editor for Daimonin" default="jar"> - - <!-- set properties and clean build directory --> - <target name="init"> - <property name="package" value="net.sf.gridarta.var.daimonin.maincontrol"/> - <property name="targetName" value="Daimonin"/> - <property file="developer.properties"/> - <property name="src.dir" value="src/app"/> - <property name="lib.dir" value="lib"/> - <property name="devlib.dir" value="devlib/"/> - <!-- Don't forget trailing / ! --> - <property name="test.dir" value="test"/> - <property name="resource.dir" value="resource"/> - <property name="arch.dir" value="../arch"/> - <property name="build.dir.production" value="class/production"/> - <property name="jarname" value="${targetName}Editor.jar"/> - <property name="build.source.version" value="1.5"/> - <property name="build.target.version" value="${build.source.version}"/> - <property name="build.source.encoding" value="utf-8"/> - <property name="checkstyle.path" value="${devlib.dir}checkstyle-all-3.5.jar"/> - <property name="checkstyle.conv" value="${devlib.dir}checkstyle_checks.xml"/> - <property name="todo.file" value="todo.txt"/> - <property name="debug" value="false"/> - <property name="user.ftp.depends" value="yes"/> - <property name="user.ftp.passive" value="yes"/> - <property name="user.ftp.ignoreNoncriticalErrors" value="yes"/> - <property name="build.developer" value="unknown"/> - <property name="javac.args" value="-Xlint:all,-path,-unchecked,-fallthrough,-serial,-deprecation"/> - <property name="javac.fork" value="no"/> - <tstamp> - <format property="build.tstamp" pattern="yyyy-MM-dd HH:mm:ss z" timezone="UTC"/> - </tstamp> - <exec executable="svnversion" outputproperty="build.svnversion" failifexecutionfails="false"/> - <property name="build.svnversion" value="unknown"/> - <property name="build.version" value="Gridzilla"/> - <property name="build.number" value="${build.version} (revision ${build.svnversion})"/> - <echoproperties destfile="build.properties"> - <propertyset negate="true"> - <propertyref prefix="user.ftp"/> - <propertyref prefix="user.scp"/> - </propertyset> - </echoproperties> - </target> - - <!-- create ctags. --> - <target name="ctags" if="user.ctags" depends="init" description="creates tags file with symbol definitions for vim and other editors."> - <exec executable="ctags"> - <arg line="-R ${src.dir}"/> - </exec> - </target> - - <!-- delete and recreate the build directory --> - <target name="clean" description="deletes compiled classes." depends="init"> - <delete dir="${build.dir.production}"/> - <mkdir dir="${build.dir.production}"/> - </target> - - <!-- compiling all Java classes --> - <target name="compile" depends="init,clean,ctags" description="compiles source."> - <javac srcdir="${src.dir}:../src/app:../textedit/src/app:../utils/src/app:../model/src/app:../preferences/src/app" destdir="${build.dir.production}" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" debug="${debug}" excludes="test/**/*.java" fork="${javac.fork}" includeantruntime="false"> - <classpath> - <fileset dir="${lib.dir}" includes="*.jar"/> - <fileset dir="../lib/" includes="*.jar"/> - </classpath> - <compilerarg line="${javac.args}"/> - </javac> - </target> - - <!-- create JAR file --> - <target name="jar" depends="compile" description="compiles source and creates jar."> - <!-- copy the resource files into the build dir --> - <copy todir="${build.dir.production}"> - <fileset dir="${resource.dir}"> - <include name="icons/**/*.*"/> - <include name="resource/**"/> - <include name="system/**/*.*"/> - <exclude name="**/.xvpics/**"/> - </fileset> - </copy> - <copy todir="${build.dir.production}"> - <fileset dir="../src/app" excludes="**/*.java,**/package.html,**/overview.html"/> - <fileset dir="../textedit/src/app" excludes="**/*.java,**/package.html,**/overview.html"/> - <fileset dir="../utils/src/app" excludes="**/*.java,**/package.html,**/overview.html"/> - <fileset dir="../model/src/app" excludes="**/*.java,**/package.html,**/overview.html"/> - <fileset dir="../preferences/src/app" excludes="**/*.java,**/package.html,**/overview.html"/> - </copy> - <copy todir="${build.dir.production}"> - <fileset dir="${src.dir}" includes="**/*.properties"/> - </copy> - <copy todir="${build.dir.production}"> - <fileset dir="../resource"> - <include name="icons/**/*.*"/> - <include name="log4j.properties"/> - <include name="system/**/*.*"/> - <include name="toolbarButtonGraphics/**/*.*"/> - </fileset> - </copy> - <!--copy file="${arch.dir}/archetypes" todir="${build.dir.production}" /--><!--copy file="${arch.dir}/daimonin.0" todir="${build.dir.production}" /--><!--copy file="${arch.dir}/treasures" todir="${build.dir.production}" /--> - <delete dir="${build.dir.production}/customize"/> - - <jar destfile="${jarname}" index="true"> - <!-- pack everything into the jar file --> - <fileset dir="${build.dir.production}" excludes="MANIFEST.MF,test/**"/> - <fileset file="build.properties"/> - <fileset file="../COPYING"/> - <fileset dir="${lib.dir}"> - <include name="*-LICENSE"/> - </fileset> - <fileset dir="../lib"> - <include name="bsh-LICENSE"/> - <include name="java-getopt-1.0.13"/> - <include name="japi.jar-LICENSE"/> - <include name="log4j-1.2.13.jar-LICENSE"/> - <include name="jdom.jar-LICENSE"/> - <include name="java-getopt-1.0.13.jar-LICENSE"/> - </fileset> - <zipfileset src="../lib/log4j-1.2.13.jar"/> - <zipfileset src="../lib/java-getopt-1.0.13.jar"/> - <zipfileset src="../lib/jdom.jar"/> - <zipfileset src="../lib/bsh-core-2.0b4.jar" excludes="META-INF/**"/> - <zipfileset src="../lib/bsh-commands-2.0b4.jar" excludes="META-INF/**"/> - <zipfileset src="../lib/bsh-classgen-2.0b4.jar" excludes="META-INF/**"/> - <zipfileset src="../lib/bsh-util-2.0b4.jar" excludes="META-INF/**"/> - <zipgroupfileset dir="../lib/" includes="japi-*.jar"/> - <!-- creating the manifest --> - <manifest> - <attribute name="Main-Class" value="${package}.DaimoninEditor"/> - <attribute name="SplashScreen-Image" value="icons/CFIntro.gif"/> - </manifest> - </jar> - - <!-- delete the build directory --> - <delete dir="${build.dir.production}"/> - </target> - - <!-- run the jar file with default memory (64 Mb on most systems) --> - <target name="run" depends="init" description="runs editor."> - <java jar="${jarname}" fork="true" failonerror="true"/> - </target> - - <!-- run the jar file with extra memory (128 Mb) --> - <target name="run_high" depends="init" description="runs editor with extra memory (128m)."> - <java jar="${jarname}" fork="true" failonerror="true" maxmemory="128m"/> - </target> - - <!-- Create API documentation. --> - <target name="doc" depends="init" description="creates JavaDoc documentation for editor source."> - <mkdir dir="javadoc"/> - <javadoc destdir="javadoc" locale="en_US" version="yes" author="yes" use="yes" splitindex="yes" windowtitle="${targetName} Editor — API Documentation" doctitle="${targetName} Editor<br />API Documentation" header="${targetName} Editor<br />API Documentation" footer="${targetName} Editor<br />API Documentation" bottom="<div style="text-align:center;">© 2003 Andreas Vogl, Michael Toennies, 2004-2006 The ${targetName} Developers, 2006 The Gridarta Developers. All rights reserved.</div>" serialwarn="yes" charset="utf-8" docencoding="utf-8" source="${build.source.version}" encoding="${build.source.encoding}" linksource="yes" private="yes" overview="src/${package}/overview.html" link="${user.javadoc.link}"> - <classpath> - <fileset dir="${lib.dir}" includes="*.jar" excludes="*.jar-LICENSE"/> - <fileset dir="../lib/" includes="*.jar" excludes="*.jar-LICENSE"/> - </classpath> - <sourcepath path="${src.dir}"/> - <packageset dir="src" defaultexcludes="yes"> - <include name="**"/> - </packageset> - <tag name="todo" description="Todo:"/> - <tag name="used" description="Manually marked as used." enabled="false"/> - <tag name="fixme" description="Fixme:"/> - <tag name="xxx" description="XXX:"/> - <tag name="note" description="Note:"/> - <tag name="devs" description="At Developers:"/> - </javadoc> - </target> - - <!-- Check the source style. - - @see http://checkstyle.sf.net/ - --> - <target name="checkstyle" depends="init" description="performs style checks for source."> - <taskdef resource="checkstyletask.properties" classpath="${checkstyle.path}"/> - <mkdir dir="${test.dir}"/> - <checkstyle config="${checkstyle.conv}"> - <fileset dir="${src.dir}" includes="**/*.java"/> - <formatter type="plain"/> - <formatter type="xml" toFile="${test.dir}/checkstyle_errors.xml"/> - </checkstyle> - </target> - - <!-- Prints a todo list. - - Useful e.g. to parse the list from within vi and jump from todo change to todo change. - --> - <target name="todo" depends="init" description="prints a file with todo information"> - <concat> - <fileset file="${todo.file}"/> - </concat> - </target> - - <target name="preparePublish" description="preparse files to publish" depends="jar"> - <property name="update.number" value="${build.number}"/> - <property name="update.tstamp" value="${build.tstamp}"/> - <property name="update.developer" value="${build.developer}"/> - <property name="update.url" value="${user.update.url}"/> - <echoproperties destfile="update.properties"> - <propertyset> - <propertyref prefix="update"/> - </propertyset> - </echoproperties> - </target> - - <target name="ftpPublish" description="publishes ${jarname} using ftp" depends="preparePublish"> - <ftp server="${user.ftp.host}" userid="${user.ftp.user}" password="${user.ftp.pass}" remotedir="${user.ftp.dir}" depends="${user.ftp.depends}" passive="${user.ftp.passive}" ignoreNoncriticalErrors="${user.ftp.ignoreNoncriticalErrors}"> - <fileset dir="."> - <include name="${jarname}"/> - <include name="update.properties"/> - </fileset> - </ftp> - </target> - - <target name="scpPublish" description="publishes ${jarname} using scp" depends="preparePublish"> - <scp todir="${user.scp.dir}" passphrase="${user.scp.passphrase}" trust="${user.scp.trust}" keyfile="${user.scp.keyfile}"> - <fileset dir="."> - <include name="${jarname}"/> - <include name="update.properties"/> - </fileset> - </scp> - </target> - -</project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-11-13 17:59:24
|
Revision: 8783 http://gridarta.svn.sourceforge.net/gridarta/?rev=8783&view=rev Author: akirschbaum Date: 2010-11-13 17:59:16 +0000 (Sat, 13 Nov 2010) Log Message: ----------- Extract duplicated path names into properties. Modified Paths: -------------- trunk/build.xml Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2010-11-13 17:32:50 UTC (rev 8782) +++ trunk/build.xml 2010-11-13 17:59:16 UTC (rev 8783) @@ -54,68 +54,72 @@ <property name="svn.tag.targetUrl" value="${svn.baseUrl}/tags/${project.version.major}.${project.version.minor}.${project.version.patch}"/> <property name="svn.tag.message" value="Creating release tag for version ${project.version.major}.${project.version.minor}.${project.version.patch}"/> + <property name="build.dir" value="dest"/> + <property name="dist.dir" value="dist"/> + <property name="docs.dir" value="docs"/> + <path id="path.class.atrinik.app"> - <pathelement location="dest/atrinik/app"/> + <pathelement location="${build.dir}/atrinik/app"/> </path> <path id="path.class.atrinik.test"> <path refid="path.class.atrinik.app"/> - <pathelement location="dest/atrinik/test"/> + <pathelement location="${build.dir}/atrinik/test"/> </path> <path id="path.class.crossfire.app"> - <pathelement location="dest/crossfire/app"/> + <pathelement location="${build.dir}/crossfire/app"/> </path> <path id="path.class.crossfire.test"> <path refid="path.class.crossfire.app"/> - <pathelement location="dest/crossfire/test"/> + <pathelement location="${build.dir}/crossfire/test"/> </path> <path id="path.class.daimonin.app"> - <pathelement location="dest/daimonin/app"/> + <pathelement location="${build.dir}/daimonin/app"/> </path> <path id="path.class.daimonin.test"> <path refid="path.class.daimonin.app"/> - <pathelement location="dest/daimonin/test"/> + <pathelement location="${build.dir}/daimonin/test"/> </path> <path id="path.class.gridarta.app"> - <pathelement location="dest/gridarta/app"/> + <pathelement location="${build.dir}/gridarta/app"/> </path> <path id="path.class.gridarta.test"> <path refid="path.class.gridarta.app"/> - <pathelement location="dest/gridarta/test"/> + <pathelement location="${build.dir}/gridarta/test"/> </path> <path id="path.class.model.app"> - <pathelement location="dest/model/app"/> + <pathelement location="${build.dir}/model/app"/> </path> <path id="path.class.model.test"> <path refid="path.class.model.app"/> - <pathelement location="dest/model/test"/> + <pathelement location="${build.dir}/model/test"/> </path> <path id="path.class.preferences.app"> - <pathelement location="dest/preferences/app"/> + <pathelement location="${build.dir}/preferences/app"/> </path> <path id="path.class.preferences.test"> <path refid="path.class.preferences.app"/> - <pathelement location="dest/preferences/test"/> + <pathelement location="${build.dir}/preferences/test"/> </path> <path id="path.class.textedit.app"> - <pathelement location="dest/textedit/app"/> + <pathelement location="${build.dir}/textedit/app"/> </path> <path id="path.class.textedit.test"> <path refid="path.class.textedit.app"/> - <pathelement location="dest/textedit/test"/> + <pathelement location="${build.dir}/textedit/test"/> </path> <path id="path.class.utils.app"> - <pathelement location="dest/utils/app"/> + <pathelement location="${build.dir}/utils/app"/> </path> <path id="path.class.utils.test"> <path refid="path.class.utils.app"/> - <pathelement location="dest/utils/test"/> + <pathelement location="${build.dir}/utils/test"/> </path> <path id="path.lib.annotations" location="lib/annotations.jar"/> @@ -161,11 +165,11 @@ </target> <target name="clean" description="Removes all generated files."> - <delete dir="dest"/> - <delete dir="dist"/> + <delete dir="${build.dir}"/> + <delete dir="${dist.dir}"/> <delete file="src/doc/dev/SafeCopy.java.xhtml"/> <delete file="src/doc/dev/changelog.xml"/> - <delete dir="docs"/> + <delete dir="${docs.dir}"/> <delete dir="classes"/> <delete file="AtrinikEditor.jar"/> <delete file="CrossfireEditor.jar"/> @@ -176,13 +180,13 @@ <target name="jar-atrinik" description="Creates AtrinikEditor.jar" depends="compile-atrinik,init-properties"> <jar destfile="AtrinikEditor.jar" index="true"> - <fileset dir="dest/atrinik/app"/> - <fileset dir="dest/gridarta/app"/> - <fileset dir="dest/model/app"/> - <fileset dir="dest/preferences/app"/> - <fileset dir="dest/textedit/app"/> - <fileset dir="dest/utils/app"/> - <fileset dir="dest" includes="build.properties"/> + <fileset dir="${build.dir}/atrinik/app"/> + <fileset dir="${build.dir}/gridarta/app"/> + <fileset dir="${build.dir}/model/app"/> + <fileset dir="${build.dir}/preferences/app"/> + <fileset dir="${build.dir}/textedit/app"/> + <fileset dir="${build.dir}/utils/app"/> + <fileset dir="${build.dir}" includes="build.properties"/> <fileset file="COPYING"/> <fileset dir="atrinik/lib"> <include name="*-LICENSE"/> @@ -213,13 +217,13 @@ <target name="jar-crossfire" description="Creates CrossfireEditor.jar" depends="compile-crossfire,init-properties"> <jar destfile="CrossfireEditor.jar" index="true"> - <fileset dir="dest/crossfire/app"/> - <fileset dir="dest/gridarta/app"/> - <fileset dir="dest/model/app"/> - <fileset dir="dest/preferences/app"/> - <fileset dir="dest/textedit/app"/> - <fileset dir="dest/utils/app"/> - <fileset dir="dest" includes="build.properties"/> + <fileset dir="${build.dir}/crossfire/app"/> + <fileset dir="${build.dir}/gridarta/app"/> + <fileset dir="${build.dir}/model/app"/> + <fileset dir="${build.dir}/preferences/app"/> + <fileset dir="${build.dir}/textedit/app"/> + <fileset dir="${build.dir}/utils/app"/> + <fileset dir="${build.dir}" includes="build.properties"/> <fileset file="COPYING"/> <fileset dir="crossfire/lib"> <include name="*-LICENSE"/> @@ -250,13 +254,13 @@ <target name="jar-daimonin" description="Creates DaimoninEditor.jar" depends="compile-daimonin,init-properties"> <jar destfile="DaimoninEditor.jar" index="true"> - <fileset dir="dest/daimonin/app"/> - <fileset dir="dest/gridarta/app"/> - <fileset dir="dest/model/app"/> - <fileset dir="dest/preferences/app"/> - <fileset dir="dest/textedit/app"/> - <fileset dir="dest/utils/app"/> - <fileset dir="dest" includes="build.properties"/> + <fileset dir="${build.dir}/daimonin/app"/> + <fileset dir="${build.dir}/gridarta/app"/> + <fileset dir="${build.dir}/model/app"/> + <fileset dir="${build.dir}/preferences/app"/> + <fileset dir="${build.dir}/textedit/app"/> + <fileset dir="${build.dir}/utils/app"/> + <fileset dir="${build.dir}" includes="build.properties"/> <fileset file="COPYING"/> <fileset dir="daimonin/lib"> <include name="*-LICENSE"/> @@ -291,7 +295,7 @@ </tstamp> <exec executable="svnversion" outputproperty="build.number" failifexecutionfails="false"/> <property name="build.number" value="unknown"/> - <echoproperties destfile="dest/build.properties"> + <echoproperties destfile="${build.dir}/build.properties"> <propertyset> <propertyref prefix="build.developer"/> <propertyref prefix="build.number"/> @@ -302,8 +306,8 @@ </target> <target name="compile-atrinik" description="Compiles the atrinik module." depends="compile-gridarta,compile-model,compile-preferences,compile-utils"> - <mkdir dir="dest/atrinik/app"/> - <javac srcdir="atrinik/src/app" destdir="dest/atrinik/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> + <mkdir dir="${build.dir}/atrinik/app"/> + <javac srcdir="atrinik/src/app" destdir="${build.dir}/atrinik/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> <path refid="path.class.gridarta.app"/> <path refid="path.class.model.app"/> @@ -316,8 +320,8 @@ </classpath> <compilerarg line="${javac.args}"/> </javac> - <mkdir dir="dest/atrinik/test"/> - <javac srcdir="atrinik/src/test" destdir="dest/atrinik/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> + <mkdir dir="${build.dir}/atrinik/test"/> + <javac srcdir="atrinik/src/test" destdir="${build.dir}/atrinik/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> <path refid="path.class.atrinik.app"/> <path refid="path.class.gridarta.test"/> @@ -329,14 +333,14 @@ </classpath> <compilerarg line="${javac.args}"/> </javac> - <copy todir="dest/atrinik/app"> + <copy todir="${build.dir}/atrinik/app"> <fileset dir="atrinik/src/app" includes="**/*.properties"/> </copy> </target> <target name="compile-crossfire" description="Compiles the crossfire module." depends="compile-gridarta,compile-model,compile-preferences,compile-utils"> - <mkdir dir="dest/crossfire/app"/> - <javac srcdir="crossfire/src/app" destdir="dest/crossfire/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> + <mkdir dir="${build.dir}/crossfire/app"/> + <javac srcdir="crossfire/src/app" destdir="${build.dir}/crossfire/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> <path refid="path.class.gridarta.app"/> <path refid="path.class.model.app"/> @@ -349,8 +353,8 @@ </classpath> <compilerarg line="${javac.args}"/> </javac> - <mkdir dir="dest/crossfire/test"/> - <javac srcdir="crossfire/src/test" destdir="dest/crossfire/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> + <mkdir dir="${build.dir}/crossfire/test"/> + <javac srcdir="crossfire/src/test" destdir="${build.dir}/crossfire/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> <path refid="path.class.crossfire.app"/> <path refid="path.class.gridarta.test"/> @@ -362,14 +366,14 @@ </classpath> <compilerarg line="${javac.args}"/> </javac> - <copy todir="dest/crossfire/app"> + <copy todir="${build.dir}/crossfire/app"> <fileset dir="crossfire/src/app" includes="**/*.properties"/> </copy> </target> <target name="compile-daimonin" description="Compiles the daimonin module." depends="compile-gridarta,compile-model,compile-utils"> - <mkdir dir="dest/daimonin/app"/> - <javac srcdir="daimonin/src/app" destdir="dest/daimonin/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> + <mkdir dir="${build.dir}/daimonin/app"/> + <javac srcdir="daimonin/src/app" destdir="${build.dir}/daimonin/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> <path refid="path.class.gridarta.app"/> <path refid="path.class.model.app"/> @@ -382,8 +386,8 @@ </classpath> <compilerarg line="${javac.args}"/> </javac> - <mkdir dir="dest/daimonin/test"/> - <javac srcdir="daimonin/src/test" destdir="dest/daimonin/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> + <mkdir dir="${build.dir}/daimonin/test"/> + <javac srcdir="daimonin/src/test" destdir="${build.dir}/daimonin/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> <path refid="path.class.daimonin.app"/> <path refid="path.class.gridarta.test"/> @@ -393,14 +397,14 @@ </classpath> <compilerarg line="${javac.args}"/> </javac> - <copy todir="dest/daimonin/app"> + <copy todir="${build.dir}/daimonin/app"> <fileset dir="daimonin/src/app" includes="**/*.properties"/> </copy> </target> <target name="compile-gridarta" description="Compiles the gridarta module." depends="compile-model,compile-preferences,compile-textedit,compile-utils"> - <mkdir dir="dest/gridarta/app"/> - <javac srcdir="src/app" destdir="dest/gridarta/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> + <mkdir dir="${build.dir}/gridarta/app"/> + <javac srcdir="src/app" destdir="${build.dir}/gridarta/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> <path refid="path.class.model.app"/> <path refid="path.class.preferences.app"/> @@ -421,8 +425,8 @@ </classpath> <compilerarg line="${javac.args}"/> </javac> - <mkdir dir="dest/gridarta/test"/> - <javac srcdir="src/test" destdir="dest/gridarta/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> + <mkdir dir="${build.dir}/gridarta/test"/> + <javac srcdir="src/test" destdir="${build.dir}/gridarta/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> <path refid="path.class.gridarta.app"/> <path refid="path.class.model.test"/> @@ -434,14 +438,14 @@ </classpath> <compilerarg line="${javac.args}"/> </javac> - <copy todir="dest/gridarta/app"> + <copy todir="${build.dir}/gridarta/app"> <fileset dir="src/app" includes="**/*.properties,cfpython_menu.def"/> </copy> </target> <target name="compile-model" description="Compiles the model module." depends="compile-utils"> - <mkdir dir="dest/model/app"/> - <javac srcdir="model/src/app" destdir="dest/model/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> + <mkdir dir="${build.dir}/model/app"/> + <javac srcdir="model/src/app" destdir="${build.dir}/model/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> <path refid="path.class.utils.app"/> <path refid="path.lib.annotations"/> @@ -454,8 +458,8 @@ </classpath> <compilerarg line="${javac.args}"/> </javac> - <mkdir dir="dest/model/test"/> - <javac srcdir="model/src/test" destdir="dest/model/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> + <mkdir dir="${build.dir}/model/test"/> + <javac srcdir="model/src/test" destdir="${build.dir}/model/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> <path refid="path.class.model.app"/> <path refid="path.class.utils.test"/> @@ -466,14 +470,14 @@ </classpath> <compilerarg line="${javac.args}"/> </javac> - <copy todir="dest/model/app"> + <copy todir="${build.dir}/model/app"> <fileset dir="model/src/app" includes="**/*.properties"/> </copy> </target> <target name="compile-preferences" description="Compiles the preferences module."> - <mkdir dir="dest/preferences/app"/> - <javac srcdir="preferences/src/app" destdir="dest/preferences/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> + <mkdir dir="${build.dir}/preferences/app"/> + <javac srcdir="preferences/src/app" destdir="${build.dir}/preferences/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> <path refid="path.lib.annotations"/> <path refid="path.lib.japi-swing-action"/> @@ -481,21 +485,21 @@ </classpath> <compilerarg line="${javac.args}"/> </javac> - <mkdir dir="dest/preferences/test"/> - <javac srcdir="preferences/src/test" destdir="dest/preferences/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> + <mkdir dir="${build.dir}/preferences/test"/> + <javac srcdir="preferences/src/test" destdir="${build.dir}/preferences/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> <path refid="path.class.preferences.app"/> </classpath> <compilerarg line="${javac.args}"/> </javac> - <copy todir="dest/preferences/app"> + <copy todir="${build.dir}/preferences/app"> <fileset dir="preferences/src/app" includes="**/*.properties"/> </copy> </target> <target name="compile-textedit" description="Compiles the textedit module." depends="compile-utils"> - <mkdir dir="dest/textedit/app"/> - <javac srcdir="textedit/src/app" destdir="dest/textedit/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> + <mkdir dir="${build.dir}/textedit/app"/> + <javac srcdir="textedit/src/app" destdir="${build.dir}/textedit/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> <path refid="path.class.utils.app"/> <path refid="path.lib.annotations"/> @@ -504,22 +508,22 @@ </classpath> <compilerarg line="${javac.args}"/> </javac> - <mkdir dir="dest/textedit/test"/> - <javac srcdir="textedit/src/test" destdir="dest/textedit/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> + <mkdir dir="${build.dir}/textedit/test"/> + <javac srcdir="textedit/src/test" destdir="${build.dir}/textedit/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> <path refid="path.class.textedit.app"/> <path refid="path.class.utils.test"/> </classpath> <compilerarg line="${javac.args}"/> </javac> - <copy todir="dest/textedit/app"> + <copy todir="${build.dir}/textedit/app"> <fileset dir="textedit/src/app" includes="**/*.properties"/> </copy> </target> <target name="compile-utils" description="Compiles the utils module."> - <mkdir dir="dest/utils/app"/> - <javac srcdir="utils/src/app" destdir="dest/utils/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> + <mkdir dir="${build.dir}/utils/app"/> + <javac srcdir="utils/src/app" destdir="${build.dir}/utils/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> <path refid="path.lib.annotations"/> <path refid="path.lib.japi-swing-action"/> @@ -528,8 +532,8 @@ </classpath> <compilerarg line="${javac.args}"/> </javac> - <mkdir dir="dest/utils/test"/> - <javac srcdir="utils/src/test" destdir="dest/utils/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> + <mkdir dir="${build.dir}/utils/test"/> + <javac srcdir="utils/src/test" destdir="${build.dir}/utils/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> <path refid="path.class.utils.app"/> <path refid="path.lib.annotations"/> @@ -539,7 +543,7 @@ </classpath> <compilerarg line="${javac.args}"/> </javac> - <copy todir="dest/utils/app"> + <copy todir="${build.dir}/utils/app"> <fileset dir="utils/src/app" includes="**/*.properties"/> </copy> </target> @@ -552,13 +556,13 @@ </target> <target name="editorialDoc" description="Creates the editorial part of the project documentation." depends="java2html"> - <mkdir dir="dest/doc"/> - <megaxslt srcdir="src/doc" destdir="dest/doc" includes="**/*.xhtml" validatesource="true" validatedest="true" ending="xhtml" transformerFactoryImplementationClassName="net.sf.saxon.TransformerFactoryImpl"> + <mkdir dir="${build.dir}/doc"/> + <megaxslt srcdir="src/doc" destdir="${build.dir}/doc" includes="**/*.xhtml" validatesource="true" validatedest="true" ending="xhtml" transformerFactoryImplementationClassName="net.sf.saxon.TransformerFactoryImpl"> <xmlcatalog refid="commonDTDs"/> <transformation stylesheet="src/doc/transform.xslt"/> <transformation stylesheet="src/doc/cleanupXhtml11.xslt"/> </megaxslt> - <megaxslt srcdir="dest/doc" destdir="dest/doc" includes="**/*.xhtml" validatesource="true" validatedest="false" ending="html" converttocanonical="true" transformerFactoryImplementationClassName="net.sf.saxon.TransformerFactoryImpl"> + <megaxslt srcdir="${build.dir}/doc" destdir="${build.dir}/doc" includes="**/*.xhtml" validatesource="true" validatedest="false" ending="html" converttocanonical="true" transformerFactoryImplementationClassName="net.sf.saxon.TransformerFactoryImpl"> <xmlcatalog refid="commonDTDs"/> <transformation stylesheet="src/doc/xhtml2html.xslt"/> </megaxslt> @@ -567,7 +571,7 @@ <transformation stylesheet="src/doc/faq2txt.xslt"/> </megaxslt> <copy file="faq" tofile="FAQ"/> - <copy todir="dest/doc"> + <copy todir="${build.dir}/doc"> <fileset dir="src/doc"> <include name="**/.htaccess"/> <include name="**/*.html"/> @@ -584,10 +588,10 @@ </target> <target name="apiDoc" description="Creates public javadoc documentation."> - <mkdir dir="dest/doc/api/${project.version}"/> - <copy todir="dest/doc/api/${project.version}" file="src/doc/copyright.xhtml"/> - <copy todir="dest/doc/api/${project.version}" file="src/doc/dev/api/.htaccess"/> - <javadoc destdir="dest/doc/api/${project.version}" access="protected" author="yes" version="yes" locale="en_US" use="yes" splitindex="yes" windowtitle="Gridarta API documentation" doctitle="Gridarta<br />Yet another Java API<br />API Documentation" header="Gridarta ${project.version}<br />Yet another Java API<br />API Documentation" footer="Gridarta<br />Yet another Java API<br />API Documentation" bottom="<div style="text-align:center;">© 2005-2006 The Gridarta Developers. All rights reserved. See <a href="{@docRoot}/copyright.xhtml">copyright</a></div>" serialwarn="yes" charset="${build.source.encoding}" docencoding="${build.source.encoding}" source="${build.source.version}" encoding="${build.source.encoding}" linksource="yes" overview="src/app/overview.html" link="${user.javadoc.link}"> + <mkdir dir="${build.dir}/doc/api/${project.version}"/> + <copy todir="${build.dir}/doc/api/${project.version}" file="src/doc/copyright.xhtml"/> + <copy todir="${build.dir}/doc/api/${project.version}" file="src/doc/dev/api/.htaccess"/> + <javadoc destdir="${build.dir}/doc/api/${project.version}" access="protected" author="yes" version="yes" locale="en_US" use="yes" splitindex="yes" windowtitle="Gridarta API documentation" doctitle="Gridarta<br />Yet another Java API<br />API Documentation" header="Gridarta ${project.version}<br />Yet another Java API<br />API Documentation" footer="Gridarta<br />Yet another Java API<br />API Documentation" bottom="<div style="text-align:center;">© 2005-2006 The Gridarta Developers. All rights reserved. See <a href="{@docRoot}/copyright.xhtml">copyright</a></div>" serialwarn="yes" charset="${build.source.encoding}" docencoding="${build.source.encoding}" source="${build.source.version}" encoding="${build.source.encoding}" linksource="yes" overview="src/app/overview.html" link="${user.javadoc.link}"> <classpath> <fileset dir="atrinik/lib" includes="*.jar" excludes="*.jar-LICENSE"/> <fileset dir="daimonin/lib" includes="*.jar" excludes="*.jar-LICENSE"/> @@ -639,8 +643,8 @@ <target name="dist" description="Packs distribution archives." depends="distSrc,distLib,distDoc"/> <target name="distSrc" description="Packs source distribution archives."> - <mkdir dir="dist"/> - <property name="distSrc" value="dist/gridarta-${project.version}.src"/> + <mkdir dir="${dist.dir}"/> + <property name="distSrc" value="${dist.dir}/gridarta-${project.version}.src"/> <parallel> <tar tarfile="${distSrc}.tar"> <tarfileset dir="." prefix="gridarta-${project.version}"> @@ -669,10 +673,10 @@ </target> <target name="distLib" description="Packs library distribution archives."> <!--XXX:depends="compile"--> - <mkdir dir="dist"/> - <property name="distLib" value="dist/gridarta-${project.version}.lib"/> + <mkdir dir="${dist.dir}"/> + <property name="distLib" value="${dist.dir}/gridarta-${project.version}.lib"/> <jar destfile="${distLib}.jar"> - <zipfileset dir="dest/app"/> + <zipfileset dir="${build.dir}/app"/> <manifest> <attribute name="Implementation-Title" value="Gridarta"/> <attribute name="Implementation-Vendor" value="The Gridarta Developers"/> @@ -684,21 +688,21 @@ </target> <target name="distDoc" description="Packs documentation archives." depends="apiDoc"> - <mkdir dir="dist"/> - <property name="distDoc" value="dist/gridarta-${project.version}.doc"/> + <mkdir dir="${dist.dir}"/> + <property name="distDoc" value="${dist.dir}/gridarta-${project.version}.doc"/> <parallel> <tar tarfile="${distDoc}.tar"> - <tarfileset dir="dest/doc" prefix="gridarta-${project.version}"> + <tarfileset dir="${build.dir}/doc" prefix="gridarta-${project.version}"> <include name="api/${project.version}/**"/> </tarfileset> </tar> <zip destfile="${distDoc}.zip"> - <zipfileset dir="dest/doc" prefix="gridarta-${project.version}"> + <zipfileset dir="${build.dir}/doc" prefix="gridarta-${project.version}"> <include name="api/${project.version}/**"/> </zipfileset> </zip> <jar destfile="${distDoc}.jar"> - <zipfileset dir="dest/doc" prefix="gridarta-${project.version}"> + <zipfileset dir="${build.dir}/doc" prefix="gridarta-${project.version}"> <include name="api/${project.version}/**"/> </zipfileset> </jar> @@ -729,11 +733,11 @@ <commit file="src/doc/api/start.xhtml" message="Updating API link to include ${project.version}."/> </svn> <exec executable="rsync" failonerror="true"> - <arg line="-auzv -e ssh dest/doc/api/ ${user.rsync.username}@${user.rsync.host}:${user.rsync.dir}/htdocs/api/"/> + <arg line="-auzv -e ssh ${build.dir}/doc/api/ ${user.rsync.username}@${user.rsync.host}:${user.rsync.dir}/htdocs/api/"/> </exec> <sshexec host="${user.rsync.host}" username="${user.rsync.username}" keyfile="${user.ssh.keyfile}" command="rm ${user.rsync.dir}/htdocs/api/latest ; ln -s ${project.version} ${user.rsync.dir}/htdocs/api/latest"/> <ftp server="upload.sourceforge.net" userid="anonymous" password="${developer.email}" remotedir="incoming" action="put"> - <fileset dir="dist"/> + <fileset dir="${dist.dir}"/> </ftp> <antcall target="svnCreateBranch"/> <antcall target="svnCreateTag"/> @@ -742,7 +746,7 @@ <target name="uploadDoc" description="Uploads the latest editorial documentation." depends="editorialDoc"> <exec executable="rsync" failonerror="true"> - <arg line="-auzv-e ssh dest/doc/ ${user.rsync.username}@${user.rsync.host}:${user.rsync.dir}/htdocs/"/> + <arg line="-auzv-e ssh ${build.dir}/doc/ ${user.rsync.username}@${user.rsync.host}:${user.rsync.dir}/htdocs/"/> </exec> </target> @@ -786,9 +790,9 @@ <target name="checkstyle" description="Runs checkstyle to style-check the source code"> <taskdef resource="checkstyletask.properties" classpath="lib/checkstyle-all-5.0.jar"/> - <mkdir dir="dest/doc"/> + <mkdir dir="${build.dir}/doc"/> <checkstyle config="src/checkstyle.xml" failOnViolation="true"> - <formatter type="plain" tofile="dest/doc/checkstyle_report.txt"/> + <formatter type="plain" tofile="${build.dir}/doc/checkstyle_report.txt"/> <formatter type="plain"/> <fileset dir="src/app" includes="**/*.java"/> <fileset dir="src/test" includes="**/*.java"/> @@ -824,8 +828,8 @@ </target> <target name="javadoc" depends="init-properties" description="Creates the JavaDoc documentation for the complete editor source."> - <mkdir dir="dest/doc/dev/api"/> - <javadoc destdir="dest/doc/dev/api" locale="en_US" version="yes" author="yes" use="yes" splitindex="yes" windowtitle="Gridarta — API Documentation" doctitle="Gridarta ${build.number}<br />API Documentation" header="Gridarta ${build.number}<br />API Documentation" footer="Gridarta ${build.number}<br />API Documentation" serialwarn="no" charset="utf-8" docencoding="utf-8" source="${build.source.version}" encoding="${build.source.encoding}" linksource="yes" private="yes" overview="src/app/overview.html" link="${user.javadoc.link}"> + <mkdir dir="${build.dir}/doc/dev/api"/> + <javadoc destdir="${build.dir}/doc/dev/api" locale="en_US" version="yes" author="yes" use="yes" splitindex="yes" windowtitle="Gridarta — API Documentation" doctitle="Gridarta ${build.number}<br />API Documentation" header="Gridarta ${build.number}<br />API Documentation" footer="Gridarta ${build.number}<br />API Documentation" serialwarn="no" charset="utf-8" docencoding="utf-8" source="${build.source.version}" encoding="${build.source.encoding}" linksource="yes" private="yes" overview="src/app/overview.html" link="${user.javadoc.link}"> <classpath> <fileset dir="atrinik/lib" includes="*.jar" excludes="*.jar-LICENSE"/> <fileset dir="daimonin/lib" includes="*.jar" excludes="*.jar-LICENSE"/> @@ -890,16 +894,16 @@ <target name="test" description="Executes all tests." depends="test-junit,test-mapvalidator-crossfire,test-mapvalidator-daimonin"/> <target name="test-junit" description="Executes the junit tests." depends="test-atrinik,test-crossfire,test-daimonin,test-gridarta,test-model,test-preferences,test-textedit,test-utils"> - <junitreport todir="docs/test"> - <fileset dir="docs/test"> + <junitreport todir="${docs.dir}/test"> + <fileset dir="${docs.dir}/test"> <include name="TEST-*.xml"/> </fileset> - <report format="frames" todir="docs/test"/> + <report format="frames" todir="${docs.dir}/test"/> </junitreport> </target> <target name="test-atrinik" depends="compile-atrinik"> - <mkdir dir="docs/test"/> + <mkdir dir="${docs.dir}/test"/> <junit printsummary="no" haltonfailure="yes"> <classpath> <path refid="path.class.atrinik.test"/> @@ -912,8 +916,8 @@ </classpath> <formatter type="plain"/> <formatter type="xml"/> - <batchtest todir="docs/test"> - <fileset dir="dest/atrinik/test"> + <batchtest todir="${docs.dir}/test"> + <fileset dir="${build.dir}/atrinik/test"> <include name="**/*Test.class"/> <exclude name="**/*$*"/> <exclude name="**/Abstract*Test.class"/> @@ -923,7 +927,7 @@ </target> <target name="test-crossfire" depends="compile-crossfire"> - <mkdir dir="docs/test"/> + <mkdir dir="${docs.dir}/test"/> <junit printsummary="no" haltonfailure="yes"> <classpath> <path refid="path.class.crossfire.test"/> @@ -936,8 +940,8 @@ </classpath> <formatter type="plain"/> <formatter type="xml"/> - <batchtest todir="docs/test"> - <fileset dir="dest/crossfire/test"> + <batchtest todir="${docs.dir}/test"> + <fileset dir="${build.dir}/crossfire/test"> <include name="**/*Test.class"/> <exclude name="**/*$*"/> <exclude name="**/Abstract*Test.class"/> @@ -947,7 +951,7 @@ </target> <target name="test-daimonin" depends="compile-daimonin"> - <mkdir dir="docs/test"/> + <mkdir dir="${docs.dir}/test"/> <junit printsummary="no" haltonfailure="yes"> <classpath> <path refid="path.class.daimonin.test"/> @@ -960,8 +964,8 @@ </classpath> <formatter type="plain"/> <formatter type="xml"/> - <batchtest todir="docs/test"> - <fileset dir="dest/daimonin/test"> + <batchtest todir="${docs.dir}/test"> + <fileset dir="${build.dir}/daimonin/test"> <include name="**/*Test.class"/> <exclude name="**/*$*"/> <exclude name="**/Abstract*Test.class"/> @@ -971,7 +975,7 @@ </target> <target name="test-gridarta" depends="compile-gridarta"> - <mkdir dir="docs/test"/> + <mkdir dir="${docs.dir}/test"/> <junit printsummary="no" haltonfailure="yes"> <classpath> <path refid="path.class.gridarta.test"/> @@ -983,8 +987,8 @@ </classpath> <formatter type="plain"/> <formatter type="xml"/> - <batchtest todir="docs/test"> - <fileset dir="dest/gridarta/test"> + <batchtest todir="${docs.dir}/test"> + <fileset dir="${build.dir}/gridarta/test"> <include name="**/*Test.class"/> <exclude name="**/*$*"/> <exclude name="**/Abstract*Test.class"/> @@ -994,7 +998,7 @@ </target> <target name="test-model" depends="compile-model"> - <mkdir dir="docs/test"/> + <mkdir dir="${docs.dir}/test"/> <junit printsummary="no" haltonfailure="yes"> <classpath> <path refid="path.class.model.test"/> @@ -1007,8 +1011,8 @@ </classpath> <formatter type="plain"/> <formatter type="xml"/> - <batchtest todir="docs/test"> - <fileset dir="dest/model/test"> + <batchtest todir="${docs.dir}/test"> + <fileset dir="${build.dir}/model/test"> <include name="**/*Test.class"/> <exclude name="**/*$*"/> <exclude name="**/Abstract*Test.class"/> @@ -1018,15 +1022,15 @@ </target> <target name="test-preferences" depends="compile-preferences"> - <mkdir dir="docs/test"/> + <mkdir dir="${docs.dir}/test"/> <junit printsummary="no" haltonfailure="yes"> <classpath> <path refid="path.class.preferences.test"/> </classpath> <formatter type="plain"/> <formatter type="xml"/> - <batchtest todir="docs/test"> - <fileset dir="dest/preferences/test"> + <batchtest todir="${docs.dir}/test"> + <fileset dir="${build.dir}/preferences/test"> <include name="**/*Test.class"/> <exclude name="**/*$*"/> <exclude name="**/Abstract*Test.class"/> @@ -1036,15 +1040,15 @@ </target> <target name="test-textedit" depends="compile-textedit"> - <mkdir dir="docs/test"/> + <mkdir dir="${docs.dir}/test"/> <junit printsummary="no" haltonfailure="yes"> <classpath> <path refid="path.class.textedit.test"/> </classpath> <formatter type="plain"/> <formatter type="xml"/> - <batchtest todir="docs/test"> - <fileset dir="dest/textedit/test"> + <batchtest todir="${docs.dir}/test"> + <fileset dir="${build.dir}/textedit/test"> <include name="**/*Test.class"/> <exclude name="**/*$*"/> <exclude name="**/Abstract*Test.class"/> @@ -1054,7 +1058,7 @@ </target> <target name="test-utils" depends="compile-utils"> - <mkdir dir="docs/test"/> + <mkdir dir="${docs.dir}/test"/> <junit printsummary="no" haltonfailure="yes"> <classpath> <path refid="path.class.utils.test"/> @@ -1063,8 +1067,8 @@ </classpath> <formatter type="plain"/> <formatter type="xml"/> - <batchtest todir="docs/test"> - <fileset dir="dest/utils/test"> + <batchtest todir="${docs.dir}/test"> + <fileset dir="${build.dir}/utils/test"> <include name="**/*Test.class"/> <exclude name="**/*$*"/> <exclude name="**/Abstract*Test.class"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-11-10 18:09:00
|
Revision: 8781 http://gridarta.svn.sourceforge.net/gridarta/?rev=8781&view=rev Author: akirschbaum Date: 2010-11-10 18:08:54 +0000 (Wed, 10 Nov 2010) Log Message: ----------- Fix comment. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewsManager.java Modified: trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewsManager.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewsManager.java 2010-11-10 18:02:29 UTC (rev 8780) +++ trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewsManager.java 2010-11-10 18:08:54 UTC (rev 8781) @@ -316,7 +316,7 @@ * @param file the map file to load * @param viewPosition the view position to show initially; may be * <code>null</code> to show the top left corner - * @return the map view, or <code>null</code> if loading failed + * @return the map view * @throws IOException if an I/O error occurs */ @NotNull This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-11-10 18:02:35
|
Revision: 8780 http://gridarta.svn.sourceforge.net/gridarta/?rev=8780&view=rev Author: akirschbaum Date: 2010-11-10 18:02:29 +0000 (Wed, 10 Nov 2010) Log Message: ----------- Fix comment. Modified Paths: -------------- trunk/model/src/app/net/sf/gridarta/model/mapmanager/MapManager.java Modified: trunk/model/src/app/net/sf/gridarta/model/mapmanager/MapManager.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/mapmanager/MapManager.java 2010-11-10 10:14:12 UTC (rev 8779) +++ trunk/model/src/app/net/sf/gridarta/model/mapmanager/MapManager.java 2010-11-10 18:02:29 UTC (rev 8780) @@ -41,7 +41,7 @@ * @param file the map file to load * @param interactive if set, may ask to delete undefined archetypes; if * unset, keep undefined archetypes - * @return the map control, or <code>null</code> if loading failed + * @return the map control * @throws IOException if an I/O error occurs */ @NotNull This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-11-10 10:14:19
|
Revision: 8779 http://gridarta.svn.sourceforge.net/gridarta/?rev=8779&view=rev Author: akirschbaum Date: 2010-11-10 10:14:12 +0000 (Wed, 10 Nov 2010) Log Message: ----------- Add nullable annotations. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/utils/SwingUtils.java trunk/textedit/src/app/net/sf/gridarta/textedit/scripteditor/ScriptEditControl.java trunk/textedit/src/app/net/sf/gridarta/textedit/scripteditor/ScriptEditView.java Modified: trunk/src/app/net/sf/gridarta/gui/utils/SwingUtils.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/SwingUtils.java 2010-11-09 23:22:38 UTC (rev 8778) +++ trunk/src/app/net/sf/gridarta/gui/utils/SwingUtils.java 2010-11-10 10:14:12 UTC (rev 8779) @@ -54,6 +54,7 @@ * @param component the component this label is attached to * @return the label */ + @NotNull public static Component createLabel(@NotNull final String key, @Nullable final Component component) { final JComponent label = component == null ? ACTION_BUILDER.createLabel(key + ".text") : ACTION_BUILDER.createLabel(component, key + ".text"); label.setToolTipText(ActionBuilderUtils.getString(ACTION_BUILDER, key + ".shortdescription")); Modified: trunk/textedit/src/app/net/sf/gridarta/textedit/scripteditor/ScriptEditControl.java =================================================================== --- trunk/textedit/src/app/net/sf/gridarta/textedit/scripteditor/ScriptEditControl.java 2010-11-09 23:22:38 UTC (rev 8778) +++ trunk/textedit/src/app/net/sf/gridarta/textedit/scripteditor/ScriptEditControl.java 2010-11-10 10:14:12 UTC (rev 8779) @@ -53,24 +53,30 @@ /** * The Logger for printing log messages. */ + @NotNull private static final Category log = Logger.getLogger(ScriptEditControl.class); /** * Action Builder. */ + @NotNull private static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta"); // last active popup is stored here + @Nullable private static CFPythonPopup activePopup = null; + @NotNull private final ScriptEditView view; // view (window with text areas) + @NotNull private final List<String> tabs; // open tabs, contains absolute filenames (or "<>") in order left to right /** * JFileChooser for opening script files. */ + @NotNull private final JFileChooser openFileChooser; @NotNull @@ -97,7 +103,7 @@ * popup will be closed (if still open). * @param activePopup active popup to register */ - public static void registerActivePopup(final CFPythonPopup activePopup) { + public static void registerActivePopup(@NotNull final CFPythonPopup activePopup) { ScriptEditControl.activePopup = activePopup; } @@ -113,7 +119,7 @@ /** * Open a new empty script document. */ - public void openScriptFile(final String pathName) { + public void openScriptFile(@NotNull final String pathName) { final File file = new File(pathName); if (!file.exists() || !file.isFile()) { @@ -134,7 +140,8 @@ * be ignored if invalid * @return the file chooser */ - private JFileChooser createOpenFileChooser(final File defaultScriptDir) { + @NotNull + private JFileChooser createOpenFileChooser(@NotNull final File defaultScriptDir) { final JFileChooser fileChooser = new JFileChooser(); fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY); fileChooser.setMultiSelectionEnabled(false); @@ -298,7 +305,7 @@ * @return <code>true</code> if the file was saved, or <code>false</code> if * an error occurred */ - public boolean saveTextToFile(final File file, final String text) { + public boolean saveTextToFile(@NotNull final File file, @NotNull final String text) { try { final FileOutputStream fos = new FileOutputStream(file); try { @@ -333,7 +340,7 @@ */ @Nullable String getActiveFilePath() { - if (view == null || tabs == null || view.getSelectedIndex() < 0 || tabs.size() <= 0) { + if (view.getSelectedIndex() < 0 || tabs.size() <= 0) { return null; } Modified: trunk/textedit/src/app/net/sf/gridarta/textedit/scripteditor/ScriptEditView.java =================================================================== --- trunk/textedit/src/app/net/sf/gridarta/textedit/scripteditor/ScriptEditView.java 2010-11-09 23:22:38 UTC (rev 8778) +++ trunk/textedit/src/app/net/sf/gridarta/textedit/scripteditor/ScriptEditView.java 2010-11-10 10:14:12 UTC (rev 8779) @@ -61,11 +61,13 @@ /** * The Logger for printing log messages. */ + @NotNull private static final Category log = Logger.getLogger(ScriptEditView.class); /** * Action Builder. */ + @NotNull private static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta"); /** @@ -89,36 +91,44 @@ * The key used to store the editor window x-coordinate in preferences * file. */ + @NotNull private static final String WINDOW_X = "ScriptEditWindow.x"; /** * The key used to store the editor window y-coordinate in preferences * file. */ + @NotNull private static final String WINDOW_Y = "ScriptEditWindow.y"; /** * The key used to store the editor window width in preferences file. */ + @NotNull private static final String WINDOW_WIDTH = "ScriptEditWindow.width"; /** * The key used to store the editor window height in preferences file. */ + @NotNull private static final String WINDOW_HEIGHT = "ScriptEditWindow.height"; /** * The actions for the script editor. */ + @NotNull private final Actions actions; /** * The undo related actions for the script editor. */ + @NotNull private final ScriptEditUndoActions scriptEditUndoActions; + @NotNull private final JTabbedPane tabPane; // tab pane + @NotNull private final List<JEditTextArea> textAreas; // list of 'JEditTextArea' objects, same order as tabs /** @@ -127,7 +137,7 @@ * @param preferences the preferences to use * @param exiter the exiter instance */ - public ScriptEditView(final ScriptEditControl control, @NotNull final Frame owner, @NotNull final Preferences preferences, @NotNull final Exiter exiter) { + public ScriptEditView(@NotNull final ScriptEditControl control, @NotNull final Frame owner, @NotNull final Preferences preferences, @NotNull final Exiter exiter) { super(owner, "Script Pad"); this.preferences = preferences; setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); @@ -195,7 +205,7 @@ * @param title title of this script (filename) * @param file file where this script is stored, null if new script opened */ - public void addTab(final String title, @Nullable final File file) { + public void addTab(@NotNull final String title, @Nullable final File file) { final JEditTextArea ta = new JEditTextArea(textAreaDefaults); // open new TextArea //ta.setFont(new Font("Courier New", Font.PLAIN, 12)); final SyntaxDocument syntaxDocument = new SyntaxDocument(); @@ -320,7 +330,7 @@ * @param index index of the tab to change title * @param title new title string */ - public void setTitleAt(final int index, final String title) { + public void setTitleAt(final int index, @NotNull final String title) { tabPane.setTitleAt(index, title); } @@ -342,7 +352,7 @@ * @param message the message to be shown * @return true if the user agrees, false if user disagrees */ - public boolean askConfirm(final String title, final String message) { + public boolean askConfirm(@NotNull final String title, @NotNull final String message) { return JOptionPane.showConfirmDialog(this, message, title, JOptionPane.YES_NO_OPTION, JOptionPane.INFORMATION_MESSAGE) == JOptionPane.YES_OPTION; } @@ -353,11 +363,11 @@ * @param messageType type of message (see JOptionPane constants), defines * icon used */ - public void showMessage(final String title, final String message, final int messageType) { + public void showMessage(@NotNull final String title, @NotNull final String message, final int messageType) { JOptionPane.showMessageDialog(this, message, title, messageType); } - public void showMessage(final String title, final String message) { + public void showMessage(@NotNull final String title, @NotNull final String message) { JOptionPane.showMessageDialog(this, message, title, JOptionPane.INFORMATION_MESSAGE); } @@ -366,17 +376,18 @@ */ private class EditTabListener implements ChangeListener { + @NotNull private final ScriptEditView view; // view private int index; // index of selected tab - private EditTabListener(final ScriptEditView view) { + private EditTabListener(@NotNull final ScriptEditView view) { this.view = view; index = view.getSelectedIndex(); } @Override - public void stateChanged(final ChangeEvent e) { + public void stateChanged(@NotNull final ChangeEvent e) { if (index != view.getSelectedIndex()) { index = view.getSelectedIndex(); // active selected tab has changed This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-11-09 23:22:47
|
Revision: 8778 http://gridarta.svn.sourceforge.net/gridarta/?rev=8778&view=rev Author: akirschbaum Date: 2010-11-09 23:22:38 +0000 (Tue, 09 Nov 2010) Log Message: ----------- Move FindArchetypesDialog.addAction() to SwingUtils. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/findarchetypes/FindArchetypesDialog.java trunk/src/app/net/sf/gridarta/gui/utils/SwingUtils.java Modified: trunk/src/app/net/sf/gridarta/gui/findarchetypes/FindArchetypesDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/findarchetypes/FindArchetypesDialog.java 2010-11-09 22:57:00 UTC (rev 8777) +++ trunk/src/app/net/sf/gridarta/gui/findarchetypes/FindArchetypesDialog.java 2010-11-09 23:22:38 UTC (rev 8778) @@ -26,7 +26,6 @@ import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; -import javax.swing.Action; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JOptionPane; @@ -35,7 +34,6 @@ import javax.swing.JTable; import javax.swing.JTextField; import javax.swing.JViewport; -import javax.swing.KeyStroke; import javax.swing.ListSelectionModel; import javax.swing.ScrollPaneConstants; import javax.swing.WindowConstants; @@ -46,6 +44,7 @@ import javax.swing.text.JTextComponent; import net.sf.gridarta.gui.archetypechooser.ArchetypeChooserControl; import net.sf.gridarta.gui.objectchooser.ObjectChooser; +import net.sf.gridarta.gui.utils.SwingUtils; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.archetypetype.ArchetypeTypeSet; import net.sf.gridarta.model.gameobject.GameObject; @@ -139,8 +138,8 @@ final JPanel panel = new JPanel(new GridBagLayout()); nameField = new JTextField(); - addAction(nameField, ACTION_BUILDER.createAction(false, "findArchetypesScrollUp", this)); - addAction(nameField, ACTION_BUILDER.createAction(false, "findArchetypesScrollDown", this)); + SwingUtils.addAction(nameField, ACTION_BUILDER.createAction(false, "findArchetypesScrollUp", this)); + SwingUtils.addAction(nameField, ACTION_BUILDER.createAction(false, "findArchetypesScrollDown", this)); final DocumentListener documentListener = new DocumentListener() { @@ -341,20 +340,6 @@ } /** - * Add an accelerator key for a text component. The accelerator key is - * extracted from the action to be added. If the action has no attached - * accelerator key, nothing is added. - * @param textComponent The text component to add to. - * @param action The action to add. - */ - private static void addAction(@NotNull final JTextComponent textComponent, @NotNull final Action action) { - final KeyStroke keyStroke = (KeyStroke) action.getValue(Action.ACCELERATOR_KEY); - if (keyStroke != null) { - textComponent.getKeymap().addActionForKeyStroke(keyStroke, action); - } - } - - /** * Action method to scroll up one line in the result table. */ @ActionMethod Modified: trunk/src/app/net/sf/gridarta/gui/utils/SwingUtils.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/SwingUtils.java 2010-11-09 22:57:00 UTC (rev 8777) +++ trunk/src/app/net/sf/gridarta/gui/utils/SwingUtils.java 2010-11-09 23:22:38 UTC (rev 8778) @@ -20,7 +20,10 @@ package net.sf.gridarta.gui.utils; import java.awt.Component; +import javax.swing.Action; import javax.swing.JComponent; +import javax.swing.KeyStroke; +import javax.swing.text.JTextComponent; import net.sf.gridarta.utils.ActionBuilderUtils; import net.sf.japi.swing.action.ActionBuilder; import net.sf.japi.swing.action.ActionBuilderFactory; @@ -57,4 +60,18 @@ return label; } + /** + * Adds an accelerator key for a text component. The accelerator key is + * extracted from the action to be added. If the action has no attached + * accelerator key, nothing is added. + * @param textComponent The text component to add to. + * @param action The action to add. + */ + public static void addAction(@NotNull final JTextComponent textComponent, @NotNull final Action action) { + final KeyStroke keyStroke = (KeyStroke) action.getValue(Action.ACCELERATOR_KEY); + if (keyStroke != null) { + textComponent.getKeymap().addActionForKeyStroke(keyStroke, action); + } + } + } // class SwingUtils This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-11-09 22:57:06
|
Revision: 8777 http://gridarta.svn.sourceforge.net/gridarta/?rev=8777&view=rev Author: akirschbaum Date: 2010-11-09 22:57:00 +0000 (Tue, 09 Nov 2010) Log Message: ----------- Add GlobalSettingsListener.mapsDirectoryChanged(). Modified Paths: -------------- trunk/model/src/app/net/sf/gridarta/model/settings/AbstractGlobalSettings.java trunk/model/src/app/net/sf/gridarta/model/settings/DefaultGlobalSettings.java trunk/model/src/app/net/sf/gridarta/model/settings/GlobalSettingsListener.java trunk/src/app/net/sf/gridarta/gui/misc/MainToolbar.java Modified: trunk/model/src/app/net/sf/gridarta/model/settings/AbstractGlobalSettings.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/settings/AbstractGlobalSettings.java 2010-11-09 18:43:21 UTC (rev 8776) +++ trunk/model/src/app/net/sf/gridarta/model/settings/AbstractGlobalSettings.java 2010-11-09 22:57:00 UTC (rev 8777) @@ -19,6 +19,7 @@ package net.sf.gridarta.model.settings; +import java.io.File; import net.sf.gridarta.utils.EventListenerList2; import org.jetbrains.annotations.NotNull; @@ -60,4 +61,14 @@ } } + /** + * Notifies all listeners about a changed maps directory. + */ + protected void fireMapsDirectoryChanged() { + final File mapsDirectory = getMapsDirectory(); + for (final GlobalSettingsListener listener : listenerList.getListeners()) { + listener.mapsDirectoryChanged(mapsDirectory); + } + } + } // class AbstractGlobalSettings Modified: trunk/model/src/app/net/sf/gridarta/model/settings/DefaultGlobalSettings.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/settings/DefaultGlobalSettings.java 2010-11-09 18:43:21 UTC (rev 8776) +++ trunk/model/src/app/net/sf/gridarta/model/settings/DefaultGlobalSettings.java 2010-11-09 22:57:00 UTC (rev 8777) @@ -213,7 +213,7 @@ } else if (evt.getKey().equals(ARCH_DIRECTORY_KEY)) { archDirectory = new File(preferences.get(ARCH_DIRECTORY_KEY, archDirectoryDefault)); } else if (evt.getKey().equals(MAP_DIRECTORY_KEY)) { - mapsDirectory = new File(preferences.get(MAP_DIRECTORY_KEY, mapsDirectoryDefault)); + setMapsDirectoryInt(new File(preferences.get(MAP_DIRECTORY_KEY, mapsDirectoryDefault)), false); } else if (evt.getKey().equals(MEDIA_DIRECTORY_KEY)) { mediaDirectory = new File(preferences.get(MEDIA_DIRECTORY_KEY, mediaDirectoryDefault)); } else if (evt.getKey().equals(IMAGE_SET_KEY)) { @@ -295,12 +295,24 @@ */ @Override public void setMapsDirectory(@NotNull final File mapsDirectory) { + setMapsDirectoryInt(mapsDirectory, true); + } + + /** + * Sets the {@link #mapsDirectory}. + * @param mapsDirectory the new maps directory + * @param updatePreferences whether the preferences should be updated + */ + private void setMapsDirectoryInt(@NotNull final File mapsDirectory, final boolean updatePreferences) { if (this.mapsDirectory.equals(mapsDirectory)) { return; } this.mapsDirectory = mapsDirectory; - preferences.put(MAP_DIRECTORY_KEY, mapsDirectory.toString()); + if (updatePreferences) { + preferences.put(MAP_DIRECTORY_KEY, mapsDirectory.toString()); + } + fireMapsDirectoryChanged(); } /** Modified: trunk/model/src/app/net/sf/gridarta/model/settings/GlobalSettingsListener.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/settings/GlobalSettingsListener.java 2010-11-09 18:43:21 UTC (rev 8776) +++ trunk/model/src/app/net/sf/gridarta/model/settings/GlobalSettingsListener.java 2010-11-09 22:57:00 UTC (rev 8777) @@ -19,7 +19,9 @@ package net.sf.gridarta.model.settings; +import java.io.File; import java.util.EventListener; +import org.jetbrains.annotations.NotNull; /** * Interface for listeners interested in {@link GlobalSettings} events. @@ -33,4 +35,10 @@ */ void showMainToolbarChanged(boolean visible); + /** + * Called whenever the maps directory has changed. + * @param mapsDirectory the maps directory + */ + void mapsDirectoryChanged(@NotNull File mapsDirectory); + } // interface GlobalSettingsListener Modified: trunk/src/app/net/sf/gridarta/gui/misc/MainToolbar.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/misc/MainToolbar.java 2010-11-09 18:43:21 UTC (rev 8776) +++ trunk/src/app/net/sf/gridarta/gui/misc/MainToolbar.java 2010-11-09 22:57:00 UTC (rev 8777) @@ -20,6 +20,7 @@ package net.sf.gridarta.gui.misc; import java.awt.Component; +import java.io.File; import net.sf.gridarta.model.settings.GlobalSettings; import net.sf.gridarta.model.settings.GlobalSettingsListener; import net.sf.japi.swing.action.ActionBuilder; @@ -53,6 +54,11 @@ toolbar.setVisible(visible); } + @Override + public void mapsDirectoryChanged(@NotNull final File mapsDirectory) { + // ignore + } + }; /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-11-09 18:43:29
|
Revision: 8776 http://gridarta.svn.sourceforge.net/gridarta/?rev=8776&view=rev Author: akirschbaum Date: 2010-11-09 18:43:21 +0000 (Tue, 09 Nov 2010) Log Message: ----------- Move non-GUI code into model module. Modified Paths: -------------- trunk/src/test/net/sf/gridarta/actions/UndoActionsTest.java trunk/src/test/net/sf/gridarta/exitconnector/ExitConnectorActionsTest.java trunk/src/test/net/sf/gridarta/gui/copybuffer/CopyBufferTest.java trunk/src/test/net/sf/gridarta/gui/mapmenu/MapMenuManagerTest.java trunk/src/test/net/sf/gridarta/gui/selectedsquare/SelectedSquareActionsTest.java Added Paths: ----------- trunk/model/src/test/net/sf/gridarta/model/io/TestCacheFiles.java trunk/model/src/test/net/sf/gridarta/model/mapcontrol/TestMapControlCreator.java trunk/model/src/test/net/sf/gridarta/model/mapmanager/ trunk/model/src/test/net/sf/gridarta/model/mapmanager/DefaultMapManagerTest.java trunk/model/src/test/net/sf/gridarta/model/mapmanager/TestFileControl.java trunk/src/test/net/sf/gridarta/gui/map/test/TestMapControlCreatorUtils.java Removed Paths: ------------- trunk/src/app/net/sf/gridarta/model/ trunk/src/test/net/sf/gridarta/gui/map/test/TestMapControlCreator.java trunk/src/test/net/sf/gridarta/model/gameobject/ trunk/src/test/net/sf/gridarta/model/io/ trunk/src/test/net/sf/gridarta/model/mapmanager/ Copied: trunk/model/src/test/net/sf/gridarta/model/io/TestCacheFiles.java (from rev 8775, trunk/src/test/net/sf/gridarta/model/io/TestCacheFiles.java) =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/io/TestCacheFiles.java (rev 0) +++ trunk/model/src/test/net/sf/gridarta/model/io/TestCacheFiles.java 2010-11-09 18:43:21 UTC (rev 8776) @@ -0,0 +1,41 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * 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 2 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.model.io; + +import java.io.File; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * A {@link CacheFiles} implementation for regression test. + * @author Andreas Kirschbaum + */ +public class TestCacheFiles implements CacheFiles { + + /** + * {@inheritDoc} + */ + @NotNull + @Override + public File getCacheFile(@NotNull final File file, @Nullable final String prefix) { + return file; + } + +} // class TestCacheFiles Property changes on: trunk/model/src/test/net/sf/gridarta/model/io/TestCacheFiles.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/model/src/test/net/sf/gridarta/model/mapcontrol/TestMapControlCreator.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/mapcontrol/TestMapControlCreator.java (rev 0) +++ trunk/model/src/test/net/sf/gridarta/model/mapcontrol/TestMapControlCreator.java 2010-11-09 18:43:21 UTC (rev 8776) @@ -0,0 +1,294 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * 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 2 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.model.mapcontrol; + +import java.io.File; +import net.sf.gridarta.model.archetype.ArchetypeSet; +import net.sf.gridarta.model.archetype.DuplicateArchetypeException; +import net.sf.gridarta.model.archetype.TestArchetype; +import net.sf.gridarta.model.archetypechooser.ArchetypeChooserModel; +import net.sf.gridarta.model.autojoin.AutojoinListsHelper; +import net.sf.gridarta.model.exitconnector.ExitMatcher; +import net.sf.gridarta.model.gameobject.TestGameObject; +import net.sf.gridarta.model.io.DefaultMapWriter; +import net.sf.gridarta.model.io.GameObjectParser; +import net.sf.gridarta.model.io.MapArchObjectParserFactory; +import net.sf.gridarta.model.io.MapReaderFactory; +import net.sf.gridarta.model.io.MapWriter; +import net.sf.gridarta.model.io.PathManager; +import net.sf.gridarta.model.io.TestMapArchObjectParserFactory; +import net.sf.gridarta.model.io.TestMapReaderFactory; +import net.sf.gridarta.model.maparchobject.MapArchObjectFactory; +import net.sf.gridarta.model.maparchobject.TestMapArchObject; +import net.sf.gridarta.model.maparchobject.TestMapArchObjectFactory; +import net.sf.gridarta.model.mapmanager.AbstractMapManager; +import net.sf.gridarta.model.mapmanager.DefaultMapManager; +import net.sf.gridarta.model.mapmanager.FileControl; +import net.sf.gridarta.model.mapmanager.MapManager; +import net.sf.gridarta.model.mapmanager.TestFileControl; +import net.sf.gridarta.model.mapmodel.InsertionModeSet; +import net.sf.gridarta.model.mapmodel.MapModelFactory; +import net.sf.gridarta.model.mapmodel.TestMapModelCreator; +import net.sf.gridarta.model.mapmodel.TestMapModelHelper; +import net.sf.gridarta.model.match.GameObjectMatcher; +import net.sf.gridarta.model.match.TypeNrsGameObjectMatcher; +import net.sf.gridarta.model.settings.GlobalSettings; +import net.sf.gridarta.model.settings.TestGlobalSettings; +import net.sf.gridarta.utils.Size2D; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * Helper class for creating {@link MapControl} instances for regression tests. + * @author Andreas Kirschbaum + */ +public class TestMapControlCreator { + + /** + * The {@link MapManager} instance. + */ + @NotNull + private final MapManager<TestGameObject, TestMapArchObject, TestArchetype> mapManager; + + /** + * The pickmap {@link MapManager} instance. + */ + @NotNull + private final MapManager<TestGameObject, TestMapArchObject, TestArchetype> pickmapManager; + + /** + * The {@link PathManager} instance. + */ + @NotNull + private final PathManager pathManager; + + /** + * The {@link ExitMatcher} instance. + */ + @NotNull + private final ExitMatcher<TestGameObject, TestMapArchObject, TestArchetype> exitMatcher; + + /** + * The {@link MapReaderFactory} instance. + */ + @NotNull + private final MapReaderFactory<TestGameObject, TestMapArchObject> mapReaderFactory; + + /** + * The {@link GlobalSettings} instance. + */ + @NotNull + private final GlobalSettings globalSettings; + + /** + * The {@link MapArchObjectFactory} instance. + */ + @NotNull + private final MapArchObjectFactory<TestMapArchObject> mapArchObjectFactory = new TestMapArchObjectFactory(); + + /** + * The {@link FileControl} instance. + */ + @NotNull + private final FileControl<TestGameObject, TestMapArchObject, TestArchetype> fileControl = new TestFileControl(); + + /** + * The {@link MapModelFactory} instance. + */ + @NotNull + private final MapModelFactory<TestGameObject, TestMapArchObject, TestArchetype> mapModelFactory; + + /** + * The {@link MapControlFactory} instance. + */ + @NotNull + private final MapControlFactory<TestGameObject, TestMapArchObject, TestArchetype> mapControlFactory; + + /** + * The {@link TestMapModelCreator} instance. + */ + @NotNull + private final TestMapModelCreator mapModelCreator = new TestMapModelCreator(false); + + /** + * Creates a new instance. + */ + public TestMapControlCreator() { + final GameObjectMatcher exitGameObjectMatcher = new TypeNrsGameObjectMatcher(TestMapModelHelper.EXIT_TYPE); + exitMatcher = new ExitMatcher<TestGameObject, TestMapArchObject, TestArchetype>(exitGameObjectMatcher); + final MapArchObjectParserFactory<TestMapArchObject> mapArchObjectParserFactory = new TestMapArchObjectParserFactory(); + final GameObjectParser<TestGameObject, TestMapArchObject, TestArchetype> gameObjectParser = mapModelCreator.newGameObjectParser(); + mapReaderFactory = new TestMapReaderFactory(mapArchObjectParserFactory, mapArchObjectFactory, gameObjectParser, mapModelCreator.getMapViewSettings()); + globalSettings = new TestGlobalSettings(); + final MapWriter<TestGameObject, TestMapArchObject, TestArchetype> mapWriter = new DefaultMapWriter<TestGameObject, TestMapArchObject, TestArchetype>(mapArchObjectParserFactory, gameObjectParser); + final ArchetypeChooserModel<TestGameObject, TestMapArchObject, TestArchetype> archetypeChooserModel = new ArchetypeChooserModel<TestGameObject, TestMapArchObject, TestArchetype>(); + pathManager = new PathManager(globalSettings); + mapModelFactory = new MapModelFactory<TestGameObject, TestMapArchObject, TestArchetype>(archetypeChooserModel, mapModelCreator.getAutojoinLists(), mapModelCreator.getMapViewSettings(), mapModelCreator.getGameObjectFactory(), mapModelCreator.getGameObjectMatchers(), mapModelCreator.getTopmostInsertionMode()); + mapControlFactory = new TestMapControlFactory(mapWriter, globalSettings, mapModelFactory); + final AbstractMapManager<TestGameObject, TestMapArchObject, TestArchetype> tmpMapManager = new DefaultMapManager<TestGameObject, TestMapArchObject, TestArchetype>(mapReaderFactory, mapControlFactory, globalSettings, mapModelCreator.getFaceObjectProviders()); + tmpMapManager.setFileControl(fileControl); + mapManager = tmpMapManager; + final AbstractMapManager<TestGameObject, TestMapArchObject, TestArchetype> tmpPickmapManager = new DefaultMapManager<TestGameObject, TestMapArchObject, TestArchetype>(mapReaderFactory, mapControlFactory, globalSettings, mapModelCreator.getFaceObjectProviders()); + tmpPickmapManager.setFileControl(fileControl); + pickmapManager = tmpPickmapManager; + } + + /** + * Creates a new {@link TestMapModelHelper} instance. + * @return the new instance + * @throws DuplicateArchetypeException if an internal error occurs + */ + public TestMapModelHelper newMapModelCreator() throws DuplicateArchetypeException { + return mapModelCreator.newTestMapModelHelper(); + } + + /** + * Creates a new map control. + * @param mapFile the map file + * @param mapName the map name + * @param mapSize the map size + * @return the map control + */ + public MapControl<TestGameObject, TestMapArchObject, TestArchetype> newMapControl(@Nullable final File mapFile, @NotNull final String mapName, @NotNull final Size2D mapSize) { + final TestMapArchObject mapArchObject = mapArchObjectFactory.newMapArchObject(false); + mapArchObject.setMapSize(mapSize); + mapArchObject.setMapName(mapName); + final MapControl<TestGameObject, TestMapArchObject, TestArchetype> mapControl = mapManager.newMap(null, mapArchObject, mapFile, true); + return mapControl; + } + + /** + * Returns the {@link PathManager}. + * @return the path manager + */ + @NotNull + public PathManager getPathManager() { + return pathManager; + } + + /** + * Returns the {@link GlobalSettings}. + * @return the global settings + */ + @NotNull + public GlobalSettings getGlobalSettings() { + return globalSettings; + } + + /** + * Returns the {@link ExitMatcher}. + * @return the exit matcher + */ + @NotNull + public ExitMatcher<TestGameObject, TestMapArchObject, TestArchetype> getExitMatcher() { + return exitMatcher; + } + + /** + * Returns the {@link ArchetypeSet}. + * @return the archetype set + */ + @NotNull + public ArchetypeSet<TestGameObject, TestMapArchObject, TestArchetype> getArchetypeSet() { + return mapModelCreator.getArchetypeSet(); + } + + /** + * Returns the {@link MapManager}. + * @return the map manager + */ + @NotNull + public MapManager<TestGameObject, TestMapArchObject, TestArchetype> getMapManager() { + return mapManager; + } + + /** + * Returns the {@link InsertionModeSet}. + * @return the insertion mode set + */ + @NotNull + public InsertionModeSet<TestGameObject, TestMapArchObject, TestArchetype> getInsertionModeSet() { + return mapModelCreator.getInsertionModeSet(); + } + + /** + * Returns the {@link FileControl} instance. + * @return the file control instance + */ + @NotNull + public FileControl<TestGameObject, TestMapArchObject, TestArchetype> getFileControl() { + return fileControl; + } + + /** + * Returns a new {@link AutojoinListsHelper} instance. + * @return the autojoin lists helper instance + */ + @NotNull + public AutojoinListsHelper newAutojoinListsHelper() { + return new AutojoinListsHelper(mapModelCreator); + } + + /** + * Returns the {@link TestMapModelCreator} instance. + * @return the test map model creator instance + */ + @NotNull + public TestMapModelCreator getMapModelCreator() { + return mapModelCreator; + } + + /** + * Returns a new {@link MapManager} instance. + * @return the map manager instance + */ + @NotNull + public MapManager<TestGameObject, TestMapArchObject, TestArchetype> newMapManager() { + return new DefaultMapManager<TestGameObject, TestMapArchObject, TestArchetype>(mapReaderFactory, mapControlFactory, globalSettings, mapModelCreator.getFaceObjectProviders()); + } + + /** + * Returns the {@link MapArchObjectFactory} instance. + * @return the test map arch object factory instance + */ + @NotNull + public MapArchObjectFactory<TestMapArchObject> getMapArchObjectFactory() { + return mapArchObjectFactory; + } + + /** + * Returns the {@link MapModelFactory} instance. + * @return the test map model factory instance + */ + @NotNull + public MapModelFactory<TestGameObject, TestMapArchObject, TestArchetype> getMapModelFactory() { + return mapModelFactory; + } + + /** + * Returns the {@link MapManager pickmap manager} instance. + * @return the test pickmap manager instance + */ + @NotNull + public MapManager<TestGameObject, TestMapArchObject, TestArchetype> getPickmapManager() { + return pickmapManager; + } + +} // class TestMapControlCreator Property changes on: trunk/model/src/test/net/sf/gridarta/model/mapcontrol/TestMapControlCreator.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Copied: trunk/model/src/test/net/sf/gridarta/model/mapmanager/DefaultMapManagerTest.java (from rev 8775, trunk/src/test/net/sf/gridarta/model/mapmanager/DefaultMapManagerTest.java) =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/mapmanager/DefaultMapManagerTest.java (rev 0) +++ trunk/model/src/test/net/sf/gridarta/model/mapmanager/DefaultMapManagerTest.java 2010-11-09 18:43:21 UTC (rev 8776) @@ -0,0 +1,97 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * 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 2 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.model.mapmanager; + +import java.awt.Point; +import java.io.File; +import java.io.IOException; +import net.sf.gridarta.model.archetype.DuplicateArchetypeException; +import net.sf.gridarta.model.archetype.TestArchetype; +import net.sf.gridarta.model.gameobject.TestGameObject; +import net.sf.gridarta.model.maparchobject.TestMapArchObject; +import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.model.mapcontrol.TestMapControlCreator; +import net.sf.gridarta.model.mapmodel.CannotInsertGameObjectException; +import net.sf.gridarta.model.mapmodel.MapModel; +import net.sf.gridarta.model.mapmodel.TestMapModelHelper; +import net.sf.gridarta.utils.Size2D; +import org.junit.Test; + +/** + * Regression tests for {@link DefaultMapManager}. + * @author Andreas Kirschbaum + */ +public class DefaultMapManagerTest { + + /** + * A map that has been resized must still be revertable. + * @throws CannotInsertGameObjectException if the test fails + * @throws DuplicateArchetypeException if the test fails + * @throws IOException if an I/O error occurs + */ + @Test + public void testRevertResizedMap() throws CannotInsertGameObjectException, DuplicateArchetypeException, IOException { + final File file = File.createTempFile("gridarta", null); + try { + final TestMapControlCreator testMapControlCreator = new TestMapControlCreator(); + final TestMapModelHelper mapModelHelper = testMapControlCreator.newMapModelCreator(); + final Size2D originalSize = new Size2D(2, 1); + final Size2D newSize = new Size2D(1, 2); + final MapControl<TestGameObject, TestMapArchObject, TestArchetype> mapControl = testMapControlCreator.newMapControl(file, "test", originalSize); + final MapModel<TestGameObject, TestMapArchObject, TestArchetype> mapModel = mapControl.getMapModel(); + final MapManager<TestGameObject, TestMapArchObject, TestArchetype> mapManager = testMapControlCreator.getMapManager(); + + mapModel.beginTransaction("test"); + try { + mapModelHelper.insertFloor(mapModel, new Point(1, 0)); + } finally { + mapModel.endTransaction(); + } + mapControl.save(); + TestMapModelHelper.checkMapContents(mapModel, "|floor"); + + mapModel.beginTransaction("test"); + try { + mapModel.getMapArchObject().setMapSize(newSize); + } finally { + mapModel.endTransaction(); + } + mapModel.beginTransaction("test"); + try { + mapModelHelper.insertFloor(mapModel, new Point(0, 1)); + } finally { + mapModel.endTransaction(); + } + TestMapModelHelper.checkMapContents(mapModel, "", "floor"); + + mapModel.beginTransaction("test"); + try { + mapManager.revert(mapControl); + } finally { + mapModel.endTransaction(); + } + TestMapModelHelper.checkMapContents(mapModel, "|floor"); + } finally { + //noinspection ResultOfMethodCallIgnored + file.delete(); + } + } + +} // class DefaultMapManagerTest Property changes on: trunk/model/src/test/net/sf/gridarta/model/mapmanager/DefaultMapManagerTest.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Copied: trunk/model/src/test/net/sf/gridarta/model/mapmanager/TestFileControl.java (from rev 8775, trunk/src/test/net/sf/gridarta/model/mapmanager/TestFileControl.java) =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/mapmanager/TestFileControl.java (rev 0) +++ trunk/model/src/test/net/sf/gridarta/model/mapmanager/TestFileControl.java 2010-11-09 18:43:21 UTC (rev 8776) @@ -0,0 +1,150 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * 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 2 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.model.mapmanager; + +import java.io.File; +import net.sf.gridarta.model.archetype.TestArchetype; +import net.sf.gridarta.model.gameobject.TestGameObject; +import net.sf.gridarta.model.maparchobject.TestMapArchObject; +import net.sf.gridarta.model.mapcontrol.MapControl; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * A {@link FileControl} implementation for testing purposes. + * @author Andreas Kirschbaum + */ +public class TestFileControl implements FileControl<TestGameObject, TestMapArchObject, TestArchetype> { + + /** + * Collects the performed actions. + */ + @NotNull + private final StringBuilder sb = new StringBuilder(); + + /** + * {@inheritDoc} + */ + @Override + public void editScript() { + throw new AssertionError(); + } + + /** + * {@inheritDoc} + */ + @Override + public void openFile() { + throw new AssertionError(); + } + + /** + * {@inheritDoc} + */ + @Override + public boolean save(@NotNull final MapControl<TestGameObject, TestMapArchObject, TestArchetype> mapControl) { + throw new AssertionError(); + } + + /** + * {@inheritDoc} + */ + @Override + public void saveAllMaps() { + throw new AssertionError(); + } + + /** + * {@inheritDoc} + */ + @Override + public boolean closeAllMaps() { + throw new AssertionError(); + } + + /** + * {@inheritDoc} + */ + @Override + public boolean saveAs(@NotNull final MapControl<TestGameObject, TestMapArchObject, TestArchetype> mapControl) { + throw new AssertionError(); + } + + /** + * {@inheritDoc} + */ + @Override + public boolean confirmSaveChanges(@NotNull final MapControl<TestGameObject, TestMapArchObject, TestArchetype> mapControl) { + throw new AssertionError(); + } + + /** + * {@inheritDoc} + */ + @Override + public void reportSaveError(@NotNull final MapControl<TestGameObject, TestMapArchObject, TestArchetype> mapControl, @NotNull final String message) { + throw new AssertionError(); + } + + /** + * {@inheritDoc} + */ + @Override + public void reportSaveError(@NotNull final File mapFile, @NotNull final String message) { + sb.append("reportSaveError: "); + sb.append(mapFile); + sb.append(" "); + sb.append(message); + sb.append("\n"); + } + + /** + * {@inheritDoc} + */ + @Override + public void reportLoadError(@Nullable final File file, @NotNull final String message) { + throw new AssertionError(); + } + + /** + * {@inheritDoc} + */ + @Override + public void reportOutOfMapBoundsDeleted(@NotNull final File file, final int outOfMapBoundsDeleted, @NotNull final StringBuilder outOfMapBoundsObjects) { + throw new AssertionError(); + } + + /** + * {@inheritDoc} + */ + @Override + public void reportOutOfMemory(@NotNull final File file) { + throw new AssertionError(); + } + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return sb.toString(); + } + +} // class TestFileControl Property changes on: trunk/model/src/test/net/sf/gridarta/model/mapmanager/TestFileControl.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Modified: trunk/src/test/net/sf/gridarta/actions/UndoActionsTest.java =================================================================== --- trunk/src/test/net/sf/gridarta/actions/UndoActionsTest.java 2010-11-08 21:53:04 UTC (rev 8775) +++ trunk/src/test/net/sf/gridarta/actions/UndoActionsTest.java 2010-11-09 18:43:21 UTC (rev 8776) @@ -20,7 +20,6 @@ package net.sf.gridarta.actions; import java.awt.Point; -import net.sf.gridarta.gui.map.test.TestMapControlCreator; import net.sf.gridarta.gui.undo.UndoControl; import net.sf.gridarta.model.archetype.DuplicateArchetypeException; import net.sf.gridarta.model.archetype.TestArchetype; @@ -30,6 +29,7 @@ import net.sf.gridarta.model.gameobject.TestGameObject; import net.sf.gridarta.model.maparchobject.TestMapArchObject; import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.model.mapcontrol.TestMapControlCreator; import net.sf.gridarta.model.mapmanager.MapManager; import net.sf.gridarta.model.mapmodel.CannotInsertGameObjectException; import net.sf.gridarta.model.mapmodel.MapModel; Modified: trunk/src/test/net/sf/gridarta/exitconnector/ExitConnectorActionsTest.java =================================================================== --- trunk/src/test/net/sf/gridarta/exitconnector/ExitConnectorActionsTest.java 2010-11-08 21:53:04 UTC (rev 8775) +++ trunk/src/test/net/sf/gridarta/exitconnector/ExitConnectorActionsTest.java 2010-11-09 18:43:21 UTC (rev 8776) @@ -21,7 +21,6 @@ import java.awt.Point; import java.io.File; -import net.sf.gridarta.gui.map.test.TestMapControlCreator; import net.sf.gridarta.model.archetype.DuplicateArchetypeException; import net.sf.gridarta.model.archetype.TestArchetype; import net.sf.gridarta.model.baseobject.BaseObject; @@ -31,6 +30,7 @@ import net.sf.gridarta.model.gameobject.TestGameObject; import net.sf.gridarta.model.maparchobject.TestMapArchObject; import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.model.mapcontrol.TestMapControlCreator; import net.sf.gridarta.model.mapmanager.TestFileControl; import net.sf.gridarta.model.mapmodel.CannotInsertGameObjectException; import net.sf.gridarta.model.mapmodel.MapModel; Modified: trunk/src/test/net/sf/gridarta/gui/copybuffer/CopyBufferTest.java =================================================================== --- trunk/src/test/net/sf/gridarta/gui/copybuffer/CopyBufferTest.java 2010-11-08 21:53:04 UTC (rev 8775) +++ trunk/src/test/net/sf/gridarta/gui/copybuffer/CopyBufferTest.java 2010-11-09 18:43:21 UTC (rev 8776) @@ -23,12 +23,13 @@ import java.awt.Rectangle; import java.io.File; import net.sf.gridarta.gui.map.mapview.MapView; -import net.sf.gridarta.gui.map.test.TestMapControlCreator; +import net.sf.gridarta.gui.map.test.TestMapControlCreatorUtils; import net.sf.gridarta.model.archetype.DuplicateArchetypeException; import net.sf.gridarta.model.archetype.TestArchetype; import net.sf.gridarta.model.gameobject.TestGameObject; import net.sf.gridarta.model.maparchobject.TestMapArchObject; import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.model.mapcontrol.TestMapControlCreator; import net.sf.gridarta.model.mapgrid.SelectionMode; import net.sf.gridarta.model.mapmodel.CannotInsertGameObjectException; import net.sf.gridarta.model.mapmodel.MapModel; @@ -74,8 +75,8 @@ TestMapModelHelper.checkContents(ob1, ob2); // select + cut - final CopyBuffer<TestGameObject, TestMapArchObject, TestArchetype> copyBuffer = testMapControlCreator.newCopyBuffer(); - final MapView<TestGameObject, TestMapArchObject, TestArchetype> mapView = TestMapControlCreator.newMapView(mapControl); + final CopyBuffer<TestGameObject, TestMapArchObject, TestArchetype> copyBuffer = TestMapControlCreatorUtils.newCopyBuffer(testMapControlCreator); + final MapView<TestGameObject, TestMapArchObject, TestArchetype> mapView = TestMapControlCreatorUtils.newMapView(mapControl); mapView.getMapViewBasic().getMapGrid().select(new Point(1, 1), new Point(1, 1), SelectionMode.ADD); copyBuffer.cut(mapView, new Rectangle(1, 1, 1, 1)); Deleted: trunk/src/test/net/sf/gridarta/gui/map/test/TestMapControlCreator.java =================================================================== --- trunk/src/test/net/sf/gridarta/gui/map/test/TestMapControlCreator.java 2010-11-08 21:53:04 UTC (rev 8775) +++ trunk/src/test/net/sf/gridarta/gui/map/test/TestMapControlCreator.java 2010-11-09 18:43:21 UTC (rev 8776) @@ -1,329 +0,0 @@ -/* - * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. - * Copyright (C) 2000-2010 The Gridarta Developers. - * - * 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 2 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, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -package net.sf.gridarta.gui.map.test; - -import java.awt.Image; -import java.awt.image.BufferedImage; -import java.io.File; -import net.sf.gridarta.gui.copybuffer.CopyBuffer; -import net.sf.gridarta.gui.map.mapview.MapView; -import net.sf.gridarta.gui.map.mapview.MapViewBasic; -import net.sf.gridarta.gui.map.mapview.MapViewFactory; -import net.sf.gridarta.gui.map.mapview.MapViewsManager; -import net.sf.gridarta.gui.map.mapview.TestMapView; -import net.sf.gridarta.gui.map.mapview.TestMapViewBasic; -import net.sf.gridarta.gui.map.mapview.TestMapViewFactory; -import net.sf.gridarta.gui.map.renderer.RendererFactory; -import net.sf.gridarta.gui.map.renderer.TestRendererFactory; -import net.sf.gridarta.gui.mapimagecache.MapImageCache; -import net.sf.gridarta.model.archetype.ArchetypeSet; -import net.sf.gridarta.model.archetype.DuplicateArchetypeException; -import net.sf.gridarta.model.archetype.TestArchetype; -import net.sf.gridarta.model.archetypechooser.ArchetypeChooserModel; -import net.sf.gridarta.model.autojoin.AutojoinListsHelper; -import net.sf.gridarta.model.exitconnector.ExitMatcher; -import net.sf.gridarta.model.gameobject.TestGameObject; -import net.sf.gridarta.model.io.CacheFiles; -import net.sf.gridarta.model.io.DefaultMapWriter; -import net.sf.gridarta.model.io.GameObjectParser; -import net.sf.gridarta.model.io.MapArchObjectParserFactory; -import net.sf.gridarta.model.io.MapReaderFactory; -import net.sf.gridarta.model.io.MapWriter; -import net.sf.gridarta.model.io.PathManager; -import net.sf.gridarta.model.io.TestCacheFiles; -import net.sf.gridarta.model.io.TestMapArchObjectParserFactory; -import net.sf.gridarta.model.io.TestMapReaderFactory; -import net.sf.gridarta.model.maparchobject.MapArchObjectFactory; -import net.sf.gridarta.model.maparchobject.TestMapArchObject; -import net.sf.gridarta.model.maparchobject.TestMapArchObjectFactory; -import net.sf.gridarta.model.mapcontrol.MapControl; -import net.sf.gridarta.model.mapcontrol.MapControlFactory; -import net.sf.gridarta.model.mapcontrol.TestMapControlFactory; -import net.sf.gridarta.model.mapmanager.AbstractMapManager; -import net.sf.gridarta.model.mapmanager.DefaultMapManager; -import net.sf.gridarta.model.mapmanager.FileControl; -import net.sf.gridarta.model.mapmanager.MapManager; -import net.sf.gridarta.model.mapmanager.TestFileControl; -import net.sf.gridarta.model.mapmodel.InsertionModeSet; -import net.sf.gridarta.model.mapmodel.MapModelFactory; -import net.sf.gridarta.model.mapmodel.TestMapModelCreator; -import net.sf.gridarta.model.mapmodel.TestMapModelHelper; -import net.sf.gridarta.model.match.GameObjectMatcher; -import net.sf.gridarta.model.match.TypeNrsGameObjectMatcher; -import net.sf.gridarta.model.settings.GlobalSettings; -import net.sf.gridarta.model.settings.TestGlobalSettings; -import net.sf.gridarta.utils.Size2D; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -/** - * Helper class for creating {@link MapControl} instances for regression tests. - * @author Andreas Kirschbaum - */ -public class TestMapControlCreator { - - /** - * The {@link MapManager} instance. - */ - @NotNull - private final MapManager<TestGameObject, TestMapArchObject, TestArchetype> mapManager; - - /** - * The pickmap {@link MapManager} instance. - */ - @NotNull - private final MapManager<TestGameObject, TestMapArchObject, TestArchetype> pickmapManager; - - /** - * The {@link PathManager} instance. - */ - @NotNull - private final PathManager pathManager; - - /** - * The {@link ExitMatcher} instance. - */ - @NotNull - private final ExitMatcher<TestGameObject, TestMapArchObject, TestArchetype> exitMatcher; - - /** - * The {@link MapReaderFactory} instance. - */ - @NotNull - private final MapReaderFactory<TestGameObject, TestMapArchObject> mapReaderFactory; - - /** - * The {@link GlobalSettings} instance. - */ - @NotNull - private final GlobalSettings globalSettings; - - /** - * The {@link MapArchObjectFactory} instance. - */ - @NotNull - private final MapArchObjectFactory<TestMapArchObject> mapArchObjectFactory = new TestMapArchObjectFactory(); - - /** - * The {@link FileControl} instance. - */ - @NotNull - private final FileControl<TestGameObject, TestMapArchObject, TestArchetype> fileControl = new TestFileControl(); - - /** - * The {@link MapModelFactory} instance. - */ - @NotNull - private final MapModelFactory<TestGameObject, TestMapArchObject, TestArchetype> mapModelFactory; - - /** - * The {@link MapControlFactory} instance. - */ - @NotNull - private final MapControlFactory<TestGameObject, TestMapArchObject, TestArchetype> mapControlFactory; - - /** - * The {@link TestMapModelCreator} instance. - */ - @NotNull - private final TestMapModelCreator mapModelCreator = new TestMapModelCreator(false); - - /** - * Creates a new instance. - */ - public TestMapControlCreator() { - final GameObjectMatcher exitGameObjectMatcher = new TypeNrsGameObjectMatcher(TestMapModelHelper.EXIT_TYPE); - exitMatcher = new ExitMatcher<TestGameObject, TestMapArchObject, TestArchetype>(exitGameObjectMatcher); - final MapArchObjectParserFactory<TestMapArchObject> mapArchObjectParserFactory = new TestMapArchObjectParserFactory(); - final GameObjectParser<TestGameObject, TestMapArchObject, TestArchetype> gameObjectParser = mapModelCreator.newGameObjectParser(); - mapReaderFactory = new TestMapReaderFactory(mapArchObjectParserFactory, mapArchObjectFactory, gameObjectParser, mapModelCreator.getMapViewSettings()); - globalSettings = new TestGlobalSettings(); - final MapWriter<TestGameObject, TestMapArchObject, TestArchetype> mapWriter = new DefaultMapWriter<TestGameObject, TestMapArchObject, TestArchetype>(mapArchObjectParserFactory, gameObjectParser); - final ArchetypeChooserModel<TestGameObject, TestMapArchObject, TestArchetype> archetypeChooserModel = new ArchetypeChooserModel<TestGameObject, TestMapArchObject, TestArchetype>(); - pathManager = new PathManager(globalSettings); - mapModelFactory = new MapModelFactory<TestGameObject, TestMapArchObject, TestArchetype>(archetypeChooserModel, mapModelCreator.getAutojoinLists(), mapModelCreator.getMapViewSettings(), mapModelCreator.getGameObjectFactory(), mapModelCreator.getGameObjectMatchers(), mapModelCreator.getTopmostInsertionMode()); - mapControlFactory = new TestMapControlFactory(mapWriter, globalSettings, mapModelFactory); - final AbstractMapManager<TestGameObject, TestMapArchObject, TestArchetype> tmpMapManager = new DefaultMapManager<TestGameObject, TestMapArchObject, TestArchetype>(mapReaderFactory, mapControlFactory, globalSettings, mapModelCreator.getFaceObjectProviders()); - tmpMapManager.setFileControl(fileControl); - mapManager = tmpMapManager; - final AbstractMapManager<TestGameObject, TestMapArchObject, TestArchetype> tmpPickmapManager = new DefaultMapManager<TestGameObject, TestMapArchObject, TestArchetype>(mapReaderFactory, mapControlFactory, globalSettings, mapModelCreator.getFaceObjectProviders()); - tmpPickmapManager.setFileControl(fileControl); - pickmapManager = tmpPickmapManager; - } - - /** - * Creates a new {@link TestMapModelHelper} instance. - * @return the new instance - * @throws DuplicateArchetypeException if an internal error occurs - */ - public TestMapModelHelper newMapModelCreator() throws DuplicateArchetypeException { - return mapModelCreator.newTestMapModelHelper(); - } - - /** - * Creates a new map control. - * @param mapFile the map file - * @param mapName the map name - * @param mapSize the map size - * @return the map control - */ - public MapControl<TestGameObject, TestMapArchObject, TestArchetype> newMapControl(@Nullable final File mapFile, @NotNull final String mapName, @NotNull final Size2D mapSize) { - final TestMapArchObject mapArchObject = mapArchObjectFactory.newMapArchObject(false); - mapArchObject.setMapSize(mapSize); - mapArchObject.setMapName(mapName); - final MapControl<TestGameObject, TestMapArchObject, TestArchetype> mapControl = mapManager.newMap(null, mapArchObject, mapFile, true); - return mapControl; - } - - /** - * Returns the {@link PathManager}. - * @return the path manager - */ - @NotNull - public PathManager getPathManager() { - return pathManager; - } - - /** - * Returns the {@link GlobalSettings}. - * @return the global settings - */ - @NotNull - public GlobalSettings getGlobalSettings() { - return globalSettings; - } - - /** - * Returns the {@link ExitMatcher}. - * @return the exit matcher - */ - @NotNull - public ExitMatcher<TestGameObject, TestMapArchObject, TestArchetype> getExitMatcher() { - return exitMatcher; - } - - /** - * Returns the {@link ArchetypeSet}. - * @return the archetype set - */ - @NotNull - public ArchetypeSet<TestGameObject, TestMapArchObject, TestArchetype> getArchetypeSet() { - return mapModelCreator.getArchetypeSet(); - } - - /** - * Returns the {@link MapManager}. - * @return the map manager - */ - @NotNull - public MapManager<TestGameObject, TestMapArchObject, TestArchetype> getMapManager() { - return mapManager; - } - - /** - * Returns the {@link InsertionModeSet}. - * @return the insertion mode set - */ - @NotNull - public InsertionModeSet<TestGameObject, TestMapArchObject, TestArchetype> getInsertionModeSet() { - return mapModelCreator.getInsertionModeSet(); - } - - /** - * Creates a new {@link MapView} instance. - * @param mapControl the associated map control - * @return the map view instance - */ - @NotNull - public static MapView<TestGameObject, TestMapArchObject, TestArchetype> newMapView(@NotNull final MapControl<TestGameObject, TestMapArchObject, TestArchetype> mapControl) { - final MapViewBasic<TestGameObject, TestMapArchObject, TestArchetype> mapViewBasic = new TestMapViewBasic(mapControl.getMapModel()); - final MapView<TestGameObject, TestMapArchObject, TestArchetype> mapView = new TestMapView(mapControl, mapViewBasic); - return mapView; - } - - /** - * Returns a new {@link CopyBuffer} instance. - * @return the copy buffer instance - */ - @NotNull - public CopyBuffer<TestGameObject, TestMapArchObject, TestArchetype> newCopyBuffer() { - return new CopyBuffer<TestGameObject, TestMapArchObject, TestArchetype>(mapModelCreator.getMapViewSettings(), mapModelCreator.getGameObjectFactory(), mapArchObjectFactory, mapModelFactory, mapModelCreator.getInsertionModeSet()); - } - - /** - * Creates a new {@link MapViewsManager} instance. - * @return the map views manager instance - */ - @NotNull - public MapViewsManager<TestGameObject, TestMapArchObject, TestArchetype> newMapViewsManager() { - final MapViewFactory<TestGameObject, TestMapArchObject, TestArchetype> mapViewFactory = new TestMapViewFactory(); - return new MapViewsManager<TestGameObject, TestMapArchObject, TestArchetype>(mapModelCreator.getMapViewSettings(), mapViewFactory, mapManager, pickmapManager); - } - - /** - * Creates a new {@link MapImageCache} instance. - * @return the map image cache instance - */ - @NotNull - public MapImageCache<TestGameObject, TestMapArchObject, TestArchetype> newMapImageCache() { - final RendererFactory<TestGameObject, TestMapArchObject, TestArchetype> rendererFactory = new TestRendererFactory(); - final Image defaultIcon = new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB); - final Image defaultPreview = new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB); - final CacheFiles cacheFiles = new TestCacheFiles(); - return new MapImageCache<TestGameObject, TestMapArchObject, TestArchetype>(mapManager, defaultIcon, defaultPreview, rendererFactory, cacheFiles); - } - - /** - * Returns the {@link FileControl} instance. - * @return the file control instance - */ - @NotNull - public FileControl<TestGameObject, TestMapArchObject, TestArchetype> getFileControl() { - return fileControl; - } - - /** - * Returns a new {@link AutojoinListsHelper} instance. - * @return the autojoin lists helper instance - */ - @NotNull - public AutojoinListsHelper newAutojoinListsHelper() { - return new AutojoinListsHelper(mapModelCreator); - } - - /** - * Returns the {@link TestMapModelCreator} instance. - * @return the test map model creator instance - */ - @NotNull - public TestMapModelCreator getMapModelCreator() { - return mapModelCreator; - } - - /** - * Returns a new {@link MapManager} instance. - * @return the map manager instance - */ - @NotNull - public MapManager<TestGameObject, TestMapArchObject, TestArchetype> newMapManager() { - return new DefaultMapManager<TestGameObject, TestMapArchObject, TestArchetype>(mapReaderFactory, mapControlFactory, globalSettings, mapModelCreator.getFaceObjectProviders()); - } - -} // class TestMapControlCreator Copied: trunk/src/test/net/sf/gridarta/gui/map/test/TestMapControlCreatorUtils.java (from rev 8775, trunk/src/test/net/sf/gridarta/gui/map/test/TestMapControlCreator.java) =================================================================== --- trunk/src/test/net/sf/gridarta/gui/map/test/TestMapControlCreatorUtils.java (rev 0) +++ trunk/src/test/net/sf/gridarta/gui/map/test/TestMapControlCreatorUtils.java 2010-11-09 18:43:21 UTC (rev 8776) @@ -0,0 +1,105 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * 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 2 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.gui.map.test; + +import java.awt.Image; +import java.awt.image.BufferedImage; +import net.sf.gridarta.gui.copybuffer.CopyBuffer; +import net.sf.gridarta.gui.map.mapview.MapView; +import net.sf.gridarta.gui.map.mapview.MapViewBasic; +import net.sf.gridarta.gui.map.mapview.MapViewFactory; +import net.sf.gridarta.gui.map.mapview.MapViewsManager; +import net.sf.gridarta.gui.map.mapview.TestMapView; +import net.sf.gridarta.gui.map.mapview.TestMapViewBasic; +import net.sf.gridarta.gui.map.mapview.TestMapViewFactory; +import net.sf.gridarta.gui.map.renderer.RendererFactory; +import net.sf.gridarta.gui.map.renderer.TestRendererFactory; +import net.sf.gridarta.gui.mapimagecache.MapImageCache; +import net.sf.gridarta.model.archetype.TestArchetype; +import net.sf.gridarta.model.gameobject.TestGameObject; +import net.sf.gridarta.model.io.CacheFiles; +import net.sf.gridarta.model.io.TestCacheFiles; +import net.sf.gridarta.model.maparchobject.TestMapArchObject; +import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.model.mapcontrol.TestMapControlCreator; +import net.sf.gridarta.model.mapmodel.TestMapModelCreator; +import org.jetbrains.annotations.NotNull; + +/** + * Helper class for creating {@link MapControl} instances for regression tests. + * @author Andreas Kirschbaum + */ +public class TestMapControlCreatorUtils { + + /** + * Private constructor to prevent instantiation. + */ + private TestMapControlCreatorUtils() { + } + + /** + * Creates a new {@link MapView} instance. + * @param mapControl the associated map control + * @return the map view instance + */ + @NotNull + public static MapView<TestGameObject, TestMapArchObject, TestArchetype> newMapView(@NotNull final MapControl<TestGameObject, TestMapArchObject, TestArchetype> mapControl) { + final MapViewBasic<TestGameObject, TestMapArchObject, TestArchetype> mapViewBasic = new TestMapViewBasic(mapControl.getMapModel()); + final MapView<TestGameObject, TestMapArchObject, TestArchetype> mapView = new TestMapView(mapControl, mapViewBasic); + return mapView; + } + + /** + * Returns a new {@link CopyBuffer} instance. + * @param mapControlCreator the map control creator + * @return the copy buffer instance + */ + @NotNull + public static CopyBuffer<TestGameObject, TestMapArchObject, TestArchetype> newCopyBuffer(@NotNull final TestMapControlCreator mapControlCreator) { + final TestMapModelCreator mapModelCreator = mapControlCreator.getMapModelCreator(); + return new CopyBuffer<TestGameObject, TestMapArchObject, TestArchetype>(mapModelCreator.getMapViewSettings(), mapModelCreator.getGameObjectFactory(), mapControlCreator.getMapArchObjectFactory(), mapControlCreator.getMapModelFactory(), mapModelCreator.getInsertionModeSet()); + } + + /** + * Creates a new {@link MapViewsManager} instance. + * @param mapControlCreator the map control creator + * @return the map views manager instance + */ + @NotNull + public static MapViewsManager<TestGameObject, TestMapArchObject, TestArchetype> newMapViewsManager(@NotNull final TestMapControlCreator mapControlCreator) { + final MapViewFactory<TestGameObject, TestMapArchObject, TestArchetype> mapViewFactory = new TestMapViewFactory(); + return new MapViewsManager<TestGameObject, TestMapArchObject, TestArchetype>(mapControlCreator.getMapModelCreator().getMapViewSettings(), mapViewFactory, mapControlCreator.getMapManager(), mapControlCreator.getPickmapManager()); + } + + /** + * Creates a new {@link MapImageCache} instance. + * @param mapControlCreator the map control creator + * @return the map image cache instance + */ + @NotNull + public static MapImageCache<TestGameObject, TestMapArchObject, TestArchetype> newMapImageCache(@NotNull final TestMapControlCreator mapControlCreator) { + final RendererFactory<TestGameObject, TestMapArchObject, TestArchetype> rendererFactory = new TestRendererFactory(); + final Image defaultIcon = new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB); + final Image defaultPreview = new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB); + final CacheFiles cacheFiles = new TestCacheFiles(); + return new MapImageCache<TestGameObject, TestMapArchObject, TestArchetype>(mapControlCreator.getMapManager(), defaultIcon, defaultPreview, rendererFactory, cacheFiles); + } + +} // class TestMapControlCreatorUtils Property changes on: trunk/src/test/net/sf/gridarta/gui/map/test/TestMapControlCreatorUtils.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Modified: trunk/src/test/net/sf/gridarta/gui/mapmenu/MapMenuManagerTest.java =================================================================== --- trunk/src/test/net/sf/gridarta/gui/mapmenu/MapMenuManagerTest.java 2010-11-08 21:53:04 UTC (rev 8775) +++ trunk/src/test/net/sf/gridarta/gui/mapmenu/MapMenuManagerTest.java 2010-11-09 18:43:21 UTC (rev 8776) @@ -23,13 +23,14 @@ import java.io.File; import java.io.IOException; import net.sf.gridarta.gui.map.mapview.MapViewsManager; -import net.sf.gridarta.gui.map.test.TestMapControlCreator; +import net.sf.gridarta.gui.map.test.TestMapControlCreatorUtils; import net.sf.gridarta.gui.mapimagecache.MapImageCache; import net.sf.gridarta.model.archetype.DuplicateArchetypeException; import net.sf.gridarta.model.archetype.TestArchetype; import net.sf.gridarta.model.gameobject.TestGameObject; import net.sf.gridarta.model.maparchobject.TestMapArchObject; import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.model.mapcontrol.TestMapControlCreator; import net.sf.gridarta.utils.Size2D; import org.jetbrains.annotations.NotNull; import org.junit.Assert; @@ -54,8 +55,8 @@ } final TestMapControlCreator testMapControlCreator = new TestMapControlCreator(); - final MapViewsManager<TestGameObject, TestMapArchObject, TestArchetype> mapViewsManager = testMapControlCreator.newMapViewsManager(); - final MapImageCache<TestGameObject, TestMapArchObject, TestArchetype> mapImageCache = testMapControlCreator.newMapImageCache(); + final MapViewsManager<TestGameObject, TestMapArchObject, TestArchetype> mapViewsManager = TestMapControlCreatorUtils.newMapViewsManager(testMapControlCreator); + final MapImageCache<TestGameObject, TestMapArchObject, TestArchetype> mapImageCache = TestMapControlCreatorUtils.newMapImageCache(testMapControlCreator); final MapMenuPreferences<TestGameObject, TestMapArchObject, TestArchetype> mapMenuPreferences = new AbstractMapMenuPreferences<TestGameObject, TestMapArchObject, TestArchetype>(mapViewsManager, testMapControlCreator.getGlobalSettings(), mapImageCache, testMapControlCreator.getFileControl()) { /** Modified: trunk/src/test/net/sf/gridarta/gui/selectedsquare/SelectedSquareActionsTest.java =================================================================== --- trunk/src/test/net/sf/gridarta/gui/selectedsquare/SelectedSquareActionsTest.java 2010-11-08 21:53:04 UTC (rev 8775) +++ trunk/src/test/net/sf/gridarta/gui/selectedsquare/SelectedSquareActionsTest.java 2010-11-09 18:43:21 UTC (rev 8776) @@ -22,12 +22,13 @@ import java.awt.Point; import java.io.File; import net.sf.gridarta.gui.map.mapview.MapView; -import net.sf.gridarta.gui.map.test.TestMapControlCreator; +import net.sf.gridarta.gui.map.test.TestMapControlCreatorUtils; import net.sf.gridarta.model.archetype.DuplicateArchetypeException; import net.sf.gridarta.model.archetype.TestArchetype; import net.sf.gridarta.model.gameobject.TestGameObject; import net.sf.gridarta.model.maparchobject.TestMapArchObject; import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.model.mapcontrol.TestMapControlCreator; import net.sf.gridarta.model.mapmodel.CannotInsertGameObjectException; import net.sf.gridarta.model.mapmodel.MapModel; import net.sf.gridarta.model.mapmodel.MapSquare; @@ -1023,7 +1024,7 @@ @NotNull private static SelectedSquareModel<TestGameObject, TestMapArchObject, TestArchetype> newSelectedSquareModel(@NotNull final MapControl<TestGameObject, TestMapArchObject, TestArchetype> mapControl) { final SelectedSquareModel<TestGameObject, TestMapArchObject, TestArchetype> selectedSquareModel = new SelectedSquareModel<TestGameObject, TestMapArchObject, TestArchetype>(); - final MapView<TestGameObject, TestMapArchObject, TestArchetype> mapView = TestMapControlCreator.newMapView(mapControl); + final MapView<TestGameObject, TestMapArchObject, TestArchetype> mapView = TestMapControlCreatorUtils.newMapView(mapControl); selectedSquareModel.setSelectedMapSquare(new MapSquareSelection<TestGameObject, TestMapArchObject, TestArchetype>(mapView)); return selectedSquareModel; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-11-08 21:53:10
|
Revision: 8775 http://gridarta.svn.sourceforge.net/gridarta/?rev=8775&view=rev Author: akirschbaum Date: 2010-11-08 21:53:04 +0000 (Mon, 08 Nov 2010) Log Message: ----------- Merge duplicated code. Modified Paths: -------------- trunk/model/src/test/net/sf/gridarta/model/floodfill/FillUtilsTest.java trunk/model/src/test/net/sf/gridarta/model/gameobject/GameObjectFactoryTest.java trunk/model/src/test/net/sf/gridarta/model/mapmodel/TestMapModelCreator.java trunk/src/test/net/sf/gridarta/gui/map/test/TestMapControlCreator.java Modified: trunk/model/src/test/net/sf/gridarta/model/floodfill/FillUtilsTest.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/floodfill/FillUtilsTest.java 2010-11-08 08:38:49 UTC (rev 8774) +++ trunk/model/src/test/net/sf/gridarta/model/floodfill/FillUtilsTest.java 2010-11-08 21:53:04 UTC (rev 8775) @@ -50,7 +50,7 @@ @Test public void testFillAdjacent() throws CannotInsertGameObjectException, DuplicateArchetypeException { final TestMapModelCreator mapModelCreator = new TestMapModelCreator(false); - final TestMapModelHelper mapModelHelper = mapModelCreator.newMapModelCreator(); + final TestMapModelHelper mapModelHelper = mapModelCreator.newTestMapModelHelper(); final MapModel<TestGameObject, TestMapArchObject, TestArchetype> mapModel = mapModelCreator.newMapModel(4, 5); final TestArchetype head = mapModelCreator.getArchetype("2x2a"); Modified: trunk/model/src/test/net/sf/gridarta/model/gameobject/GameObjectFactoryTest.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/gameobject/GameObjectFactoryTest.java 2010-11-08 08:38:49 UTC (rev 8774) +++ trunk/model/src/test/net/sf/gridarta/model/gameobject/GameObjectFactoryTest.java 2010-11-08 21:53:04 UTC (rev 8775) @@ -45,7 +45,7 @@ @Test public void testDoMoveSquareTopSingle() throws CannotInsertGameObjectException, DuplicateArchetypeException { final TestMapModelCreator mapModelCreator = new TestMapModelCreator(false); - final TestMapModelHelper mapModelHelper = mapModelCreator.newMapModelCreator(); + final TestMapModelHelper mapModelHelper = mapModelCreator.newTestMapModelHelper(); final MapModel<TestGameObject, TestMapArchObject, TestArchetype> mapModel = mapModelCreator.newMapModel(1, 1); final Point point = new Point(0, 0); Modified: trunk/model/src/test/net/sf/gridarta/model/mapmodel/TestMapModelCreator.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/mapmodel/TestMapModelCreator.java 2010-11-08 08:38:49 UTC (rev 8774) +++ trunk/model/src/test/net/sf/gridarta/model/mapmodel/TestMapModelCreator.java 2010-11-08 21:53:04 UTC (rev 8775) @@ -249,15 +249,6 @@ } /** - * Creates a new {@link TestMapModelHelper} instance. - * @return the new instance - * @throws DuplicateArchetypeException if an internal error occurs - */ - public TestMapModelHelper newMapModelCreator() throws DuplicateArchetypeException { - return new TestMapModelHelper(topmostInsertionMode, gameObjectFactory, archetypeSet, faceObjectProviders, animationObjects); - } - - /** * Returns the {@link MapViewSettings} instance. * @return the map view settings instance */ Modified: trunk/src/test/net/sf/gridarta/gui/map/test/TestMapControlCreator.java =================================================================== --- trunk/src/test/net/sf/gridarta/gui/map/test/TestMapControlCreator.java 2010-11-08 08:38:49 UTC (rev 8774) +++ trunk/src/test/net/sf/gridarta/gui/map/test/TestMapControlCreator.java 2010-11-08 21:53:04 UTC (rev 8775) @@ -174,7 +174,7 @@ * @throws DuplicateArchetypeException if an internal error occurs */ public TestMapModelHelper newMapModelCreator() throws DuplicateArchetypeException { - return mapModelCreator.newMapModelCreator(); + return mapModelCreator.newTestMapModelHelper(); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-11-08 08:39:00
|
Revision: 8774 http://gridarta.svn.sourceforge.net/gridarta/?rev=8774&view=rev Author: akirschbaum Date: 2010-11-08 08:38:49 +0000 (Mon, 08 Nov 2010) Log Message: ----------- Move MapManager and related classes to model module. Modified Paths: -------------- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/mappropertiesdialog/DefaultMapPropertiesDialogFactory.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/mappropertiesdialog/MapPropertiesDialog.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/maincontrol/DefaultEditorFactory.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/mappropertiesdialog/DefaultMapPropertiesDialogFactory.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/mappropertiesdialog/MapPropertiesDialog.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/maincontrol/DefaultEditorFactory.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/gui/mappropertiesdialog/DefaultMapPropertiesDialogFactory.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/gui/mappropertiesdialog/MapPropertiesDialog.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/maincontrol/DefaultEditorFactory.java trunk/model/src/app/net/sf/gridarta/model/mapmanager/AbstractMapManager.java trunk/model/src/app/net/sf/gridarta/model/mapmanager/DefaultMapManager.java trunk/model/src/app/net/sf/gridarta/model/mapmanager/DefaultPickmapManager.java trunk/model/src/app/net/sf/gridarta/model/mapmanager/FileControl.java trunk/model/src/app/net/sf/gridarta/model/mapmanager/MapManager.java trunk/model/src/app/net/sf/gridarta/model/mapmanager/MapManagerListener.java trunk/src/app/net/sf/gridarta/actions/AttachTiledMaps.java trunk/src/app/net/sf/gridarta/delayedmapmodel/DelayedMapModelListenerManager.java trunk/src/app/net/sf/gridarta/exitconnector/ExitConnectorActions.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialogFactory.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/ErrorListView.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/EventsTab.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java trunk/src/app/net/sf/gridarta/gui/map/MapFileActions.java trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapActions.java trunk/src/app/net/sf/gridarta/gui/map/maptilepane/AbstractMapTilePane.java trunk/src/app/net/sf/gridarta/gui/map/maptilepane/FlatMapTilePane.java trunk/src/app/net/sf/gridarta/gui/map/maptilepane/IsoMapTilePane.java trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewsManager.java trunk/src/app/net/sf/gridarta/gui/map/renderer/ImageCreator.java trunk/src/app/net/sf/gridarta/gui/map/viewaction/ViewActions.java trunk/src/app/net/sf/gridarta/gui/mapdesktop/MapDesktop.java trunk/src/app/net/sf/gridarta/gui/mapdesktop/WindowAction.java trunk/src/app/net/sf/gridarta/gui/mapfiles/Loader.java trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFile.java trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolder.java trunk/src/app/net/sf/gridarta/gui/mapimagecache/MapImageCache.java trunk/src/app/net/sf/gridarta/gui/mapmenu/AbstractMapMenuPreferences.java trunk/src/app/net/sf/gridarta/gui/mapmenu/BookmarksMapMenuPreferences.java trunk/src/app/net/sf/gridarta/gui/mapmenu/MapMenuEntry.java trunk/src/app/net/sf/gridarta/gui/mapmenu/MapMenuManager.java trunk/src/app/net/sf/gridarta/gui/mapmenu/RecentMapMenuPreferences.java trunk/src/app/net/sf/gridarta/gui/mapuserlistener/MapUserListenerManager.java trunk/src/app/net/sf/gridarta/gui/misc/DefaultFileControl.java trunk/src/app/net/sf/gridarta/gui/misc/RecentManager.java trunk/src/app/net/sf/gridarta/gui/misc/StatusBar.java trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java trunk/src/app/net/sf/gridarta/gui/script/parameter/MapParameterCellRenderer.java trunk/src/app/net/sf/gridarta/gui/script/parameter/MapParameterComboBoxModel.java trunk/src/app/net/sf/gridarta/gui/script/parameter/MapParameterView.java trunk/src/app/net/sf/gridarta/gui/script/parameter/PluginParameterViewFactory.java trunk/src/app/net/sf/gridarta/gui/scripts/DefaultScriptArchEditor.java trunk/src/app/net/sf/gridarta/gui/scripts/ScriptArchDataUtils.java trunk/src/app/net/sf/gridarta/gui/scripts/ScriptTask.java trunk/src/app/net/sf/gridarta/gui/scripts/ScriptedEventEditor.java trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareView.java trunk/src/app/net/sf/gridarta/gui/undo/UndoControl.java trunk/src/app/net/sf/gridarta/mainactions/MainActions.java trunk/src/app/net/sf/gridarta/maincontrol/DefaultMainControl.java trunk/src/app/net/sf/gridarta/maincontrol/EditorFactory.java trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java trunk/src/app/net/sf/gridarta/maincontrol/ImageCreatorFactory.java trunk/src/app/net/sf/gridarta/script/parameter/MapParameter.java trunk/src/app/net/sf/gridarta/script/parameter/PluginParameterFactory.java trunk/src/app/net/sf/gridarta/updater/UpdaterManager.java trunk/src/test/net/sf/gridarta/actions/UndoActionsTest.java trunk/src/test/net/sf/gridarta/exitconnector/ExitConnectorActionsTest.java trunk/src/test/net/sf/gridarta/gui/map/test/TestMapControlCreator.java trunk/src/test/net/sf/gridarta/model/mapmanager/DefaultMapManagerTest.java trunk/src/test/net/sf/gridarta/model/mapmanager/TestFileControl.java Added Paths: ----------- trunk/model/src/app/net/sf/gridarta/model/mapmanager/ trunk/src/app/net/sf/gridarta/model/ trunk/src/app/net/sf/gridarta/model/mapmanager/ trunk/src/test/net/sf/gridarta/model/mapmanager/ Removed Paths: ------------- trunk/src/app/net/sf/gridarta/mapmanager/ trunk/src/app/net/sf/gridarta/model/mapmanager/AbstractMapManager.java trunk/src/app/net/sf/gridarta/model/mapmanager/DefaultMapManager.java trunk/src/app/net/sf/gridarta/model/mapmanager/DefaultPickmapManager.java trunk/src/app/net/sf/gridarta/model/mapmanager/FileControl.java trunk/src/app/net/sf/gridarta/model/mapmanager/MapManager.java trunk/src/app/net/sf/gridarta/model/mapmanager/MapManagerListener.java trunk/src/test/net/sf/gridarta/mapmanager/ Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/mappropertiesdialog/DefaultMapPropertiesDialogFactory.java =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/mappropertiesdialog/DefaultMapPropertiesDialogFactory.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/mappropertiesdialog/DefaultMapPropertiesDialogFactory.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -23,7 +23,7 @@ import javax.swing.JFrame; import javax.swing.filechooser.FileFilter; import net.sf.gridarta.gui.mappropertiesdialog.MapPropertiesDialogFactory; -import net.sf.gridarta.mapmanager.MapManager; +import net.sf.gridarta.model.mapmanager.MapManager; import net.sf.gridarta.model.mapmodel.MapModel; import net.sf.gridarta.model.mappathnormalizer.MapPathNormalizer; import net.sf.gridarta.model.settings.GlobalSettings; Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/mappropertiesdialog/MapPropertiesDialog.java =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/mappropertiesdialog/MapPropertiesDialog.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/mappropertiesdialog/MapPropertiesDialog.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -51,7 +51,7 @@ import net.sf.gridarta.gui.map.maptilepane.IsoMapTilePane; import net.sf.gridarta.gui.utils.GUIConstants; import net.sf.gridarta.gui.utils.TextComponentUtils; -import net.sf.gridarta.mapmanager.MapManager; +import net.sf.gridarta.model.mapmanager.MapManager; import net.sf.gridarta.model.mapmodel.MapModel; import net.sf.gridarta.model.mappathnormalizer.MapPathNormalizer; import net.sf.gridarta.model.settings.GlobalSettings; Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/maincontrol/DefaultEditorFactory.java =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/maincontrol/DefaultEditorFactory.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/maincontrol/DefaultEditorFactory.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -44,8 +44,6 @@ import net.sf.gridarta.maincontrol.DefaultMainControl; import net.sf.gridarta.maincontrol.EditorFactory; import net.sf.gridarta.maincontrol.GUIMainControl; -import net.sf.gridarta.mapmanager.AbstractMapManager; -import net.sf.gridarta.mapmanager.MapManager; import net.sf.gridarta.model.anim.AnimationObjects; import net.sf.gridarta.model.anim.DefaultAnimationObjects; import net.sf.gridarta.model.archetype.AbstractArchetypeParser; @@ -75,6 +73,8 @@ import net.sf.gridarta.model.io.SubDirectoryCacheFiles; import net.sf.gridarta.model.maparchobject.MapArchObjectFactory; import net.sf.gridarta.model.mapcontrol.MapControlFactory; +import net.sf.gridarta.model.mapmanager.AbstractMapManager; +import net.sf.gridarta.model.mapmanager.MapManager; import net.sf.gridarta.model.mapmodel.InsertionMode; import net.sf.gridarta.model.mapmodel.MapModelFactory; import net.sf.gridarta.model.mappathnormalizer.MapPathNormalizer; Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/mappropertiesdialog/DefaultMapPropertiesDialogFactory.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/mappropertiesdialog/DefaultMapPropertiesDialogFactory.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/mappropertiesdialog/DefaultMapPropertiesDialogFactory.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -23,7 +23,7 @@ import javax.swing.JFrame; import javax.swing.filechooser.FileFilter; import net.sf.gridarta.gui.mappropertiesdialog.MapPropertiesDialogFactory; -import net.sf.gridarta.mapmanager.MapManager; +import net.sf.gridarta.model.mapmanager.MapManager; import net.sf.gridarta.model.mapmodel.MapModel; import net.sf.gridarta.model.mappathnormalizer.MapPathNormalizer; import net.sf.gridarta.model.settings.GlobalSettings; Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/mappropertiesdialog/MapPropertiesDialog.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/mappropertiesdialog/MapPropertiesDialog.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/mappropertiesdialog/MapPropertiesDialog.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -43,7 +43,7 @@ import net.sf.gridarta.gui.map.maptilepane.AbstractMapTilePane; import net.sf.gridarta.gui.map.maptilepane.FlatMapTilePane; import net.sf.gridarta.gui.utils.TextComponentUtils; -import net.sf.gridarta.mapmanager.MapManager; +import net.sf.gridarta.model.mapmanager.MapManager; import net.sf.gridarta.model.mapmodel.MapModel; import net.sf.gridarta.model.mappathnormalizer.MapPathNormalizer; import net.sf.gridarta.model.settings.GlobalSettings; Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/maincontrol/DefaultEditorFactory.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/maincontrol/DefaultEditorFactory.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/maincontrol/DefaultEditorFactory.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -42,8 +42,6 @@ import net.sf.gridarta.maincontrol.DefaultMainControl; import net.sf.gridarta.maincontrol.EditorFactory; import net.sf.gridarta.maincontrol.GUIMainControl; -import net.sf.gridarta.mapmanager.AbstractMapManager; -import net.sf.gridarta.mapmanager.MapManager; import net.sf.gridarta.model.anim.AnimationObjects; import net.sf.gridarta.model.anim.DefaultAnimationObjects; import net.sf.gridarta.model.archetype.AbstractArchetypeParser; @@ -70,6 +68,8 @@ import net.sf.gridarta.model.io.PathManager; import net.sf.gridarta.model.maparchobject.MapArchObjectFactory; import net.sf.gridarta.model.mapcontrol.MapControlFactory; +import net.sf.gridarta.model.mapmanager.AbstractMapManager; +import net.sf.gridarta.model.mapmanager.MapManager; import net.sf.gridarta.model.mapmodel.InsertionMode; import net.sf.gridarta.model.mapmodel.MapModelFactory; import net.sf.gridarta.model.mappathnormalizer.MapPathNormalizer; Modified: trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/gui/mappropertiesdialog/DefaultMapPropertiesDialogFactory.java =================================================================== --- trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/gui/mappropertiesdialog/DefaultMapPropertiesDialogFactory.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/gui/mappropertiesdialog/DefaultMapPropertiesDialogFactory.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -23,7 +23,7 @@ import javax.swing.JFrame; import javax.swing.filechooser.FileFilter; import net.sf.gridarta.gui.mappropertiesdialog.MapPropertiesDialogFactory; -import net.sf.gridarta.mapmanager.MapManager; +import net.sf.gridarta.model.mapmanager.MapManager; import net.sf.gridarta.model.mapmodel.MapModel; import net.sf.gridarta.model.mappathnormalizer.MapPathNormalizer; import net.sf.gridarta.model.settings.GlobalSettings; Modified: trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/gui/mappropertiesdialog/MapPropertiesDialog.java =================================================================== --- trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/gui/mappropertiesdialog/MapPropertiesDialog.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/gui/mappropertiesdialog/MapPropertiesDialog.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -52,7 +52,7 @@ import net.sf.gridarta.gui.map.maptilepane.IsoMapTilePane; import net.sf.gridarta.gui.utils.GUIConstants; import net.sf.gridarta.gui.utils.TextComponentUtils; -import net.sf.gridarta.mapmanager.MapManager; +import net.sf.gridarta.model.mapmanager.MapManager; import net.sf.gridarta.model.mapmodel.MapModel; import net.sf.gridarta.model.mappathnormalizer.MapPathNormalizer; import net.sf.gridarta.model.settings.GlobalSettings; Modified: trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/maincontrol/DefaultEditorFactory.java =================================================================== --- trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/maincontrol/DefaultEditorFactory.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/maincontrol/DefaultEditorFactory.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -44,8 +44,6 @@ import net.sf.gridarta.maincontrol.DefaultMainControl; import net.sf.gridarta.maincontrol.EditorFactory; import net.sf.gridarta.maincontrol.GUIMainControl; -import net.sf.gridarta.mapmanager.AbstractMapManager; -import net.sf.gridarta.mapmanager.MapManager; import net.sf.gridarta.model.anim.AnimationObjects; import net.sf.gridarta.model.anim.DefaultAnimationObjects; import net.sf.gridarta.model.archetype.AbstractArchetypeParser; @@ -75,6 +73,8 @@ import net.sf.gridarta.model.io.SubDirectoryCacheFiles; import net.sf.gridarta.model.maparchobject.MapArchObjectFactory; import net.sf.gridarta.model.mapcontrol.MapControlFactory; +import net.sf.gridarta.model.mapmanager.AbstractMapManager; +import net.sf.gridarta.model.mapmanager.MapManager; import net.sf.gridarta.model.mapmodel.InsertionMode; import net.sf.gridarta.model.mapmodel.MapModelFactory; import net.sf.gridarta.model.mappathnormalizer.MapPathNormalizer; Modified: trunk/model/src/app/net/sf/gridarta/model/mapmanager/AbstractMapManager.java =================================================================== --- trunk/src/app/net/sf/gridarta/mapmanager/AbstractMapManager.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/model/src/app/net/sf/gridarta/model/mapmanager/AbstractMapManager.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -17,7 +17,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -package net.sf.gridarta.mapmanager; +package net.sf.gridarta.model.mapmanager; import java.io.File; import java.io.IOException; Modified: trunk/model/src/app/net/sf/gridarta/model/mapmanager/DefaultMapManager.java =================================================================== --- trunk/src/app/net/sf/gridarta/mapmanager/DefaultMapManager.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/model/src/app/net/sf/gridarta/model/mapmanager/DefaultMapManager.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -17,7 +17,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -package net.sf.gridarta.mapmanager; +package net.sf.gridarta.model.mapmanager; import java.io.File; import java.util.List; Modified: trunk/model/src/app/net/sf/gridarta/model/mapmanager/DefaultPickmapManager.java =================================================================== --- trunk/src/app/net/sf/gridarta/mapmanager/DefaultPickmapManager.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/model/src/app/net/sf/gridarta/model/mapmanager/DefaultPickmapManager.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -17,7 +17,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -package net.sf.gridarta.mapmanager; +package net.sf.gridarta.model.mapmanager; import java.io.File; import java.util.List; Modified: trunk/model/src/app/net/sf/gridarta/model/mapmanager/FileControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/mapmanager/FileControl.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/model/src/app/net/sf/gridarta/model/mapmanager/FileControl.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -17,7 +17,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -package net.sf.gridarta.mapmanager; +package net.sf.gridarta.model.mapmanager; import java.io.File; import net.sf.gridarta.model.archetype.Archetype; Modified: trunk/model/src/app/net/sf/gridarta/model/mapmanager/MapManager.java =================================================================== --- trunk/src/app/net/sf/gridarta/mapmanager/MapManager.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/model/src/app/net/sf/gridarta/model/mapmanager/MapManager.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -17,7 +17,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -package net.sf.gridarta.mapmanager; +package net.sf.gridarta.model.mapmanager; import java.io.File; import java.io.IOException; Modified: trunk/model/src/app/net/sf/gridarta/model/mapmanager/MapManagerListener.java =================================================================== --- trunk/src/app/net/sf/gridarta/mapmanager/MapManagerListener.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/model/src/app/net/sf/gridarta/model/mapmanager/MapManagerListener.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -17,7 +17,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -package net.sf.gridarta.mapmanager; +package net.sf.gridarta.model.mapmanager; import java.util.EventListener; import net.sf.gridarta.model.archetype.Archetype; Modified: trunk/src/app/net/sf/gridarta/actions/AttachTiledMaps.java =================================================================== --- trunk/src/app/net/sf/gridarta/actions/AttachTiledMaps.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/actions/AttachTiledMaps.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -25,12 +25,12 @@ import java.util.Collection; import java.util.List; import java.util.regex.Matcher; -import net.sf.gridarta.mapmanager.MapManager; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.direction.Direction; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.model.mapmanager.MapManager; import net.sf.gridarta.model.mapmodel.MapModel; import net.sf.gridarta.model.mappathnormalizer.IOErrorException; import net.sf.gridarta.model.mappathnormalizer.InvalidPathException; Modified: trunk/src/app/net/sf/gridarta/delayedmapmodel/DelayedMapModelListenerManager.java =================================================================== --- trunk/src/app/net/sf/gridarta/delayedmapmodel/DelayedMapModelListenerManager.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/delayedmapmodel/DelayedMapModelListenerManager.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -25,13 +25,13 @@ import java.util.Map; import java.util.Set; import javax.swing.SwingUtilities; -import net.sf.gridarta.mapmanager.MapManager; -import net.sf.gridarta.mapmanager.MapManagerListener; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; import net.sf.gridarta.model.maparchobject.MapArchObjectListener; import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.model.mapmanager.MapManager; +import net.sf.gridarta.model.mapmanager.MapManagerListener; import net.sf.gridarta.model.mapmodel.MapModel; import net.sf.gridarta.model.mapmodel.MapModelListener; import net.sf.gridarta.model.mapmodel.MapSquare; Modified: trunk/src/app/net/sf/gridarta/exitconnector/ExitConnectorActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/exitconnector/ExitConnectorActions.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/exitconnector/ExitConnectorActions.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -22,8 +22,6 @@ import java.awt.Point; import java.io.File; import java.io.IOException; -import net.sf.gridarta.mapmanager.FileControl; -import net.sf.gridarta.mapmanager.MapManager; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.archetype.ArchetypeSet; import net.sf.gridarta.model.archetype.UndefinedArchetypeException; @@ -35,6 +33,8 @@ import net.sf.gridarta.model.io.PathManager; import net.sf.gridarta.model.maparchobject.MapArchObject; import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.model.mapmanager.FileControl; +import net.sf.gridarta.model.mapmanager.MapManager; import net.sf.gridarta.model.mapmodel.InsertionModeSet; import net.sf.gridarta.model.mapmodel.MapModel; import org.jetbrains.annotations.NotNull; Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -71,8 +71,6 @@ import net.sf.gridarta.gui.treasurelist.CFTreasureListTree; import net.sf.gridarta.gui.utils.AnimationComponent; import net.sf.gridarta.gui.utils.FaceComponent; -import net.sf.gridarta.mapmanager.MapManager; -import net.sf.gridarta.mapmanager.MapManagerListener; import net.sf.gridarta.model.anim.AnimationObjects; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.archetypetype.AbstractArchetypeAttributeSpell; @@ -108,6 +106,8 @@ import net.sf.gridarta.model.gameobject.GameObjectUtils; import net.sf.gridarta.model.maparchobject.MapArchObject; import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.model.mapmanager.MapManager; +import net.sf.gridarta.model.mapmanager.MapManagerListener; import net.sf.gridarta.model.mapmodel.MapModel; import net.sf.gridarta.model.mapmodel.MapModelListener; import net.sf.gridarta.model.mapmodel.MapSquare; Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialogFactory.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialogFactory.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialogFactory.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -27,7 +27,6 @@ import javax.swing.JFrame; import javax.swing.filechooser.FileFilter; import net.sf.gridarta.gui.treasurelist.CFTreasureListTree; -import net.sf.gridarta.mapmanager.MapManager; import net.sf.gridarta.model.anim.AnimationObjects; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.archetypetype.ArchetypeTypeSet; @@ -35,6 +34,7 @@ import net.sf.gridarta.model.face.FaceObjects; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; +import net.sf.gridarta.model.mapmanager.MapManager; import net.sf.gridarta.model.settings.GlobalSettings; import net.sf.gridarta.model.spells.GameObjectSpell; import net.sf.gridarta.model.spells.NumberSpell; Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/ErrorListView.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/ErrorListView.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/ErrorListView.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -40,14 +40,14 @@ import net.sf.gridarta.gui.map.mapview.MapView; import net.sf.gridarta.gui.map.mapview.MapViewsManager; import net.sf.gridarta.gui.selectedsquare.SelectedSquareView; -import net.sf.gridarta.mapmanager.MapManager; -import net.sf.gridarta.mapmanager.MapManagerListener; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.baseobject.BaseObject; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; import net.sf.gridarta.model.mapcontrol.MapControl; import net.sf.gridarta.model.mapcursor.MapCursor; +import net.sf.gridarta.model.mapmanager.MapManager; +import net.sf.gridarta.model.mapmanager.MapManagerListener; import net.sf.gridarta.model.mapmodel.MapModel; import net.sf.gridarta.model.mapmodel.MapModelListener; import net.sf.gridarta.model.mapmodel.MapSquare; Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/EventsTab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/EventsTab.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/EventsTab.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -40,10 +40,10 @@ import net.sf.gridarta.gui.scripts.ScriptArchEditor; import net.sf.gridarta.gui.scripts.ScriptTask; import net.sf.gridarta.gui.utils.Severity; -import net.sf.gridarta.mapmanager.MapManager; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; +import net.sf.gridarta.model.mapmanager.MapManager; import net.sf.gridarta.model.mapmodel.MapModel; import net.sf.gridarta.model.mapmodel.MapSquare; import net.sf.gridarta.model.scripts.ScriptArchData; Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -42,14 +42,14 @@ import net.sf.gridarta.gui.selectedsquare.SelectedSquareModelListener; import net.sf.gridarta.gui.selectedsquare.SelectedSquareView; import net.sf.gridarta.gui.utils.Severity; -import net.sf.gridarta.mapmanager.MapManager; -import net.sf.gridarta.mapmanager.MapManagerListener; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.baseobject.BaseObject; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.gameobject.GameObjectFactory; import net.sf.gridarta.model.maparchobject.MapArchObject; import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.model.mapmanager.MapManager; +import net.sf.gridarta.model.mapmanager.MapManagerListener; import net.sf.gridarta.model.mapmodel.MapModel; import net.sf.gridarta.model.mapmodel.MapModelListener; import net.sf.gridarta.model.mapmodel.MapSquare; Modified: trunk/src/app/net/sf/gridarta/gui/map/MapFileActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/MapFileActions.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/map/MapFileActions.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -29,13 +29,13 @@ import net.sf.gridarta.gui.map.mapview.MapViewManagerListener; import net.sf.gridarta.gui.map.mapview.MapViewsManager; import net.sf.gridarta.gui.map.renderer.ImageCreator2; -import net.sf.gridarta.mapmanager.FileControl; -import net.sf.gridarta.mapmanager.MapManager; -import net.sf.gridarta.mapmanager.MapManagerListener; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.model.mapmanager.FileControl; +import net.sf.gridarta.model.mapmanager.MapManager; +import net.sf.gridarta.model.mapmanager.MapManagerListener; import net.sf.gridarta.model.mapmodel.MapModel; import net.sf.gridarta.model.mapmodel.MapModelListener; import net.sf.gridarta.model.mapmodel.MapSquare; Modified: trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapActions.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapActions.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -39,9 +39,6 @@ import net.sf.gridarta.gui.mappropertiesdialog.MapPropertiesDialogFactory; import net.sf.gridarta.gui.selectedsquare.SelectedSquareModel; import net.sf.gridarta.gui.shrinkmapsizedialog.ShrinkMapSizeDialogManager; -import net.sf.gridarta.mapmanager.FileControl; -import net.sf.gridarta.mapmanager.MapManager; -import net.sf.gridarta.mapmanager.MapManagerListener; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.direction.Direction; import net.sf.gridarta.model.exitconnector.ExitMatcher; @@ -51,6 +48,9 @@ import net.sf.gridarta.model.mapcursor.MapCursor; import net.sf.gridarta.model.mapcursor.MapCursorEvent; import net.sf.gridarta.model.mapcursor.MapCursorListener; +import net.sf.gridarta.model.mapmanager.FileControl; +import net.sf.gridarta.model.mapmanager.MapManager; +import net.sf.gridarta.model.mapmanager.MapManagerListener; import net.sf.gridarta.model.mapmodel.MapModel; import net.sf.gridarta.model.mappathnormalizer.IOErrorException; import net.sf.gridarta.model.mappathnormalizer.InvalidPathException; Modified: trunk/src/app/net/sf/gridarta/gui/map/maptilepane/AbstractMapTilePane.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/maptilepane/AbstractMapTilePane.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/map/maptilepane/AbstractMapTilePane.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -36,11 +36,11 @@ import net.sf.gridarta.actions.MapSizeMismatchException; import net.sf.gridarta.gui.utils.DirectionLayout; import net.sf.gridarta.gui.utils.GUIConstants; -import net.sf.gridarta.mapmanager.MapManager; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.direction.Direction; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; +import net.sf.gridarta.model.mapmanager.MapManager; import net.sf.gridarta.model.mapmodel.MapModel; import net.sf.gridarta.model.mappathnormalizer.MapPathNormalizer; import net.sf.gridarta.model.settings.GlobalSettings; Modified: trunk/src/app/net/sf/gridarta/gui/map/maptilepane/FlatMapTilePane.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/maptilepane/FlatMapTilePane.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/map/maptilepane/FlatMapTilePane.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -20,11 +20,11 @@ package net.sf.gridarta.gui.map.maptilepane; import javax.swing.filechooser.FileFilter; -import net.sf.gridarta.mapmanager.MapManager; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.direction.Direction; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; +import net.sf.gridarta.model.mapmanager.MapManager; import net.sf.gridarta.model.mapmodel.MapModel; import net.sf.gridarta.model.mappathnormalizer.MapPathNormalizer; import net.sf.gridarta.model.settings.GlobalSettings; Modified: trunk/src/app/net/sf/gridarta/gui/map/maptilepane/IsoMapTilePane.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/maptilepane/IsoMapTilePane.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/map/maptilepane/IsoMapTilePane.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -20,11 +20,11 @@ package net.sf.gridarta.gui.map.maptilepane; import javax.swing.filechooser.FileFilter; -import net.sf.gridarta.mapmanager.MapManager; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.direction.Direction; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; +import net.sf.gridarta.model.mapmanager.MapManager; import net.sf.gridarta.model.mapmodel.MapModel; import net.sf.gridarta.model.mappathnormalizer.MapPathNormalizer; import net.sf.gridarta.model.settings.GlobalSettings; Modified: trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewsManager.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewsManager.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewsManager.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -26,13 +26,13 @@ import java.util.Iterator; import java.util.List; import java.util.Map; -import net.sf.gridarta.mapmanager.FileControl; -import net.sf.gridarta.mapmanager.MapManager; -import net.sf.gridarta.mapmanager.MapManagerListener; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.model.mapmanager.FileControl; +import net.sf.gridarta.model.mapmanager.MapManager; +import net.sf.gridarta.model.mapmanager.MapManagerListener; import net.sf.gridarta.model.mapviewsettings.MapViewSettings; import net.sf.gridarta.model.mapviewsettings.MapViewSettingsListener; import org.jetbrains.annotations.NotNull; Modified: trunk/src/app/net/sf/gridarta/gui/map/renderer/ImageCreator.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/renderer/ImageCreator.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/map/renderer/ImageCreator.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -21,11 +21,11 @@ import java.io.File; import java.io.IOException; -import net.sf.gridarta.mapmanager.MapManager; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.model.mapmanager.MapManager; import net.sf.gridarta.model.mapmodel.MapModel; import net.sf.japi.swing.action.ActionBuilder; import net.sf.japi.swing.action.ActionBuilderFactory; Modified: trunk/src/app/net/sf/gridarta/gui/map/viewaction/ViewActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/viewaction/ViewActions.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/map/viewaction/ViewActions.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -24,12 +24,12 @@ import java.util.Comparator; import java.util.LinkedList; import java.util.List; -import net.sf.gridarta.mapmanager.MapManager; -import net.sf.gridarta.mapmanager.MapManagerListener; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.model.mapmanager.MapManager; +import net.sf.gridarta.model.mapmanager.MapManagerListener; import net.sf.gridarta.model.mapviewsettings.MapViewSettings; import net.sf.gridarta.model.mapviewsettings.MapViewSettingsListener; import net.sf.gridarta.model.match.NamedGameObjectMatcher; Modified: trunk/src/app/net/sf/gridarta/gui/mapdesktop/MapDesktop.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapdesktop/MapDesktop.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/mapdesktop/MapDesktop.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -37,12 +37,12 @@ import net.sf.gridarta.gui.map.mapview.MapViewsManager; import net.sf.gridarta.gui.mapimagecache.MapImageCache; import net.sf.gridarta.gui.mapimagecache.MapImageCacheListener; -import net.sf.gridarta.mapmanager.MapManager; -import net.sf.gridarta.mapmanager.MapManagerListener; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.model.mapmanager.MapManager; +import net.sf.gridarta.model.mapmanager.MapManagerListener; import net.sf.gridarta.utils.ActionUtils; import net.sf.japi.swing.action.ActionBuilder; import net.sf.japi.swing.action.ActionBuilderFactory; Modified: trunk/src/app/net/sf/gridarta/gui/mapdesktop/WindowAction.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapdesktop/WindowAction.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/mapdesktop/WindowAction.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -25,12 +25,12 @@ import javax.swing.AbstractAction; import javax.swing.KeyStroke; import net.sf.gridarta.gui.map.mapview.MapView; -import net.sf.gridarta.mapmanager.MapManager; -import net.sf.gridarta.mapmanager.MapManagerListener; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.model.mapmanager.MapManager; +import net.sf.gridarta.model.mapmanager.MapManagerListener; import net.sf.gridarta.model.mapmodel.MapModelListener; import net.sf.gridarta.model.mapmodel.MapSquare; import net.sf.gridarta.model.validation.ErrorCollector; Modified: trunk/src/app/net/sf/gridarta/gui/mapfiles/Loader.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapfiles/Loader.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/mapfiles/Loader.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -22,7 +22,6 @@ import java.io.File; import java.util.Arrays; import net.sf.gridarta.gui.map.mapview.MapViewsManager; -import net.sf.gridarta.mapmanager.MapManager; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.errorview.ErrorView; import net.sf.gridarta.model.errorview.ErrorViewCategory; @@ -30,6 +29,7 @@ import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.io.MapReaderFactory; import net.sf.gridarta.model.maparchobject.MapArchObject; +import net.sf.gridarta.model.mapmanager.MapManager; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; Modified: trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFile.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFile.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFile.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -25,13 +25,13 @@ import net.sf.gridarta.gui.map.mapview.MapView; import net.sf.gridarta.gui.map.mapview.MapViewBasic; import net.sf.gridarta.gui.map.mapview.MapViewsManager; -import net.sf.gridarta.mapmanager.MapManager; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.io.MapReader; import net.sf.gridarta.model.io.MapReaderFactory; import net.sf.gridarta.model.maparchobject.MapArchObject; import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.model.mapmanager.MapManager; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; Modified: trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolder.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolder.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolder.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -26,12 +26,12 @@ import java.util.Iterator; import java.util.List; import net.sf.gridarta.gui.map.mapview.MapViewsManager; -import net.sf.gridarta.mapmanager.MapManager; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.io.MapReaderFactory; import net.sf.gridarta.model.maparchobject.MapArchObject; import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.model.mapmanager.MapManager; import net.sf.gridarta.utils.EventListenerList2; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; Modified: trunk/src/app/net/sf/gridarta/gui/mapimagecache/MapImageCache.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapimagecache/MapImageCache.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/mapimagecache/MapImageCache.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -28,8 +28,6 @@ import java.util.Map; import net.sf.gridarta.gui.map.renderer.MapRenderer; import net.sf.gridarta.gui.map.renderer.RendererFactory; -import net.sf.gridarta.mapmanager.MapManager; -import net.sf.gridarta.mapmanager.MapManagerListener; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.io.CacheFiles; @@ -37,6 +35,8 @@ import net.sf.gridarta.model.mapcontrol.DefaultMapControl; import net.sf.gridarta.model.mapcontrol.MapControl; import net.sf.gridarta.model.mapcontrol.MapControlListener; +import net.sf.gridarta.model.mapmanager.MapManager; +import net.sf.gridarta.model.mapmanager.MapManagerListener; import net.sf.gridarta.utils.EventListenerList2; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; Modified: trunk/src/app/net/sf/gridarta/gui/mapmenu/AbstractMapMenuPreferences.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapmenu/AbstractMapMenuPreferences.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/mapmenu/AbstractMapMenuPreferences.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -27,10 +27,10 @@ import javax.swing.AbstractListModel; import net.sf.gridarta.gui.map.mapview.MapViewsManager; import net.sf.gridarta.gui.mapimagecache.MapImageCache; -import net.sf.gridarta.mapmanager.FileControl; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; +import net.sf.gridarta.model.mapmanager.FileControl; import net.sf.gridarta.model.settings.GlobalSettings; import org.jetbrains.annotations.NotNull; Modified: trunk/src/app/net/sf/gridarta/gui/mapmenu/BookmarksMapMenuPreferences.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapmenu/BookmarksMapMenuPreferences.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/mapmenu/BookmarksMapMenuPreferences.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -24,10 +24,10 @@ import net.sf.gridarta.MainControl; import net.sf.gridarta.gui.map.mapview.MapViewsManager; import net.sf.gridarta.gui.mapimagecache.MapImageCache; -import net.sf.gridarta.mapmanager.FileControl; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; +import net.sf.gridarta.model.mapmanager.FileControl; import net.sf.gridarta.model.settings.GlobalSettings; import net.sf.japi.swing.action.ActionBuilder; import net.sf.japi.swing.action.ActionBuilderFactory; Modified: trunk/src/app/net/sf/gridarta/gui/mapmenu/MapMenuEntry.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapmenu/MapMenuEntry.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/mapmenu/MapMenuEntry.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -27,10 +27,10 @@ import javax.swing.ImageIcon; import net.sf.gridarta.gui.map.mapview.MapViewsManager; import net.sf.gridarta.gui.mapimagecache.MapImageCache; -import net.sf.gridarta.mapmanager.FileControl; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; +import net.sf.gridarta.model.mapmanager.FileControl; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; Modified: trunk/src/app/net/sf/gridarta/gui/mapmenu/MapMenuManager.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapmenu/MapMenuManager.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/mapmenu/MapMenuManager.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -29,14 +29,14 @@ import javax.swing.event.ListDataEvent; import javax.swing.event.ListDataListener; import net.sf.gridarta.gui.utils.MenuUtils; -import net.sf.gridarta.mapmanager.MapManager; -import net.sf.gridarta.mapmanager.MapManagerListener; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; import net.sf.gridarta.model.mapcontrol.DefaultMapControl; import net.sf.gridarta.model.mapcontrol.MapControl; import net.sf.gridarta.model.mapcontrol.MapControlListener; +import net.sf.gridarta.model.mapmanager.MapManager; +import net.sf.gridarta.model.mapmanager.MapManagerListener; import net.sf.gridarta.model.mapmodel.MapModel; import net.sf.gridarta.model.mapmodel.MapModelListener; import net.sf.gridarta.model.mapmodel.MapSquare; Modified: trunk/src/app/net/sf/gridarta/gui/mapmenu/RecentMapMenuPreferences.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapmenu/RecentMapMenuPreferences.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/mapmenu/RecentMapMenuPreferences.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -25,10 +25,10 @@ import net.sf.gridarta.MainControl; import net.sf.gridarta.gui.map.mapview.MapViewsManager; import net.sf.gridarta.gui.mapimagecache.MapImageCache; -import net.sf.gridarta.mapmanager.FileControl; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; +import net.sf.gridarta.model.mapmanager.FileControl; import net.sf.gridarta.model.settings.GlobalSettings; import net.sf.japi.swing.action.ActionBuilder; import net.sf.japi.swing.action.ActionBuilderFactory; Modified: trunk/src/app/net/sf/gridarta/gui/mapuserlistener/MapUserListenerManager.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapuserlistener/MapUserListenerManager.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/mapuserlistener/MapUserListenerManager.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -25,12 +25,12 @@ import net.sf.gridarta.gui.map.mapview.MapViewsListener; import net.sf.gridarta.gui.map.mapview.MapViewsManager; import net.sf.gridarta.gui.map.tools.ToolPalette; -import net.sf.gridarta.mapmanager.MapManager; -import net.sf.gridarta.mapmanager.MapManagerListener; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.model.mapmanager.MapManager; +import net.sf.gridarta.model.mapmanager.MapManagerListener; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; Modified: trunk/src/app/net/sf/gridarta/gui/misc/DefaultFileControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/misc/DefaultFileControl.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/misc/DefaultFileControl.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -29,12 +29,12 @@ import net.sf.gridarta.gui.map.mapview.MapViewsManager; import net.sf.gridarta.gui.mapimagecache.MapImageCache; import net.sf.gridarta.gui.newmap.NewMapDialogFactory; -import net.sf.gridarta.mapmanager.FileControl; -import net.sf.gridarta.mapmanager.MapManager; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.model.mapmanager.FileControl; +import net.sf.gridarta.model.mapmanager.MapManager; import net.sf.gridarta.model.settings.GlobalSettings; import net.sf.gridarta.textedit.scripteditor.ScriptEditControl; import net.sf.gridarta.utils.ActionBuilderUtils; Modified: trunk/src/app/net/sf/gridarta/gui/misc/RecentManager.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/misc/RecentManager.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/misc/RecentManager.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -20,12 +20,12 @@ package net.sf.gridarta.gui.misc; import net.sf.gridarta.gui.mapmenu.MapMenuManager; -import net.sf.gridarta.mapmanager.MapManager; -import net.sf.gridarta.mapmanager.MapManagerListener; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.model.mapmanager.MapManager; +import net.sf.gridarta.model.mapmanager.MapManagerListener; import net.sf.gridarta.model.mapmodel.MapModel; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; Modified: trunk/src/app/net/sf/gridarta/gui/misc/StatusBar.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/misc/StatusBar.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/misc/StatusBar.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -36,8 +36,6 @@ import net.sf.gridarta.gui.map.mapview.MapViewManager; import net.sf.gridarta.gui.map.mapview.MapViewManagerListener; import net.sf.gridarta.gui.map.renderer.MapRenderer; -import net.sf.gridarta.mapmanager.MapManager; -import net.sf.gridarta.mapmanager.MapManagerListener; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.archetype.ArchetypeSet; import net.sf.gridarta.model.data.NamedObjects; @@ -50,6 +48,8 @@ import net.sf.gridarta.model.mapcursor.MapCursor; import net.sf.gridarta.model.mapcursor.MapCursorEvent; import net.sf.gridarta.model.mapcursor.MapCursorListener; +import net.sf.gridarta.model.mapmanager.MapManager; +import net.sf.gridarta.model.mapmanager.MapManagerListener; import net.sf.japi.swing.action.ActionBuilder; import net.sf.japi.swing.action.ActionBuilderFactory; import org.jetbrains.annotations.NotNull; Modified: trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -41,9 +41,6 @@ import net.sf.gridarta.gui.mapfiles.MapFolderTree; import net.sf.gridarta.gui.newmap.NewMapDialogFactory; import net.sf.gridarta.gui.objectchooser.ObjectChooserTab; -import net.sf.gridarta.mapmanager.FileControl; -import net.sf.gridarta.mapmanager.MapManager; -import net.sf.gridarta.mapmanager.MapManagerListener; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.io.MapReaderFactory; @@ -52,6 +49,9 @@ import net.sf.gridarta.model.mapcontrol.DefaultMapControl; import net.sf.gridarta.model.mapcontrol.MapControl; import net.sf.gridarta.model.mapcontrol.MapControlListener; +import net.sf.gridarta.model.mapmanager.FileControl; +import net.sf.gridarta.model.mapmanager.MapManager; +import net.sf.gridarta.model.mapmanager.MapManagerListener; import net.sf.gridarta.model.mapmodel.MapModelListener; import net.sf.gridarta.model.mapmodel.MapSquare; import net.sf.gridarta.model.pickmapsettings.PickmapSettings; Modified: trunk/src/app/net/sf/gridarta/gui/script/parameter/MapParameterCellRenderer.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/script/parameter/MapParameterCellRenderer.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/script/parameter/MapParameterCellRenderer.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -22,8 +22,8 @@ import java.awt.Component; import javax.swing.DefaultListCellRenderer; import javax.swing.JList; -import net.sf.gridarta.mapmanager.MapManager; import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.model.mapmanager.MapManager; import org.jetbrains.annotations.NotNull; public class MapParameterCellRenderer extends DefaultListCellRenderer { Modified: trunk/src/app/net/sf/gridarta/gui/script/parameter/MapParameterComboBoxModel.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/script/parameter/MapParameterComboBoxModel.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/script/parameter/MapParameterComboBoxModel.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -21,11 +21,11 @@ import java.util.List; import javax.swing.DefaultComboBoxModel; -import net.sf.gridarta.mapmanager.MapManager; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.model.mapmanager.MapManager; import org.jetbrains.annotations.NotNull; public class MapParameterComboBoxModel<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends DefaultComboBoxModel { Modified: trunk/src/app/net/sf/gridarta/gui/script/parameter/MapParameterView.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/script/parameter/MapParameterView.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/script/parameter/MapParameterView.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -25,10 +25,10 @@ import javax.swing.JComboBox; import javax.swing.JComponent; import javax.swing.JPanel; -import net.sf.gridarta.mapmanager.MapManager; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; +import net.sf.gridarta.model.mapmanager.MapManager; import net.sf.gridarta.script.parameter.MapParameter; import org.jetbrains.annotations.NotNull; Modified: trunk/src/app/net/sf/gridarta/gui/script/parameter/PluginParameterViewFactory.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/script/parameter/PluginParameterViewFactory.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/script/parameter/PluginParameterViewFactory.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -21,12 +21,12 @@ import net.sf.gridarta.gui.gameobjectattributespanel.GameObjectAttributesModel; import net.sf.gridarta.gui.objectchooser.ObjectChooser; -import net.sf.gridarta.mapmanager.MapManager; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.archetype.ArchetypeSet; import net.sf.gridarta.model.face.FaceObjectProviders; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; +import net.sf.gridarta.model.mapmanager.MapManager; import net.sf.gridarta.script.parameter.ArchParameter; import net.sf.gridarta.script.parameter.BooleanParameter; import net.sf.gridarta.script.parameter.DoubleParameter; Modified: trunk/src/app/net/sf/gridarta/gui/scripts/DefaultScriptArchEditor.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/scripts/DefaultScriptArchEditor.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/scripts/DefaultScriptArchEditor.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -44,11 +44,11 @@ import javax.swing.WindowConstants; import javax.swing.filechooser.FileFilter; import javax.swing.text.JTextComponent; -import net.sf.gridarta.mapmanager.MapManager; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.io.PathManager; import net.sf.gridarta.model.maparchobject.MapArchObject; +import net.sf.gridarta.model.mapmanager.MapManager; import net.sf.gridarta.model.scripts.ScriptArchData; import net.sf.gridarta.model.scripts.ScriptArchUtils; import net.sf.gridarta.model.scripts.ScriptUtils; Modified: trunk/src/app/net/sf/gridarta/gui/scripts/ScriptArchDataUtils.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/scripts/ScriptArchDataUtils.java 2010-11-07 12:35:35 UTC (rev 8773) +++ trunk/src/app/net/sf/gridarta/gui/scripts/ScriptArchDataUtils.java 2010-11-08 08:38:49 UTC (rev 8774) @@ -22,10 +22,10 @@ import java.awt.Frame; import javax.swing.JList; import javax.swing.JOptionPane; -import net.sf.gridarta.mapmanager.MapManager; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; +import net.sf.gridarta.model.mapmanager.MapManager; import net.sf.gridarta.model.scripts.ScriptArchUtils; impo... [truncated message content] |
From: <aki...@us...> - 2010-11-07 12:35:42
|
Revision: 8773 http://gridarta.svn.sourceforge.net/gridarta/?rev=8773&view=rev Author: akirschbaum Date: 2010-11-07 12:35:35 +0000 (Sun, 07 Nov 2010) Log Message: ----------- Move 'gui' class GUIConstants out of utils module. Added Paths: ----------- trunk/src/app/net/sf/gridarta/gui/utils/GUIConstants.java Removed Paths: ------------- trunk/utils/src/app/net/sf/gridarta/gui/ Copied: trunk/src/app/net/sf/gridarta/gui/utils/GUIConstants.java (from rev 8772, trunk/utils/src/app/net/sf/gridarta/gui/utils/GUIConstants.java) =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/GUIConstants.java (rev 0) +++ trunk/src/app/net/sf/gridarta/gui/utils/GUIConstants.java 2010-11-07 12:35:35 UTC (rev 8773) @@ -0,0 +1,40 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * 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 2 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.gui.utils; + +import java.awt.Insets; +import javax.swing.border.Border; +import javax.swing.border.EmptyBorder; + +/** + * Defines common UI constants used in different dialogs. + * @author <a href="mailto:mic...@no...">Michael Toennies</a> + * @author <a href="mailto:and...@gm...">Andreas Vogl</a> + * @author Andreas Kirschbaum + * @noinspection InterfaceNeverImplemented + */ +public interface GUIConstants { + + /** + * The Border object to be used when creating dialogs. + */ + Border DIALOG_BORDER = new EmptyBorder(new Insets(4, 4, 4, 4)); + +} // interface GUIConstants Property changes on: trunk/src/app/net/sf/gridarta/gui/utils/GUIConstants.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-11-07 12:17:57
|
Revision: 8772 http://gridarta.svn.sourceforge.net/gridarta/?rev=8772&view=rev Author: akirschbaum Date: 2010-11-07 12:17:48 +0000 (Sun, 07 Nov 2010) Log Message: ----------- Do not consider FileFilters 'gui' code. Modified Paths: -------------- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/maincontrol/DefaultEditorFactory.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/maincontrol/DefaultEditorFactory.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/maincontrol/DefaultEditorFactory.java trunk/model/src/app/net/sf/gridarta/model/resource/AbstractFilesResourcesReader.java trunk/src/app/net/sf/gridarta/gui/map/renderer/ImageCreator2.java trunk/src/app/net/sf/gridarta/gui/misc/MapPreview.java trunk/src/app/net/sf/gridarta/gui/prefs/MiscPreferences.java trunk/src/app/net/sf/gridarta/maincontrol/DefaultMainControl.java trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java Added Paths: ----------- trunk/utils/src/app/net/sf/gridarta/utils/FileFilters.java trunk/utils/src/app/net/sf/gridarta/utils/GuiFileFilters.java trunk/utils/src/app/net/sf/gridarta/utils/HideFileFilterProxy.java trunk/utils/src/app/net/sf/gridarta/utils/MapFileFilter.java trunk/utils/src/test/net/sf/gridarta/utils/HideFileFilterProxyTest.java Removed Paths: ------------- trunk/src/app/net/sf/gridarta/gui/io/GuiFileFilters.java trunk/src/app/net/sf/gridarta/gui/utils/MapFileFilter.java trunk/utils/src/app/net/sf/gridarta/gui/utils/FileFilters.java trunk/utils/src/app/net/sf/gridarta/gui/utils/HideFileFilterProxy.java trunk/utils/src/test/net/sf/gridarta/gui/utils/HideFileFilterProxyTest.java Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/maincontrol/DefaultEditorFactory.java =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/maincontrol/DefaultEditorFactory.java 2010-11-07 12:05:25 UTC (rev 8771) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/maincontrol/DefaultEditorFactory.java 2010-11-07 12:17:48 UTC (rev 8772) @@ -23,7 +23,6 @@ import java.io.IOException; import java.net.URL; import net.sf.gridarta.gui.filter.FilterControl; -import net.sf.gridarta.gui.io.GuiFileFilters; import net.sf.gridarta.gui.map.mapview.DefaultMapViewFactory; import net.sf.gridarta.gui.map.mapview.MapViewFactory; import net.sf.gridarta.gui.map.mapview.MapViewsManager; @@ -100,6 +99,7 @@ import net.sf.gridarta.script.ScriptParameters; import net.sf.gridarta.script.parameter.PluginParameterFactory; import net.sf.gridarta.utils.GUIUtils; +import net.sf.gridarta.utils.GuiFileFilters; import net.sf.gridarta.utils.IOUtils; import net.sf.gridarta.utils.SystemIcons; import net.sf.gridarta.var.atrinik.IGUIConstants; Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/maincontrol/DefaultEditorFactory.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/maincontrol/DefaultEditorFactory.java 2010-11-07 12:05:25 UTC (rev 8771) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/maincontrol/DefaultEditorFactory.java 2010-11-07 12:17:48 UTC (rev 8772) @@ -21,7 +21,6 @@ import java.awt.Component; import net.sf.gridarta.gui.filter.FilterControl; -import net.sf.gridarta.gui.io.GuiFileFilters; import net.sf.gridarta.gui.map.mapview.DefaultMapViewFactory; import net.sf.gridarta.gui.map.mapview.MapViewFactory; import net.sf.gridarta.gui.map.mapview.MapViewsManager; @@ -96,6 +95,7 @@ import net.sf.gridarta.script.parameter.PluginParameterFactory; import net.sf.gridarta.utils.ConfigFileUtils; import net.sf.gridarta.utils.GUIUtils; +import net.sf.gridarta.utils.GuiFileFilters; import net.sf.gridarta.utils.SystemIcons; import net.sf.gridarta.var.crossfire.IGUIConstants; import net.sf.gridarta.var.crossfire.gui.map.renderer.DefaultRendererFactory; Modified: trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/maincontrol/DefaultEditorFactory.java =================================================================== --- trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/maincontrol/DefaultEditorFactory.java 2010-11-07 12:05:25 UTC (rev 8771) +++ trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/maincontrol/DefaultEditorFactory.java 2010-11-07 12:17:48 UTC (rev 8772) @@ -23,7 +23,6 @@ import java.io.IOException; import java.net.URL; import net.sf.gridarta.gui.filter.FilterControl; -import net.sf.gridarta.gui.io.GuiFileFilters; import net.sf.gridarta.gui.map.mapview.DefaultMapViewFactory; import net.sf.gridarta.gui.map.mapview.MapViewFactory; import net.sf.gridarta.gui.map.mapview.MapViewsManager; @@ -100,6 +99,7 @@ import net.sf.gridarta.script.ScriptParameters; import net.sf.gridarta.script.parameter.PluginParameterFactory; import net.sf.gridarta.utils.GUIUtils; +import net.sf.gridarta.utils.GuiFileFilters; import net.sf.gridarta.utils.IOUtils; import net.sf.gridarta.utils.SystemIcons; import net.sf.gridarta.var.daimonin.IGUIConstants; Modified: trunk/model/src/app/net/sf/gridarta/model/resource/AbstractFilesResourcesReader.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/resource/AbstractFilesResourcesReader.java 2010-11-07 12:05:25 UTC (rev 8771) +++ trunk/model/src/app/net/sf/gridarta/model/resource/AbstractFilesResourcesReader.java 2010-11-07 12:17:48 UTC (rev 8772) @@ -29,7 +29,6 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; -import net.sf.gridarta.gui.utils.FileFilters; import net.sf.gridarta.model.anim.AnimationObjects; import net.sf.gridarta.model.anim.AnimationParseException; import net.sf.gridarta.model.archetype.AbstractArchetypeParser; @@ -44,6 +43,7 @@ import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.io.AnimationObjectsReader; import net.sf.gridarta.model.maparchobject.MapArchObject; +import net.sf.gridarta.utils.FileFilters; import net.sf.gridarta.utils.Pair; import org.apache.log4j.Category; import org.apache.log4j.Logger; Deleted: trunk/src/app/net/sf/gridarta/gui/io/GuiFileFilters.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/io/GuiFileFilters.java 2010-11-07 12:05:25 UTC (rev 8771) +++ trunk/src/app/net/sf/gridarta/gui/io/GuiFileFilters.java 2010-11-07 12:17:48 UTC (rev 8772) @@ -1,62 +0,0 @@ -/* - * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. - * Copyright (C) 2000-2010 The Gridarta Developers. - * - * 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 2 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, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -package net.sf.gridarta.gui.io; - -import javax.swing.filechooser.FileFilter; -import net.sf.gridarta.gui.utils.HideFileFilterProxy; -import net.sf.gridarta.gui.utils.MapFileFilter; -import net.sf.gridarta.utils.ActionBuilderUtils; -import net.sf.japi.swing.action.ActionBuilder; -import net.sf.japi.swing.action.ActionBuilderFactory; -import net.sf.japi.util.filter.file.EndingFileFilter; - -/** - * Utility class defining {@link FileFilter}s. - * @author Andreas Kirschbaum - */ -public class GuiFileFilters { - - /** - * Action Builder. - */ - private static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta"); - - /** - * Private constructor to prevent instantiation. - */ - private GuiFileFilters() { - } - - /** - * Swing FileFilter for map files. - */ - public static final FileFilter mapFileFilter = new HideFileFilterProxy(new MapFileFilter(true, ActionBuilderUtils.getString(ACTION_BUILDER, "fileDialog.filter.maps"), ".lua", ".py", ".txt", ".text")); - - /** - * Swing FileFilter for Python scripts. - */ - public static final FileFilter pythonFileFilter = new HideFileFilterProxy(new EndingFileFilter(true, ActionBuilderUtils.getString(ACTION_BUILDER, "fileDialog.filter.python"), ".py")); - - /** - * Swing FileFilter for Lua scripts. - */ - public static final FileFilter luaFileFilter = new HideFileFilterProxy(new EndingFileFilter(true, ActionBuilderUtils.getString(ACTION_BUILDER, "fileDialog.filter.lua"), ".lua")); - -} // class FileFilters Modified: trunk/src/app/net/sf/gridarta/gui/map/renderer/ImageCreator2.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/renderer/ImageCreator2.java 2010-11-07 12:05:25 UTC (rev 8771) +++ trunk/src/app/net/sf/gridarta/gui/map/renderer/ImageCreator2.java 2010-11-07 12:17:48 UTC (rev 8772) @@ -24,13 +24,13 @@ import java.io.IOException; import javax.swing.JFileChooser; import javax.swing.JOptionPane; -import net.sf.gridarta.gui.utils.FileFilters; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; import net.sf.gridarta.model.mapmodel.MapModel; import net.sf.gridarta.model.settings.GlobalSettings; import net.sf.gridarta.utils.FileChooserUtils; +import net.sf.gridarta.utils.FileFilters; import net.sf.japi.swing.action.ActionBuilder; import net.sf.japi.swing.action.ActionBuilderFactory; import org.jetbrains.annotations.NotNull; Modified: trunk/src/app/net/sf/gridarta/gui/misc/MapPreview.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/misc/MapPreview.java 2010-11-07 12:05:25 UTC (rev 8771) +++ trunk/src/app/net/sf/gridarta/gui/misc/MapPreview.java 2010-11-07 12:17:48 UTC (rev 8772) @@ -34,7 +34,7 @@ import javax.swing.JFrame; import javax.swing.JScrollPane; import javax.swing.WindowConstants; -import net.sf.gridarta.gui.utils.FileFilters; +import net.sf.gridarta.utils.FileFilters; import net.sf.japi.swing.action.ActionBuilder; import net.sf.japi.swing.action.ActionBuilderFactory; import net.sf.japi.swing.action.ActionMethod; Modified: trunk/src/app/net/sf/gridarta/gui/prefs/MiscPreferences.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/prefs/MiscPreferences.java 2010-11-07 12:05:25 UTC (rev 8771) +++ trunk/src/app/net/sf/gridarta/gui/prefs/MiscPreferences.java 2010-11-07 12:17:48 UTC (rev 8772) @@ -34,10 +34,10 @@ import javax.swing.event.ChangeListener; import javax.swing.text.JTextComponent; import net.sf.gridarta.gui.utils.GUIConstants; -import net.sf.gridarta.gui.utils.MapFileFilter; import net.sf.gridarta.model.exitconnector.ExitConnectorModel; import net.sf.gridarta.model.settings.GlobalSettings; import net.sf.gridarta.utils.ActionBuilderUtils; +import net.sf.gridarta.utils.MapFileFilter; import net.sf.japi.swing.action.ActionBuilder; import net.sf.japi.swing.action.ActionBuilderFactory; import net.sf.japi.swing.prefs.AbstractPrefs; Deleted: trunk/src/app/net/sf/gridarta/gui/utils/MapFileFilter.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/MapFileFilter.java 2010-11-07 12:05:25 UTC (rev 8771) +++ trunk/src/app/net/sf/gridarta/gui/utils/MapFileFilter.java 2010-11-07 12:17:48 UTC (rev 8772) @@ -1,130 +0,0 @@ -/* - * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. - * Copyright (C) 2000-2010 The Gridarta Developers. - * - * 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 2 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, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -package net.sf.gridarta.gui.utils; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.util.Map; -import java.util.WeakHashMap; -import java.util.prefs.Preferences; -import net.sf.gridarta.MainControl; -import net.sf.japi.util.filter.file.EndingFileFilter; -import org.jetbrains.annotations.NotNull; - -/** - * Swing FileFilter implementation that filters Daimonin map files. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> - */ -public class MapFileFilter extends EndingFileFilter { - - /** - * Whether to actually perform real checks or just file endings. - * <code>true</code> = real checks, <code>false</code> = file endings only. - */ - private static boolean performingRealChecks = Preferences.userNodeForPackage(MainControl.class).getBoolean("filterRealMaps", true); - - /** - * Already filtered files. Key: File Value: Boolean information whether or - * not the file should be accepted (<code>true</code> == accept, - * <code>false</code> == reject) - */ - @NotNull - private final Map<File, Boolean> cache = new WeakHashMap<File, Boolean>(); - - /** - * Creates a new instance. - * @param acceptDirectories whether the file filter should accept - * directories - * @param description the description to use for Swing - * @param endings the endings to accept, including their period - */ - public MapFileFilter(final boolean acceptDirectories, @NotNull final String description, @NotNull final String... endings) { - super(acceptDirectories, true, description, endings); - } - - /** - * Set whether to actually perform real checks or just file endings. - * @param performingRealChecks <code>true</code> for performing real checks, - * <code>false</code> to compare only file endings - */ - public static void setPerformingRealChecks(final boolean performingRealChecks) { - MapFileFilter.performingRealChecks = performingRealChecks; - Preferences.userNodeForPackage(MainControl.class).putBoolean("filterRealMaps", performingRealChecks); - } - - /** - * Get whether to actually perform real checks or just file endings. - * @return <code>true</code> for performing real checks, <code>false</code> - * to compare only file endings - */ - public static boolean isPerformingRealChecks() { - return performingRealChecks; - } - - /** - * {@inheritDoc} - * @noinspection ParameterNameDiffersFromOverriddenParameter - */ - @Override - public boolean accept(@NotNull final File pathName) { - if (pathName.isDirectory()) { - return true; - } - - //NullPointerException is expected when no mapping exists - //noinspection ProhibitedExceptionCaught - try { - return cache.get(pathName); - } catch (final NullPointerException ignored) { - } - - if (!performingRealChecks) { - return super.accept(pathName); - } - - try { - final FileInputStream fis = new FileInputStream(pathName); - try { - final InputStreamReader isr = new InputStreamReader(fis); - try { - final BufferedReader in = new BufferedReader(isr); - try { - final String line = in.readLine(); - final boolean ret = line != null && line.equals("arch map"); - cache.put(pathName, ret ? Boolean.TRUE : Boolean.FALSE); - return ret; - } finally { - in.close(); - } - } finally { - isr.close(); - } - } finally { - fis.close(); - } - } catch (final IOException ignored) { - return super.accept(pathName); - } - } - -} // class MapFileFilter Modified: trunk/src/app/net/sf/gridarta/maincontrol/DefaultMainControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/DefaultMainControl.java 2010-11-07 12:05:25 UTC (rev 8771) +++ trunk/src/app/net/sf/gridarta/maincontrol/DefaultMainControl.java 2010-11-07 12:17:48 UTC (rev 8772) @@ -33,7 +33,6 @@ import javax.xml.parsers.ParserConfigurationException; import net.sf.gridarta.gui.archetypetype.ArchetypeTypeChecks; import net.sf.gridarta.gui.filter.FilterControl; -import net.sf.gridarta.gui.io.GuiFileFilters; import net.sf.gridarta.gui.map.renderer.RendererFactory; import net.sf.gridarta.gui.scripts.DefaultScriptArchEditor; import net.sf.gridarta.gui.scripts.ScriptArchDataUtils; @@ -104,6 +103,7 @@ import net.sf.gridarta.script.ScriptParameters; import net.sf.gridarta.script.parameter.PluginParameterFactory; import net.sf.gridarta.utils.CommonConstants; +import net.sf.gridarta.utils.GuiFileFilters; import net.sf.gridarta.utils.IOUtils; import net.sf.gridarta.utils.SystemIcons; import net.sf.gridarta.utils.XmlHelper; Modified: trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2010-11-07 12:05:25 UTC (rev 8771) +++ trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2010-11-07 12:17:48 UTC (rev 8772) @@ -56,7 +56,6 @@ import net.sf.gridarta.gui.gameobjectattributespanel.GameObjectAttributesModel; import net.sf.gridarta.gui.gameobjectattributespanel.MsgTextTab; import net.sf.gridarta.gui.gameobjectattributespanel.TextEditorTab; -import net.sf.gridarta.gui.io.GuiFileFilters; import net.sf.gridarta.gui.mainwindow.GameObjectTab; import net.sf.gridarta.gui.mainwindow.WarningsTab; import net.sf.gridarta.gui.map.MapFileActions; @@ -173,6 +172,7 @@ import net.sf.gridarta.updater.UpdaterManager; import net.sf.gridarta.utils.ActionUtils; import net.sf.gridarta.utils.Exiter; +import net.sf.gridarta.utils.GuiFileFilters; import net.sf.gridarta.utils.ProcessRunner; import net.sf.gridarta.utils.SystemIcons; import net.sf.japi.swing.action.ActionBuilder; Deleted: trunk/utils/src/app/net/sf/gridarta/gui/utils/FileFilters.java =================================================================== --- trunk/utils/src/app/net/sf/gridarta/gui/utils/FileFilters.java 2010-11-07 12:05:25 UTC (rev 8771) +++ trunk/utils/src/app/net/sf/gridarta/gui/utils/FileFilters.java 2010-11-07 12:17:48 UTC (rev 8772) @@ -1,71 +0,0 @@ -/* - * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. - * Copyright (C) 2000-2010 The Gridarta Developers. - * - * 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 2 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, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -package net.sf.gridarta.gui.utils; - -import javax.swing.filechooser.FileFilter; -import net.sf.gridarta.utils.ActionBuilderUtils; -import net.sf.japi.swing.action.ActionBuilder; -import net.sf.japi.swing.action.ActionBuilderFactory; -import net.sf.japi.util.filter.file.EndingFileFilter; -import org.jetbrains.annotations.NotNull; - -/** - * Utility class defining {@link FileFilter}s. - * @author Andreas Kirschbaum - */ -public class FileFilters { - - /** - * Action Builder. - */ - @NotNull - private static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta"); - - /** - * Private constructor to prevent instantiation. - */ - private FileFilters() { - } - - /** - * Swing FileFilter for .arc files. - */ - @NotNull - public static final FileFilter arcFileFilter = new HideFileFilterProxy(new EndingFileFilter(true, ActionBuilderUtils.getString(ACTION_BUILDER, "fileDialog.filter.arc"), ".arc")); - - /** - * Swing FileFilter for .anim files. - */ - @NotNull - public static final FileFilter animFileFilter = new HideFileFilterProxy(new EndingFileFilter(true, ActionBuilderUtils.getString(ACTION_BUILDER, "fileDialog.filter.anim"), ".anim")); - - /** - * Swing FileFilter for .face files. - */ - @NotNull - public static final FileFilter faceFileFilter = new HideFileFilterProxy(new EndingFileFilter(true, ActionBuilderUtils.getString(ACTION_BUILDER, "fileDialog.filter.face"), ".face")); - - /** - * Swing FileFilter for png graphics. - */ - @NotNull - public static final FileFilter pngFileFilter = new HideFileFilterProxy(new EndingFileFilter(true, ActionBuilderUtils.getString(ACTION_BUILDER, "fileDialog.filter.png"), ".png")); - -} // class FileFilters Deleted: trunk/utils/src/app/net/sf/gridarta/gui/utils/HideFileFilterProxy.java =================================================================== --- trunk/utils/src/app/net/sf/gridarta/gui/utils/HideFileFilterProxy.java 2010-11-07 12:05:25 UTC (rev 8771) +++ trunk/utils/src/app/net/sf/gridarta/gui/utils/HideFileFilterProxy.java 2010-11-07 12:17:48 UTC (rev 8772) @@ -1,90 +0,0 @@ -/* - * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. - * Copyright (C) 2000-2010 The Gridarta Developers. - * - * 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 2 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, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -package net.sf.gridarta.gui.utils; - -import java.io.File; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import javax.swing.filechooser.FileFilter; -import net.sf.japi.util.filter.file.AbstractFileFilter; -import org.jetbrains.annotations.NotNull; - -/** - * A FileFilter that wraps another FileFilter and filters out CVS and .xvpics - * files. The description and other filtering are taken from the wrapped file - * filter. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> - */ -public class HideFileFilterProxy extends AbstractFileFilter { - - /** - * The other file filter. - */ - @NotNull - private final FileFilter other; - - /** - * The default rejected directory names. - */ - @NotNull - private static final Collection<String> REJECTED_DIRECTORY_NAMES = Arrays.asList("CVS"); - - /** - * The rejected directory names. - */ - @NotNull - private final Collection<String> rejectedDirectoryNames = new ArrayList<String>(); - - /** - * Create a HideFileFilterProxy. - * @param other FileFilter to wrap - */ - public HideFileFilterProxy(@NotNull final FileFilter other) { - this.other = other; - rejectedDirectoryNames.addAll(REJECTED_DIRECTORY_NAMES); - } - - /** - * {@inheritDoc} Returns the description from the {@link #other} - * FileFilter. - */ - @NotNull - @Override - public String getDescription() { - return other.getDescription(); - } - - /** - * {@inheritDoc} First checks whether the file should be hidden, if not, - * checks the other FileFilter. - */ - @SuppressWarnings({ "ParameterNameDiffersFromOverriddenParameter" }) - @Override - public boolean accept(@NotNull final File pathName) { - if (pathName.getName().startsWith(".")) { - return false; - } - // XXX suppression for Bug in IDEA - //noinspection RedundantCast - return !(pathName.isDirectory() && rejectedDirectoryNames.contains(pathName.getName())) && ((java.io.FileFilter) other).accept(pathName); - } - -} // class HideFileFilterProxy Copied: trunk/utils/src/app/net/sf/gridarta/utils/FileFilters.java (from rev 8771, trunk/utils/src/app/net/sf/gridarta/gui/utils/FileFilters.java) =================================================================== --- trunk/utils/src/app/net/sf/gridarta/utils/FileFilters.java (rev 0) +++ trunk/utils/src/app/net/sf/gridarta/utils/FileFilters.java 2010-11-07 12:17:48 UTC (rev 8772) @@ -0,0 +1,70 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * 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 2 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.utils; + +import javax.swing.filechooser.FileFilter; +import net.sf.japi.swing.action.ActionBuilder; +import net.sf.japi.swing.action.ActionBuilderFactory; +import net.sf.japi.util.filter.file.EndingFileFilter; +import org.jetbrains.annotations.NotNull; + +/** + * Utility class defining {@link FileFilter}s. + * @author Andreas Kirschbaum + */ +public class FileFilters { + + /** + * Action Builder. + */ + @NotNull + private static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta"); + + /** + * Private constructor to prevent instantiation. + */ + private FileFilters() { + } + + /** + * Swing FileFilter for .arc files. + */ + @NotNull + public static final FileFilter arcFileFilter = new HideFileFilterProxy(new EndingFileFilter(true, ActionBuilderUtils.getString(ACTION_BUILDER, "fileDialog.filter.arc"), ".arc")); + + /** + * Swing FileFilter for .anim files. + */ + @NotNull + public static final FileFilter animFileFilter = new HideFileFilterProxy(new EndingFileFilter(true, ActionBuilderUtils.getString(ACTION_BUILDER, "fileDialog.filter.anim"), ".anim")); + + /** + * Swing FileFilter for .face files. + */ + @NotNull + public static final FileFilter faceFileFilter = new HideFileFilterProxy(new EndingFileFilter(true, ActionBuilderUtils.getString(ACTION_BUILDER, "fileDialog.filter.face"), ".face")); + + /** + * Swing FileFilter for png graphics. + */ + @NotNull + public static final FileFilter pngFileFilter = new HideFileFilterProxy(new EndingFileFilter(true, ActionBuilderUtils.getString(ACTION_BUILDER, "fileDialog.filter.png"), ".png")); + +} // class FileFilters Property changes on: trunk/utils/src/app/net/sf/gridarta/utils/FileFilters.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Copied: trunk/utils/src/app/net/sf/gridarta/utils/GuiFileFilters.java (from rev 8769, trunk/src/app/net/sf/gridarta/gui/io/GuiFileFilters.java) =================================================================== --- trunk/utils/src/app/net/sf/gridarta/utils/GuiFileFilters.java (rev 0) +++ trunk/utils/src/app/net/sf/gridarta/utils/GuiFileFilters.java 2010-11-07 12:17:48 UTC (rev 8772) @@ -0,0 +1,59 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * 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 2 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.utils; + +import javax.swing.filechooser.FileFilter; +import net.sf.japi.swing.action.ActionBuilder; +import net.sf.japi.swing.action.ActionBuilderFactory; +import net.sf.japi.util.filter.file.EndingFileFilter; + +/** + * Utility class defining {@link FileFilter}s. + * @author Andreas Kirschbaum + */ +public class GuiFileFilters { + + /** + * Action Builder. + */ + private static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta"); + + /** + * Private constructor to prevent instantiation. + */ + private GuiFileFilters() { + } + + /** + * Swing FileFilter for map files. + */ + public static final FileFilter mapFileFilter = new HideFileFilterProxy(new MapFileFilter(true, ActionBuilderUtils.getString(ACTION_BUILDER, "fileDialog.filter.maps"), ".lua", ".py", ".txt", ".text")); + + /** + * Swing FileFilter for Python scripts. + */ + public static final FileFilter pythonFileFilter = new HideFileFilterProxy(new EndingFileFilter(true, ActionBuilderUtils.getString(ACTION_BUILDER, "fileDialog.filter.python"), ".py")); + + /** + * Swing FileFilter for Lua scripts. + */ + public static final FileFilter luaFileFilter = new HideFileFilterProxy(new EndingFileFilter(true, ActionBuilderUtils.getString(ACTION_BUILDER, "fileDialog.filter.lua"), ".lua")); + +} // class FileFilters Property changes on: trunk/utils/src/app/net/sf/gridarta/utils/GuiFileFilters.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Copied: trunk/utils/src/app/net/sf/gridarta/utils/HideFileFilterProxy.java (from rev 8771, trunk/utils/src/app/net/sf/gridarta/gui/utils/HideFileFilterProxy.java) =================================================================== --- trunk/utils/src/app/net/sf/gridarta/utils/HideFileFilterProxy.java (rev 0) +++ trunk/utils/src/app/net/sf/gridarta/utils/HideFileFilterProxy.java 2010-11-07 12:17:48 UTC (rev 8772) @@ -0,0 +1,90 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * 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 2 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.utils; + +import java.io.File; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import javax.swing.filechooser.FileFilter; +import net.sf.japi.util.filter.file.AbstractFileFilter; +import org.jetbrains.annotations.NotNull; + +/** + * A FileFilter that wraps another FileFilter and filters out CVS and .xvpics + * files. The description and other filtering are taken from the wrapped file + * filter. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public class HideFileFilterProxy extends AbstractFileFilter { + + /** + * The other file filter. + */ + @NotNull + private final FileFilter other; + + /** + * The default rejected directory names. + */ + @NotNull + private static final Collection<String> REJECTED_DIRECTORY_NAMES = Arrays.asList("CVS"); + + /** + * The rejected directory names. + */ + @NotNull + private final Collection<String> rejectedDirectoryNames = new ArrayList<String>(); + + /** + * Create a HideFileFilterProxy. + * @param other FileFilter to wrap + */ + public HideFileFilterProxy(@NotNull final FileFilter other) { + this.other = other; + rejectedDirectoryNames.addAll(REJECTED_DIRECTORY_NAMES); + } + + /** + * {@inheritDoc} Returns the description from the {@link #other} + * FileFilter. + */ + @NotNull + @Override + public String getDescription() { + return other.getDescription(); + } + + /** + * {@inheritDoc} First checks whether the file should be hidden, if not, + * checks the other FileFilter. + */ + @SuppressWarnings({ "ParameterNameDiffersFromOverriddenParameter" }) + @Override + public boolean accept(@NotNull final File pathName) { + if (pathName.getName().startsWith(".")) { + return false; + } + // XXX suppression for Bug in IDEA + //noinspection RedundantCast + return !(pathName.isDirectory() && rejectedDirectoryNames.contains(pathName.getName())) && ((java.io.FileFilter) other).accept(pathName); + } + +} // class HideFileFilterProxy Property changes on: trunk/utils/src/app/net/sf/gridarta/utils/HideFileFilterProxy.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Copied: trunk/utils/src/app/net/sf/gridarta/utils/MapFileFilter.java (from rev 8769, trunk/src/app/net/sf/gridarta/gui/utils/MapFileFilter.java) =================================================================== --- trunk/utils/src/app/net/sf/gridarta/utils/MapFileFilter.java (rev 0) +++ trunk/utils/src/app/net/sf/gridarta/utils/MapFileFilter.java 2010-11-07 12:17:48 UTC (rev 8772) @@ -0,0 +1,130 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * 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 2 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.utils; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.util.Map; +import java.util.WeakHashMap; +import java.util.prefs.Preferences; +import net.sf.gridarta.MainControl; +import net.sf.japi.util.filter.file.EndingFileFilter; +import org.jetbrains.annotations.NotNull; + +/** + * Swing FileFilter implementation that filters Daimonin map files. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public class MapFileFilter extends EndingFileFilter { + + /** + * Whether to actually perform real checks or just file endings. + * <code>true</code> = real checks, <code>false</code> = file endings only. + */ + private static boolean performingRealChecks = Preferences.userNodeForPackage(MainControl.class).getBoolean("filterRealMaps", true); + + /** + * Already filtered files. Key: File Value: Boolean information whether or + * not the file should be accepted (<code>true</code> == accept, + * <code>false</code> == reject) + */ + @NotNull + private final Map<File, Boolean> cache = new WeakHashMap<File, Boolean>(); + + /** + * Creates a new instance. + * @param acceptDirectories whether the file filter should accept + * directories + * @param description the description to use for Swing + * @param endings the endings to accept, including their period + */ + public MapFileFilter(final boolean acceptDirectories, @NotNull final String description, @NotNull final String... endings) { + super(acceptDirectories, true, description, endings); + } + + /** + * Set whether to actually perform real checks or just file endings. + * @param performingRealChecks <code>true</code> for performing real checks, + * <code>false</code> to compare only file endings + */ + public static void setPerformingRealChecks(final boolean performingRealChecks) { + MapFileFilter.performingRealChecks = performingRealChecks; + Preferences.userNodeForPackage(MainControl.class).putBoolean("filterRealMaps", performingRealChecks); + } + + /** + * Get whether to actually perform real checks or just file endings. + * @return <code>true</code> for performing real checks, <code>false</code> + * to compare only file endings + */ + public static boolean isPerformingRealChecks() { + return performingRealChecks; + } + + /** + * {@inheritDoc} + * @noinspection ParameterNameDiffersFromOverriddenParameter + */ + @Override + public boolean accept(@NotNull final File pathName) { + if (pathName.isDirectory()) { + return true; + } + + //NullPointerException is expected when no mapping exists + //noinspection ProhibitedExceptionCaught + try { + return cache.get(pathName); + } catch (final NullPointerException ignored) { + } + + if (!performingRealChecks) { + return super.accept(pathName); + } + + try { + final FileInputStream fis = new FileInputStream(pathName); + try { + final InputStreamReader isr = new InputStreamReader(fis); + try { + final BufferedReader in = new BufferedReader(isr); + try { + final String line = in.readLine(); + final boolean ret = line != null && line.equals("arch map"); + cache.put(pathName, ret ? Boolean.TRUE : Boolean.FALSE); + return ret; + } finally { + in.close(); + } + } finally { + isr.close(); + } + } finally { + fis.close(); + } + } catch (final IOException ignored) { + return super.accept(pathName); + } + } + +} // class MapFileFilter Property changes on: trunk/utils/src/app/net/sf/gridarta/utils/MapFileFilter.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Deleted: trunk/utils/src/test/net/sf/gridarta/gui/utils/HideFileFilterProxyTest.java =================================================================== --- trunk/utils/src/test/net/sf/gridarta/gui/utils/HideFileFilterProxyTest.java 2010-11-07 12:05:25 UTC (rev 8771) +++ trunk/utils/src/test/net/sf/gridarta/gui/utils/HideFileFilterProxyTest.java 2010-11-07 12:17:48 UTC (rev 8772) @@ -1,106 +0,0 @@ -/* - * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. - * Copyright (C) 2000-2010 The Gridarta Developers. - * - * 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 2 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, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -package net.sf.gridarta.gui.utils; - -import java.io.File; -import javax.swing.filechooser.FileFilter; -import net.sf.japi.util.filter.file.AbstractFileFilter; -import org.junit.Assert; -import org.junit.Test; - -/** - * Test for {@link HideFileFilterProxy}. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> - */ -public class HideFileFilterProxyTest { - - /** - * Test case for {@link HideFileFilterProxy#HideFileFilterProxy(FileFilter)}. - */ - @Test - public void testHideFileFilterProxy() { - //noinspection ResultOfObjectAllocationIgnored - new HideFileFilterProxy(new MockFileFilter(true)); - } - - /** - * Test case for {@link HideFileFilterProxy#getDescription()}. - */ - @Test - public void testGetDescription() { - final FileFilter oUT = new HideFileFilterProxy(new MockFileFilter(true)); - Assert.assertEquals("MOCK", oUT.getDescription()); - } - - /** - * Test case for {@link HideFileFilterProxy#accept(File)}. - */ - @Test - public void testAccept() { - final FileFilter oUT1 = new HideFileFilterProxy(new MockFileFilter(true)); - Assert.assertTrue(oUT1.accept(new File("foobar"))); - //Assert.assertFalse(oUT1.accept(new File("CVS"))); - Assert.assertFalse(oUT1.accept(new File(".svn"))); - - final FileFilter oUT2 = new HideFileFilterProxy(new MockFileFilter(false)); - Assert.assertFalse(oUT2.accept(new File("foobar"))); - //Assert.assertFalse(oUT2.accept(new File("CVS"))); - Assert.assertFalse(oUT2.accept(new File(".svn"))); - } - - /** - * Mock File Filter that's used as parent file filter for the - * HideFileFilterProxy under test. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> - */ - private static class MockFileFilter extends AbstractFileFilter { - - /** - * Whether this file filter will accept or reject files. - */ - private final boolean accepts; - - /** - * Create a MockFileFilter. - * @param accepts Whether this file filter will accept or reject files. - */ - private MockFileFilter(final boolean accepts) { - this.accepts = accepts; - } - - /** - * {@inheritDoc} - */ - @Override - public boolean accept(final File f) { - return accepts; - } - - /** - * {@inheritDoc} - */ - @Override - public String getDescription() { - return "MOCK"; - } - - } // class MockFileFilter - -} // class HideFileFilterProxyTest Copied: trunk/utils/src/test/net/sf/gridarta/utils/HideFileFilterProxyTest.java (from rev 8769, trunk/utils/src/test/net/sf/gridarta/gui/utils/HideFileFilterProxyTest.java) =================================================================== --- trunk/utils/src/test/net/sf/gridarta/utils/HideFileFilterProxyTest.java (rev 0) +++ trunk/utils/src/test/net/sf/gridarta/utils/HideFileFilterProxyTest.java 2010-11-07 12:17:48 UTC (rev 8772) @@ -0,0 +1,106 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * 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 2 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.utils; + +import java.io.File; +import javax.swing.filechooser.FileFilter; +import net.sf.japi.util.filter.file.AbstractFileFilter; +import org.junit.Assert; +import org.junit.Test; + +/** + * Test for {@link HideFileFilterProxy}. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public class HideFileFilterProxyTest { + + /** + * Test case for {@link HideFileFilterProxy#HideFileFilterProxy(FileFilter)}. + */ + @Test + public void testHideFileFilterProxy() { + //noinspection ResultOfObjectAllocationIgnored + new HideFileFilterProxy(new MockFileFilter(true)); + } + + /** + * Test case for {@link HideFileFilterProxy#getDescription()}. + */ + @Test + public void testGetDescription() { + final FileFilter oUT = new HideFileFilterProxy(new MockFileFilter(true)); + Assert.assertEquals("MOCK", oUT.getDescription()); + } + + /** + * Test case for {@link HideFileFilterProxy#accept(File)}. + */ + @Test + public void testAccept() { + final FileFilter oUT1 = new HideFileFilterProxy(new MockFileFilter(true)); + Assert.assertTrue(oUT1.accept(new File("foobar"))); + //Assert.assertFalse(oUT1.accept(new File("CVS"))); + Assert.assertFalse(oUT1.accept(new File(".svn"))); + + final FileFilter oUT2 = new HideFileFilterProxy(new MockFileFilter(false)); + Assert.assertFalse(oUT2.accept(new File("foobar"))); + //Assert.assertFalse(oUT2.accept(new File("CVS"))); + Assert.assertFalse(oUT2.accept(new File(".svn"))); + } + + /** + * Mock File Filter that's used as parent file filter for the + * HideFileFilterProxy under test. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ + private static class MockFileFilter extends AbstractFileFilter { + + /** + * Whether this file filter will accept or reject files. + */ + private final boolean accepts; + + /** + * Create a MockFileFilter. + * @param accepts Whether this file filter will accept or reject files. + */ + private MockFileFilter(final boolean accepts) { + this.accepts = accepts; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean accept(final File f) { + return accepts; + } + + /** + * {@inheritDoc} + */ + @Override + public String getDescription() { + return "MOCK"; + } + + } // class MockFileFilter + +} // class HideFileFilterProxyTest Property changes on: trunk/utils/src/test/net/sf/gridarta/utils/HideFileFilterProxyTest.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-11-07 12:05:31
|
Revision: 8771 http://gridarta.svn.sourceforge.net/gridarta/?rev=8771&view=rev Author: akirschbaum Date: 2010-11-07 12:05:25 +0000 (Sun, 07 Nov 2010) Log Message: ----------- Add @NotNull annotations. Modified Paths: -------------- trunk/utils/src/app/net/sf/gridarta/gui/utils/FileFilters.java trunk/utils/src/app/net/sf/gridarta/gui/utils/HideFileFilterProxy.java Modified: trunk/utils/src/app/net/sf/gridarta/gui/utils/FileFilters.java =================================================================== --- trunk/utils/src/app/net/sf/gridarta/gui/utils/FileFilters.java 2010-11-07 12:02:30 UTC (rev 8770) +++ trunk/utils/src/app/net/sf/gridarta/gui/utils/FileFilters.java 2010-11-07 12:05:25 UTC (rev 8771) @@ -24,6 +24,7 @@ import net.sf.japi.swing.action.ActionBuilder; import net.sf.japi.swing.action.ActionBuilderFactory; import net.sf.japi.util.filter.file.EndingFileFilter; +import org.jetbrains.annotations.NotNull; /** * Utility class defining {@link FileFilter}s. @@ -34,6 +35,7 @@ /** * Action Builder. */ + @NotNull private static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta"); /** @@ -45,21 +47,25 @@ /** * Swing FileFilter for .arc files. */ + @NotNull public static final FileFilter arcFileFilter = new HideFileFilterProxy(new EndingFileFilter(true, ActionBuilderUtils.getString(ACTION_BUILDER, "fileDialog.filter.arc"), ".arc")); /** * Swing FileFilter for .anim files. */ + @NotNull public static final FileFilter animFileFilter = new HideFileFilterProxy(new EndingFileFilter(true, ActionBuilderUtils.getString(ACTION_BUILDER, "fileDialog.filter.anim"), ".anim")); /** * Swing FileFilter for .face files. */ + @NotNull public static final FileFilter faceFileFilter = new HideFileFilterProxy(new EndingFileFilter(true, ActionBuilderUtils.getString(ACTION_BUILDER, "fileDialog.filter.face"), ".face")); /** * Swing FileFilter for png graphics. */ + @NotNull public static final FileFilter pngFileFilter = new HideFileFilterProxy(new EndingFileFilter(true, ActionBuilderUtils.getString(ACTION_BUILDER, "fileDialog.filter.png"), ".png")); } // class FileFilters Modified: trunk/utils/src/app/net/sf/gridarta/gui/utils/HideFileFilterProxy.java =================================================================== --- trunk/utils/src/app/net/sf/gridarta/gui/utils/HideFileFilterProxy.java 2010-11-07 12:02:30 UTC (rev 8770) +++ trunk/utils/src/app/net/sf/gridarta/gui/utils/HideFileFilterProxy.java 2010-11-07 12:05:25 UTC (rev 8771) @@ -25,6 +25,7 @@ import java.util.Collection; import javax.swing.filechooser.FileFilter; import net.sf.japi.util.filter.file.AbstractFileFilter; +import org.jetbrains.annotations.NotNull; /** * A FileFilter that wraps another FileFilter and filters out CVS and .xvpics @@ -37,23 +38,26 @@ /** * The other file filter. */ + @NotNull private final FileFilter other; /** * The default rejected directory names. */ + @NotNull private static final Collection<String> REJECTED_DIRECTORY_NAMES = Arrays.asList("CVS"); /** * The rejected directory names. */ + @NotNull private final Collection<String> rejectedDirectoryNames = new ArrayList<String>(); /** * Create a HideFileFilterProxy. * @param other FileFilter to wrap */ - public HideFileFilterProxy(final FileFilter other) { + public HideFileFilterProxy(@NotNull final FileFilter other) { this.other = other; rejectedDirectoryNames.addAll(REJECTED_DIRECTORY_NAMES); } @@ -62,6 +66,7 @@ * {@inheritDoc} Returns the description from the {@link #other} * FileFilter. */ + @NotNull @Override public String getDescription() { return other.getDescription(); @@ -73,7 +78,7 @@ */ @SuppressWarnings({ "ParameterNameDiffersFromOverriddenParameter" }) @Override - public boolean accept(final File pathName) { + public boolean accept(@NotNull final File pathName) { if (pathName.getName().startsWith(".")) { return false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-11-07 12:02:38
|
Revision: 8770 http://gridarta.svn.sourceforge.net/gridarta/?rev=8770&view=rev Author: akirschbaum Date: 2010-11-07 12:02:30 +0000 (Sun, 07 Nov 2010) Log Message: ----------- Move model classes to model module. Added Paths: ----------- trunk/model/src/app/net/sf/gridarta/model/anim/DefaultAnimationObjects.java trunk/model/src/app/net/sf/gridarta/model/face/DefaultFaceObjects.java Removed Paths: ------------- trunk/src/app/net/sf/gridarta/model/ Copied: trunk/model/src/app/net/sf/gridarta/model/anim/DefaultAnimationObjects.java (from rev 8769, trunk/src/app/net/sf/gridarta/model/anim/DefaultAnimationObjects.java) =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/anim/DefaultAnimationObjects.java (rev 0) +++ trunk/model/src/app/net/sf/gridarta/model/anim/DefaultAnimationObjects.java 2010-11-07 12:02:30 UTC (rev 8770) @@ -0,0 +1,128 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * 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 2 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.model.anim; + +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStreamWriter; +import net.sf.gridarta.model.archetype.Archetype; +import net.sf.gridarta.model.data.NamedObject; +import net.sf.gridarta.model.gameobject.GameObject; +import net.sf.gridarta.model.io.GameObjectParser; +import net.sf.gridarta.model.maparchobject.MapArchObject; +import net.sf.gridarta.utils.ActionBuilderUtils; +import net.sf.gridarta.utils.IOUtils; +import net.sf.japi.swing.action.ActionBuilder; +import net.sf.japi.swing.action.ActionBuilderFactory; +import net.sf.japi.swing.misc.Progress; +import org.jetbrains.annotations.NotNull; + +/** + * Abstract base implementation of {@link AnimationObjects}. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public class DefaultAnimationObjects<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends AbstractAnimationObjects<G, A, R> { + + /** + * The serial version UID. + */ + private static final long serialVersionUID = 1L; + + /** + * Action Builder. + */ + private static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta"); + + /** + * The collected animation tree file. + */ + @NotNull + private final String animTreeFile; + + /** + * Creates a new instance. + * @param animTreeFile the collected animation tree file + */ + public DefaultAnimationObjects(@NotNull final String animTreeFile) { + super(ActionBuilderUtils.getString(ACTION_BUILDER, "nameOfAnimationObject")); + this.animTreeFile = animTreeFile; + } + + /** + * {@inheritDoc} Collects the Animations. The animation data is written to + * "animations". The tree information for the editor is written to + * "animtree". + */ + @Override + public void collect(@NotNull final Progress progress, @NotNull final File collectedDirectory, @NotNull final GameObjectParser<G, A, R> gameObjectParser) throws IOException { + collectAnimations(progress, collectedDirectory); + collectAnimTree(progress, collectedDirectory); + } + + /** + * Collects the animation data into the file "animations". + * @param progress Progress to report progress to. + * @param collectedDirectory the destination directory to collect data to + * @throws IOException in case of I/O problems during collection + */ + private void collectAnimations(@NotNull final Progress progress, @NotNull final File collectedDirectory) throws IOException { + progress.setLabel(ActionBuilderUtils.getString(ACTION_BUILDER, "archCollectAnimations"), size()); + final BufferedWriter animations = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(new File(collectedDirectory, "animations")), IOUtils.MAP_ENCODING)); + try { + int counter = 0; // counter for progress bar + for (final AnimationObject anim : this) { + animations.append("anim ").append(anim.getAnimName()).append('\n').append(anim.getAnimList()).append("mina\n"); + if (counter++ % 128 == 0) { + progress.setValue(counter); + } + } + } finally { + animations.close(); + } + progress.setValue(size()); + } + + /** + * Collects the animation data into the file "animations". + * @param progress Progress to report progress to. + * @param collectedDirectory the destination directory to collect data to + * @throws IOException in case of I/O problems during collection + */ + private void collectAnimTree(@NotNull final Progress progress, @NotNull final File collectedDirectory) throws IOException { + progress.setLabel(ActionBuilderUtils.getString(ACTION_BUILDER, "archCollectAnimTree"), size()); + final BufferedWriter animtree = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(new File(collectedDirectory, animTreeFile)), IOUtils.MAP_ENCODING)); + try { + int counter = 0; // counter for progress bar + for (final NamedObject anim : this) { + animtree.append(anim.getPath()).append('\n'); + if (counter++ % 128 == 0) { + progress.setValue(counter); + } + } + } finally { + animtree.close(); + } + progress.setValue(size()); + } + + +} // class DefaultAnimationObjects Property changes on: trunk/model/src/app/net/sf/gridarta/model/anim/DefaultAnimationObjects.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Copied: trunk/model/src/app/net/sf/gridarta/model/face/DefaultFaceObjects.java (from rev 8769, trunk/src/app/net/sf/gridarta/model/face/DefaultFaceObjects.java) =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/face/DefaultFaceObjects.java (rev 0) +++ trunk/model/src/app/net/sf/gridarta/model/face/DefaultFaceObjects.java 2010-11-07 12:02:30 UTC (rev 8770) @@ -0,0 +1,365 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * 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 2 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.model.face; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; +import java.io.PrintStream; +import java.io.Reader; +import java.net.URL; +import java.nio.channels.FileChannel; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import net.sf.gridarta.model.archetype.Archetype; +import net.sf.gridarta.model.errorview.ErrorView; +import net.sf.gridarta.model.errorview.ErrorViewCategory; +import net.sf.gridarta.model.errorview.ErrorViewCollector; +import net.sf.gridarta.model.gameobject.GameObject; +import net.sf.gridarta.model.io.GameObjectParser; +import net.sf.gridarta.model.maparchobject.MapArchObject; +import net.sf.gridarta.utils.ActionBuilderUtils; +import net.sf.gridarta.utils.ArrayUtils; +import net.sf.gridarta.utils.IOUtils; +import net.sf.japi.swing.action.ActionBuilder; +import net.sf.japi.swing.action.ActionBuilderFactory; +import net.sf.japi.swing.misc.Progress; +import org.apache.log4j.Category; +import org.apache.log4j.Logger; +import org.jetbrains.annotations.NotNull; + +/** + * Abstract base implementation of {@link FaceObjects}. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public class DefaultFaceObjects<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends AbstractFaceObjects<G, A, R> { + + /** + * The serial version UID. + */ + private static final long serialVersionUID = 1L; + + /** + * The chunk size in bytes when reading file contents. + */ + private static final int CHUNK_SIZE = 4096; + + /** + * The Logger for printing log messages. + */ + private static final Category log = Logger.getLogger(DefaultFaceObjects.class); + + /** + * Action Builder. + */ + private static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta"); + + /** + * The {@link ArchFaceProvider} to use for collection. + */ + @NotNull + private final ArchFaceProvider archFaceProvider; + + /** + * Creates a new instance. + * @param archFaceProvider the arch face provider to use for collection + */ + public DefaultFaceObjects(@NotNull final ArchFaceProvider archFaceProvider) { + super(ActionBuilderUtils.getString(ACTION_BUILDER, "nameOfFaceObject")); + this.archFaceProvider = archFaceProvider; + } + + /** + * {@inheritDoc} Collects the faces. The graphics information is written to + * "crossfire.0" resp. "daimonin.0". The meta information (offsets etc.) is + * written to "bmaps". The tree information for the editor is written to + * "bmaps.paths" resp. "facetree". <p/> Theoretically it would also be + * possible to recode the images. But the Java image encoder isn't as good + * as that of gimp in many cases (yet much better as the old visualtek's). + */ + @Override + public void collect(@NotNull final Progress progress, @NotNull final File collectedDirectory, @NotNull final GameObjectParser<G, A, R> gameObjectParser) throws IOException { + collectTreeFile(progress, collectedDirectory); + collectBmapsFile(progress, collectedDirectory); + collectImageFile(progress, collectedDirectory); + } + + /** + * Creates the image file. + * @param progress Progress to report progress to. + * @param collectedDirectory the destination directory to collect data to + * @throws IOException in case of I/O problems during collection + */ + private void collectImageFile(@NotNull final Progress progress, @NotNull final File collectedDirectory) throws IOException { + final File file = new File(collectedDirectory, ActionBuilderUtils.getString(ACTION_BUILDER, "configSource.image.name")); + final FileOutputStream fos = new FileOutputStream(file); + try { + final FileChannel outChannel = fos.getChannel(); + try { + final PrintStream binFile = new PrintStream(fos); + try { + final int numOfFaceObjects = size(); + progress.setLabel(ActionBuilderUtils.getString(ACTION_BUILDER, "archCollectImages"), numOfFaceObjects); + int i = 0; + for (final FaceObject faceObject : this) { + final String face = faceObject.getFaceName(); + final String path = archFaceProvider.getFilename(face); + try { + final FileInputStream fin = new FileInputStream(path); + try { + final FileChannel inChannel = fin.getChannel(); + final long imageSize = inChannel.size(); + binFile.format("IMAGE %d %d %s\n", i, imageSize, face); + inChannel.transferTo(0L, imageSize, outChannel); + } finally { + fin.close(); + } + } catch (final FileNotFoundException ignored) { + ACTION_BUILDER.showMessageDialog(progress.getParentComponent(), "archCollectErrorFileNotFound", path); + return; + } catch (final IOException e) { + ACTION_BUILDER.showMessageDialog(progress.getParentComponent(), "archCollectErrorIOException", path, e); + return; + } + + if (i++ % 100 == 0) { + progress.setValue(i); + } + } + progress.setValue(size()); // finished + } finally { + binFile.close(); + } + } finally { + outChannel.close(); + } + } finally { + fos.close(); + } + } + + /** + * Creates the tree file. + * @param progress Progress to report progress to. + * @param collectedDirectory the destination directory to collect data to + * @throws IOException in case of I/O problems during collection + */ + private void collectTreeFile(@NotNull final Progress progress, @NotNull final File collectedDirectory) throws IOException { + collectFile(progress, new File(collectedDirectory, ActionBuilderUtils.getString(ACTION_BUILDER, "configSource.facetree.name")), ActionBuilderUtils.getString(ACTION_BUILDER, "archCollectTree"), ActionBuilderUtils.getString(ACTION_BUILDER, "configSource.facetree.output")); + } + + /** + * Creates the bmaps file. + * @param progress Progress to report progress to. + * @param collectedDirectory the destination directory to collect data to + * @throws IOException in case of I/O problems during collection + */ + private void collectBmapsFile(@NotNull final Progress progress, @NotNull final File collectedDirectory) throws IOException { + collectFile(progress, new File(collectedDirectory, ActionBuilderUtils.getString(ACTION_BUILDER, "configSource.face.name")), ActionBuilderUtils.getString(ACTION_BUILDER, "archCollectBmaps"), ActionBuilderUtils.getString(ACTION_BUILDER, "configSource.face.output")); + } + + /** + * Creates an output file containing all faces. + * @param progress the process to report progress to + * @param file the output file to write + * @param label the progress label + * @param format the format string for writing the output file + * @throws IOException if an I/O error occurs + */ + private void collectFile(@NotNull final Progress progress, @NotNull final File file, @NotNull final String label, @NotNull final String format) throws IOException { + final FileOutputStream fos = new FileOutputStream(file); + try { + final OutputStreamWriter osw = new OutputStreamWriter(fos); + try { + final BufferedWriter bw = new BufferedWriter(osw); + try { + final int numOfFaceObjects = size(); + progress.setLabel(label, numOfFaceObjects); + int i = 0; + for (final FaceObject faceObject : this) { + final String path = faceObject.getPath(); + final String face = faceObject.getFaceName(); + bw.append(String.format(format, i, path, face)).append('\n'); + if (i++ % 100 == 0) { + progress.setValue(i); + } + } + progress.setValue(numOfFaceObjects); + } finally { + bw.close(); + } + } finally { + osw.close(); + } + } finally { + fos.close(); + } + } + + @NotNull + @Override + public FaceProvider loadFacesCollection(@NotNull final ErrorView errorView, @NotNull final File collectedDirectory) { + final String faceFile = ActionBuilderUtils.getString(ACTION_BUILDER, "configSource.image.name"); + final String treeFile = ActionBuilderUtils.getString(ACTION_BUILDER, "configSource.facetree.name"); + final File tmpFaceFile; + try { + tmpFaceFile = IOUtils.getFile(collectedDirectory, faceFile); + } catch (final IOException ex) { + errorView.addWarning(ErrorViewCategory.FACES_FILE_INVALID, new File(collectedDirectory, faceFile) + ": " + ex.getMessage()); + return new EmptyFaceProvider(); + } + final CollectedFaceProvider collectedFaceProvider; + int faces = 0; + final ErrorViewCollector faceFileErrorViewCollector = new ErrorViewCollector(errorView, tmpFaceFile); + try { + collectedFaceProvider = new CollectedFaceProvider(tmpFaceFile); + final byte[] data = getFileContents(tmpFaceFile); + + // Note: treeIn might stay null, this is optional data. + final ErrorViewCollector treeFileErrorViewCollector = new ErrorViewCollector(errorView, new File(collectedDirectory, treeFile)); + BufferedReader treeIn = null; + try { + final URL url = IOUtils.getResource(collectedDirectory, treeFile); + final InputStream inputStream2 = url.openStream(); + final Reader reader = new InputStreamReader(inputStream2, IOUtils.MAP_ENCODING); + //cher: it is safely closed but optional. InspectionGadgets doesn't detect where it's closed. + //noinspection IOResourceOpenedButNotSafelyClosed + treeIn = new BufferedReader(reader); + } catch (final FileNotFoundException ignored) { + treeFileErrorViewCollector.addWarning(ErrorViewCategory.FACES_FILE_INVALID); + } + final byte[] tag = "IMAGE ".getBytes(); // this is the starting string for a new png + final StringBuilder faceB = new StringBuilder(); // face name of png + try { + final Pattern pattern = Pattern.compile(ActionBuilderUtils.getString(ACTION_BUILDER, "configSource.facetree.input")); + int offset = 0; + while (offset < data.length) { + // File: Structure* + // Structure: "IMAGE " seqNr ' ' size ' ' facename '\n' PNGBinary + if (!ArrayUtils.contains(data, offset, tag)) { // check for IMAGE + throw new IOException("expecting 'IMAGE' at position " + offset); + } + offset += 6; // skip "IMAGE "; + while (data[offset++] != (byte) 0x20) { + // skip seqNr ' ' + } + int size = 0; + // read size ' ' + while (true) { + final char c = (char) data[offset++]; // XXX: do not cast from byte to char + if (c == ' ') { + break; + } + if (c < '0' || c > '9') { + throw new IOException("syntax error at position " + offset + ": not a digit"); + } + size *= 10; + size += (int) c - (int) '0'; + } + faceB.setLength(0); + // read facename '\n' + while (true) { + final char c = (char) data[offset++]; // XXX: do not cast from byte to char + if (c == '\n') { + break; + } + if (c == '/') { + faceB.setLength(0); + } else { + faceB.append(c); + } + } + final String faceName = faceB.toString().intern(); + + if (offset + size > data.length) { + throw new IOException("truncated at position " + offset); + } + + if (treeIn != null) { + final String originalFilename = treeIn.readLine(); + if (originalFilename == null) { + log.warn(ACTION_BUILDER.format("logFaceObjectWithoutOriginalName", faceName)); + } else { + final Matcher matcher = pattern.matcher(originalFilename); + if (matcher.matches()) { + try { + addFaceObject(faceName, matcher.group(1), offset, size); + } catch (final DuplicateFaceException ex) { + faceFileErrorViewCollector.addWarning(ErrorViewCategory.FACES_ENTRY_INVALID, "duplicate face: " + ex.getDuplicate().getFaceName()); + } catch (final IllegalFaceException ex) { + faceFileErrorViewCollector.addWarning(ErrorViewCategory.FACES_ENTRY_INVALID, "invalid face: " + ex.getFaceObject().getFaceName()); + } + } else { + treeFileErrorViewCollector.addWarning(ErrorViewCategory.FACES_ENTRY_INVALID, "syntax error: " + originalFilename); + } + } + } + collectedFaceProvider.addInfo(faceName, offset, size); // TODO Remove me + faces++; + offset += size; + } + } finally { + if (treeIn != null) { + treeIn.close(); + } + } + } catch (final IOException ex) { + faceFileErrorViewCollector.addWarning(ErrorViewCategory.FACES_FILE_INVALID, ex.getMessage()); + return new EmptyFaceProvider(); + } + if (log.isInfoEnabled()) { + log.info("Loaded " + faces + " faces from '" + tmpFaceFile + "'."); + } + return collectedFaceProvider; + } + + /** + * Returns the contents of a {@link File} as a <code>byte</code> array. + * @param file the file to read + * @return the file contents + * @throws IOException if the file cannot be read + */ + private static byte[] getFileContents(@NotNull final File file) throws IOException { + final ByteArrayOutputStream bufOut = new ByteArrayOutputStream((int) file.length()); + final InputStream inputStream = new FileInputStream(file); + try { + final byte[] buf = new byte[CHUNK_SIZE]; + while (true) { + final int len = inputStream.read(buf); + if (len == -1) { + break; + } + bufOut.write(buf, 0, len); + } + } finally { + inputStream.close(); + } + return bufOut.toByteArray(); + } + +} // class DefaultFaceObjects Property changes on: trunk/model/src/app/net/sf/gridarta/model/face/DefaultFaceObjects.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-11-07 11:59:15
|
Revision: 8769 http://gridarta.svn.sourceforge.net/gridarta/?rev=8769&view=rev Author: akirschbaum Date: 2010-11-07 11:59:08 +0000 (Sun, 07 Nov 2010) Log Message: ----------- Move DefaultFileControl to net.sf.gridarta.gui.misc. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java Added Paths: ----------- trunk/src/app/net/sf/gridarta/gui/misc/DefaultFileControl.java Removed Paths: ------------- trunk/src/app/net/sf/gridarta/mapmanager/DefaultFileControl.java Copied: trunk/src/app/net/sf/gridarta/gui/misc/DefaultFileControl.java (from rev 8766, trunk/src/app/net/sf/gridarta/mapmanager/DefaultFileControl.java) =================================================================== --- trunk/src/app/net/sf/gridarta/gui/misc/DefaultFileControl.java (rev 0) +++ trunk/src/app/net/sf/gridarta/gui/misc/DefaultFileControl.java 2010-11-07 11:59:08 UTC (rev 8769) @@ -0,0 +1,419 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * 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 2 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.gui.misc; + +import java.awt.Component; +import java.io.File; +import java.io.IOException; +import javax.swing.JFileChooser; +import javax.swing.JOptionPane; +import javax.swing.filechooser.FileFilter; +import net.sf.gridarta.gui.map.MapPreviewAccessory; +import net.sf.gridarta.gui.map.mapview.MapViewsManager; +import net.sf.gridarta.gui.mapimagecache.MapImageCache; +import net.sf.gridarta.gui.newmap.NewMapDialogFactory; +import net.sf.gridarta.mapmanager.FileControl; +import net.sf.gridarta.mapmanager.MapManager; +import net.sf.gridarta.model.archetype.Archetype; +import net.sf.gridarta.model.gameobject.GameObject; +import net.sf.gridarta.model.maparchobject.MapArchObject; +import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.model.settings.GlobalSettings; +import net.sf.gridarta.textedit.scripteditor.ScriptEditControl; +import net.sf.gridarta.utils.ActionBuilderUtils; +import net.sf.gridarta.utils.CommonConstants; +import net.sf.gridarta.utils.FileChooserUtils; +import net.sf.japi.swing.action.ActionBuilder; +import net.sf.japi.swing.action.ActionBuilderFactory; +import net.sf.japi.swing.action.ActionMethod; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * Default {@link FileControl} implementation. Asks the user for directions. + * @author Andreas Kirschbaum + */ +public class DefaultFileControl<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> implements FileControl<G, A, R> { + + /** + * The {@link ActionBuilder}. + */ + private static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta"); + + /** + * The {@link GlobalSettings}. + */ + @NotNull + private final GlobalSettings globalSettings; + + /** + * The {@link MapImageCache}. + */ + @NotNull + private final MapImageCache<G, A, R> mapImageCache; + + /** + * The {@link MapManager}. + */ + @NotNull + private final MapManager<G, A, R> mapManager; + + /** + * The {@link MapViewsManager}. + */ + @NotNull + private final MapViewsManager<G, A, R> mapViewsManager; + + /** + * The parent component for showing dialog boxes. + */ + @NotNull + private final Component parent; + + /** + * The {@link FileFilter} for selecting map files. + */ + @NotNull + private final FileFilter mapFileFilter; + + /** + * The {@link FileFilter} for selecting script files. + */ + @NotNull + private final FileFilter scriptFileFilter; + + /** + * The {@link NewMapDialogFactory}. + */ + @NotNull + private final NewMapDialogFactory<G, A, R> newMapDialogFactory; + + /** + * The file extension for script files. + */ + @NotNull + private final String scriptExtension; + + /** + * The {@link ScriptEditControl} to forward to. + */ + @NotNull + private final ScriptEditControl scriptEditControl; + + /** + * The {@link JFileChooser} for opening a file. Set to <code>null</code> if + * not yet created. + */ + @Nullable + private JFileChooser fileChooser = null; + + /** + * Creates a new instance. + * @param globalSettings the global settings instance + * @param mapImageCache the map image cache + * @param mapManager the map manager + * @param mapViewsManager the map views manager + * @param parent the parent component for showing dialog boxes + * @param mapFileFilter the file filter for selecting map files + * @param scriptFileFilter the file filter for selecting script files + * @param newMapDialogFactory the new map dialog factory + * @param scriptExtension the file extension for script files + * @param scriptEditControl the script edit control to forward to + */ + public DefaultFileControl(@NotNull final GlobalSettings globalSettings, @NotNull final MapImageCache<G, A, R> mapImageCache, @NotNull final MapManager<G, A, R> mapManager, @NotNull final MapViewsManager<G, A, R> mapViewsManager, @NotNull final Component parent, @NotNull final FileFilter mapFileFilter, @NotNull final FileFilter scriptFileFilter, @NotNull final NewMapDialogFactory<G, A, R> newMapDialogFactory, @NotNull final String scriptExtension, @NotNull final ScriptEditControl scriptEditControl) { + this.globalSettings = globalSettings; + this.mapImageCache = mapImageCache; + this.mapManager = mapManager; + this.mapViewsManager = mapViewsManager; + this.parent = parent; + this.mapFileFilter = mapFileFilter; + this.scriptFileFilter = scriptFileFilter; + this.newMapDialogFactory = newMapDialogFactory; + this.scriptExtension = scriptExtension; + this.scriptEditControl = scriptEditControl; + } + + /** + * Creates the {@link JFileChooser} for opening a file. + * @return the new file chooser + */ + @NotNull + private JFileChooser createFileChooser() { + final JFileChooser tmpFileChooser = new JFileChooser(); + tmpFileChooser.setDialogTitle(ActionBuilderUtils.getString(ACTION_BUILDER, "fileDialog.title")); + tmpFileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY); + tmpFileChooser.setMultiSelectionEnabled(true); + tmpFileChooser.addChoosableFileFilter(scriptFileFilter); + tmpFileChooser.addChoosableFileFilter(mapFileFilter); + if (globalSettings.getMapsDirectory().exists()) { + FileChooserUtils.setCurrentDirectory(tmpFileChooser, globalSettings.getMapsDirectory()); + } + tmpFileChooser.setAccessory(new MapPreviewAccessory(mapImageCache, tmpFileChooser)); + return tmpFileChooser; + } + + /** + * {@inheritDoc} + */ + @ActionMethod + @Override + public void editScript() { + openFile(false); + } + + /** + * {@inheritDoc} + */ + @ActionMethod + @Override + public void openFile() { + openFile(true); + } + + /** + * The user wants to open a file. The file filters and preselected file + * filter are set accordingly to <code>mapFilter</code>. + * @param mapFilter set to <code>true</code> if the user probably wants to + * open a map, <code>false</code> otherwise + */ + private void openFile(final boolean mapFilter) { + if (fileChooser == null) { + fileChooser = createFileChooser(); + } + final JFileChooser tmpFileChooser = fileChooser; + if (mapFilter) { + tmpFileChooser.setFileFilter(mapFileFilter); + } else { + tmpFileChooser.setFileFilter(scriptFileFilter); + } + FileChooserUtils.sanitizeCurrentDirectory(tmpFileChooser); + final int returnVal = tmpFileChooser.showOpenDialog(parent); + if (returnVal != JFileChooser.APPROVE_OPTION) { + return; + } + + globalSettings.setChangedDir(true); // user has chosen an active dir + final File dir = tmpFileChooser.getCurrentDirectory(); + final File[] files = tmpFileChooser.getSelectedFiles(); + for (final File file : files) { + final boolean isScriptFile = file.getName().toLowerCase().endsWith(scriptExtension); + if (file.isFile()) { + if (isScriptFile) { + scriptEditControl.openScriptFile(file.getAbsolutePath()); + } else { + globalSettings.setCurrentDirectory(dir); + try { + mapViewsManager.openMapFileWithView(file, null); + } catch (final IOException ex) { + reportLoadError(file, ex.getMessage()); + } + } + } else if (!file.exists()) { + if (isScriptFile) { + scriptEditControl.newScript(); // TODO: pass filename + } else { + newMapDialogFactory.newMap(); // XXX: pass file + } + } // If neither branch matches, it's a directory - what to do with directories? + } + } + + /** + * {@inheritDoc} + */ + @Override + public boolean save(@NotNull final MapControl<G, A, R> mapControl) { + final File file = mapControl.getMapModel().getMapFile(); + if (file != null) { + try { + mapControl.save(); + } catch (final IOException ex) { + reportSaveError(file, ex.getMessage()); + return false; + } + return true; + } + + return saveAs(mapControl); + } + + /** + * {@inheritDoc} + */ + @ActionMethod + @Override + public void saveAllMaps() { + for (final MapControl<G, A, R> mapControl : mapManager.getOpenedMaps()) { + if (mapControl.getMapModel().isModified() && !save(mapControl)) { + return; + } + } + } + + /** + * {@inheritDoc} + */ + @ActionMethod + @Override + public boolean closeAllMaps() { + while (true) { + final MapControl<G, A, R> mapControl = mapManager.getOpenMap(); + if (mapControl == null) { + break; + } + + if (!confirmSaveChanges(mapControl)) { + return false; + } + + mapManager.closeMap(mapControl); + } + + return true; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean saveAs(@NotNull final MapControl<G, A, R> mapControl) { + final File file = saveMapAs(mapControl); + if (file == null) { + return false; + } + + try { + mapControl.saveAs(file); + } catch (final IOException ex) { + reportSaveError(file, ex.getMessage()); + return false; + } + + return true; + } + + /** + * Displays a "save as" dialog. + * @param mapControl the map control for the dialog + * @return the selected file or <code>null</code> if cancelled + */ + @Nullable + private File saveMapAs(@NotNull final MapControl<G, A, R> mapControl) { + final JFileChooser saveFileChooser = new JFileChooser(); + saveFileChooser.setDialogTitle("Save Map Or Script As"); + saveFileChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES); + saveFileChooser.setMultiSelectionEnabled(false); + saveFileChooser.resetChoosableFileFilters(); + saveFileChooser.addChoosableFileFilter(scriptFileFilter); + saveFileChooser.setFileFilter(mapFileFilter); + + // default folder is the map-folder at first time, then the active folder + if (!globalSettings.hasChangedDir() && globalSettings.getMapsDirectory().exists()) { + FileChooserUtils.setCurrentDirectory(saveFileChooser, globalSettings.getMapsDirectory()); + } else if (globalSettings.getCurrentDirectory().exists()) { + FileChooserUtils.setCurrentDirectory(saveFileChooser, globalSettings.getCurrentDirectory()); + } else { + FileChooserUtils.sanitizeCurrentDirectory(saveFileChooser); + } + + // if file already exists, select it + final File mapFile = mapControl.getMapModel().getMapFile(); + if (mapFile != null && mapFile.exists()) { + saveFileChooser.setSelectedFile(mapFile); + } else { + saveFileChooser.setSelectedFile(new File(globalSettings.getMapsDirectory(), CommonConstants.DEFAULT_MAP_FILENAME)); + } + + final int returnVal = saveFileChooser.showSaveDialog(parent); + if (returnVal != JFileChooser.APPROVE_OPTION) { + return null; + } + + globalSettings.setChangedDir(true); // user has chosen an active dir + final File file = saveFileChooser.getSelectedFile(); + if (file.exists() && ACTION_BUILDER.showConfirmDialog(parent, JOptionPane.WARNING_MESSAGE, JOptionPane.OK_CANCEL_OPTION, "overwriteOtherFile", file.getName()) != JOptionPane.OK_OPTION) { + return null; + } + + return file; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean confirmSaveChanges(@NotNull final MapControl<G, A, R> mapControl) { + if (mapControl.getMapModel().isModified()) { + final int result = ACTION_BUILDER.showConfirmDialog(parent, JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, "confirmSaveChanges", mapControl.getMapModel().getMapArchObject().getMapName()); + if (result == JOptionPane.YES_OPTION) { + if (!save(mapControl)) { + return false; + } + } else if (result == JOptionPane.CANCEL_OPTION || result == JOptionPane.CLOSED_OPTION) { + return false; + } + } + + return true; + } + + /** + * {@inheritDoc} + */ + @Override + public void reportSaveError(@NotNull final MapControl<G, A, R> mapControl, @NotNull final String message) { + final File file = mapControl.getMapModel().getMapFile(); + assert file != null; + reportSaveError(file, message); + } + + /** + * {@inheritDoc} + */ + @Override + public void reportSaveError(@NotNull final File mapFile, @NotNull final String message) { + ACTION_BUILDER.showMessageDialog(parent, "encodeMapFile", mapFile, message); + } + + /** + * {@inheritDoc} + */ + @Override + public void reportLoadError(@Nullable final File file, @NotNull final String message) { + ACTION_BUILDER.showMessageDialog(parent, "openFileLoadMap", file == null ? "<unknown>" : file, message); + } + + /** + * {@inheritDoc} + */ + @Override + public void reportOutOfMapBoundsDeleted(@NotNull final File file, final int outOfMapBoundsDeleted, @NotNull final StringBuilder outOfMapBoundsObjects) { + ACTION_BUILDER.showMessageDialog(parent, "openFileOutOfMapBoundsDeleted", file, outOfMapBoundsDeleted, outOfMapBoundsObjects); + } + + /** + * {@inheritDoc} + */ + @Override + public void reportOutOfMemory(@NotNull final File file) { + ACTION_BUILDER.showMessageDialog(parent, "mapOutOfMemory", file); + } + +} // class DefaultFileControl Property changes on: trunk/src/app/net/sf/gridarta/gui/misc/DefaultFileControl.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Modified: trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2010-11-07 11:50:33 UTC (rev 8768) +++ trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2010-11-07 11:59:08 UTC (rev 8769) @@ -83,6 +83,7 @@ import net.sf.gridarta.gui.mappropertiesdialog.MapPropertiesDialogFactory; import net.sf.gridarta.gui.mapuserlistener.MapUserListenerManager; import net.sf.gridarta.gui.misc.About; +import net.sf.gridarta.gui.misc.DefaultFileControl; import net.sf.gridarta.gui.misc.HelpActions; import net.sf.gridarta.gui.misc.MainToolbar; import net.sf.gridarta.gui.misc.MainView; @@ -115,7 +116,6 @@ import net.sf.gridarta.mainactions.DefaultExiter; import net.sf.gridarta.mainactions.MainActions; import net.sf.gridarta.mapmanager.AbstractMapManager; -import net.sf.gridarta.mapmanager.DefaultFileControl; import net.sf.gridarta.mapmanager.FileControl; import net.sf.gridarta.mapmanager.MapManager; import net.sf.gridarta.model.anim.AnimationObjects; Deleted: trunk/src/app/net/sf/gridarta/mapmanager/DefaultFileControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/mapmanager/DefaultFileControl.java 2010-11-07 11:50:33 UTC (rev 8768) +++ trunk/src/app/net/sf/gridarta/mapmanager/DefaultFileControl.java 2010-11-07 11:59:08 UTC (rev 8769) @@ -1,417 +0,0 @@ -/* - * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. - * Copyright (C) 2000-2010 The Gridarta Developers. - * - * 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 2 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, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -package net.sf.gridarta.mapmanager; - -import java.awt.Component; -import java.io.File; -import java.io.IOException; -import javax.swing.JFileChooser; -import javax.swing.JOptionPane; -import javax.swing.filechooser.FileFilter; -import net.sf.gridarta.gui.map.MapPreviewAccessory; -import net.sf.gridarta.gui.map.mapview.MapViewsManager; -import net.sf.gridarta.gui.mapimagecache.MapImageCache; -import net.sf.gridarta.gui.newmap.NewMapDialogFactory; -import net.sf.gridarta.model.archetype.Archetype; -import net.sf.gridarta.model.gameobject.GameObject; -import net.sf.gridarta.model.maparchobject.MapArchObject; -import net.sf.gridarta.model.mapcontrol.MapControl; -import net.sf.gridarta.model.settings.GlobalSettings; -import net.sf.gridarta.textedit.scripteditor.ScriptEditControl; -import net.sf.gridarta.utils.ActionBuilderUtils; -import net.sf.gridarta.utils.CommonConstants; -import net.sf.gridarta.utils.FileChooserUtils; -import net.sf.japi.swing.action.ActionBuilder; -import net.sf.japi.swing.action.ActionBuilderFactory; -import net.sf.japi.swing.action.ActionMethod; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -/** - * Default {@link FileControl} implementation. Asks the user for directions. - * @author Andreas Kirschbaum - */ -public class DefaultFileControl<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> implements FileControl<G, A, R> { - - /** - * The {@link ActionBuilder}. - */ - private static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta"); - - /** - * The {@link GlobalSettings}. - */ - @NotNull - private final GlobalSettings globalSettings; - - /** - * The {@link MapImageCache}. - */ - @NotNull - private final MapImageCache<G, A, R> mapImageCache; - - /** - * The {@link MapManager}. - */ - @NotNull - private final MapManager<G, A, R> mapManager; - - /** - * The {@link MapViewsManager}. - */ - @NotNull - private final MapViewsManager<G, A, R> mapViewsManager; - - /** - * The parent component for showing dialog boxes. - */ - @NotNull - private final Component parent; - - /** - * The {@link FileFilter} for selecting map files. - */ - @NotNull - private final FileFilter mapFileFilter; - - /** - * The {@link FileFilter} for selecting script files. - */ - @NotNull - private final FileFilter scriptFileFilter; - - /** - * The {@link NewMapDialogFactory}. - */ - @NotNull - private final NewMapDialogFactory<G, A, R> newMapDialogFactory; - - /** - * The file extension for script files. - */ - @NotNull - private final String scriptExtension; - - /** - * The {@link ScriptEditControl} to forward to. - */ - @NotNull - private final ScriptEditControl scriptEditControl; - - /** - * The {@link JFileChooser} for opening a file. Set to <code>null</code> if - * not yet created. - */ - @Nullable - private JFileChooser fileChooser = null; - - /** - * Creates a new instance. - * @param globalSettings the global settings instance - * @param mapImageCache the map image cache - * @param mapManager the map manager - * @param mapViewsManager the map views manager - * @param parent the parent component for showing dialog boxes - * @param mapFileFilter the file filter for selecting map files - * @param scriptFileFilter the file filter for selecting script files - * @param newMapDialogFactory the new map dialog factory - * @param scriptExtension the file extension for script files - * @param scriptEditControl the script edit control to forward to - */ - public DefaultFileControl(@NotNull final GlobalSettings globalSettings, @NotNull final MapImageCache<G, A, R> mapImageCache, @NotNull final MapManager<G, A, R> mapManager, @NotNull final MapViewsManager<G, A, R> mapViewsManager, @NotNull final Component parent, @NotNull final FileFilter mapFileFilter, @NotNull final FileFilter scriptFileFilter, @NotNull final NewMapDialogFactory<G, A, R> newMapDialogFactory, @NotNull final String scriptExtension, @NotNull final ScriptEditControl scriptEditControl) { - this.globalSettings = globalSettings; - this.mapImageCache = mapImageCache; - this.mapManager = mapManager; - this.mapViewsManager = mapViewsManager; - this.parent = parent; - this.mapFileFilter = mapFileFilter; - this.scriptFileFilter = scriptFileFilter; - this.newMapDialogFactory = newMapDialogFactory; - this.scriptExtension = scriptExtension; - this.scriptEditControl = scriptEditControl; - } - - /** - * Creates the {@link JFileChooser} for opening a file. - * @return the new file chooser - */ - @NotNull - private JFileChooser createFileChooser() { - final JFileChooser tmpFileChooser = new JFileChooser(); - tmpFileChooser.setDialogTitle(ActionBuilderUtils.getString(ACTION_BUILDER, "fileDialog.title")); - tmpFileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY); - tmpFileChooser.setMultiSelectionEnabled(true); - tmpFileChooser.addChoosableFileFilter(scriptFileFilter); - tmpFileChooser.addChoosableFileFilter(mapFileFilter); - if (globalSettings.getMapsDirectory().exists()) { - FileChooserUtils.setCurrentDirectory(tmpFileChooser, globalSettings.getMapsDirectory()); - } - tmpFileChooser.setAccessory(new MapPreviewAccessory(mapImageCache, tmpFileChooser)); - return tmpFileChooser; - } - - /** - * {@inheritDoc} - */ - @ActionMethod - @Override - public void editScript() { - openFile(false); - } - - /** - * {@inheritDoc} - */ - @ActionMethod - @Override - public void openFile() { - openFile(true); - } - - /** - * The user wants to open a file. The file filters and preselected file - * filter are set accordingly to <code>mapFilter</code>. - * @param mapFilter set to <code>true</code> if the user probably wants to - * open a map, <code>false</code> otherwise - */ - private void openFile(final boolean mapFilter) { - if (fileChooser == null) { - fileChooser = createFileChooser(); - } - final JFileChooser tmpFileChooser = fileChooser; - if (mapFilter) { - tmpFileChooser.setFileFilter(mapFileFilter); - } else { - tmpFileChooser.setFileFilter(scriptFileFilter); - } - FileChooserUtils.sanitizeCurrentDirectory(tmpFileChooser); - final int returnVal = tmpFileChooser.showOpenDialog(parent); - if (returnVal != JFileChooser.APPROVE_OPTION) { - return; - } - - globalSettings.setChangedDir(true); // user has chosen an active dir - final File dir = tmpFileChooser.getCurrentDirectory(); - final File[] files = tmpFileChooser.getSelectedFiles(); - for (final File file : files) { - final boolean isScriptFile = file.getName().toLowerCase().endsWith(scriptExtension); - if (file.isFile()) { - if (isScriptFile) { - scriptEditControl.openScriptFile(file.getAbsolutePath()); - } else { - globalSettings.setCurrentDirectory(dir); - try { - mapViewsManager.openMapFileWithView(file, null); - } catch (final IOException ex) { - reportLoadError(file, ex.getMessage()); - } - } - } else if (!file.exists()) { - if (isScriptFile) { - scriptEditControl.newScript(); // TODO: pass filename - } else { - newMapDialogFactory.newMap(); // XXX: pass file - } - } // If neither branch matches, it's a directory - what to do with directories? - } - } - - /** - * {@inheritDoc} - */ - @Override - public boolean save(@NotNull final MapControl<G, A, R> mapControl) { - final File file = mapControl.getMapModel().getMapFile(); - if (file != null) { - try { - mapControl.save(); - } catch (final IOException ex) { - reportSaveError(file, ex.getMessage()); - return false; - } - return true; - } - - return saveAs(mapControl); - } - - /** - * {@inheritDoc} - */ - @ActionMethod - @Override - public void saveAllMaps() { - for (final MapControl<G, A, R> mapControl : mapManager.getOpenedMaps()) { - if (mapControl.getMapModel().isModified() && !save(mapControl)) { - return; - } - } - } - - /** - * {@inheritDoc} - */ - @ActionMethod - @Override - public boolean closeAllMaps() { - while (true) { - final MapControl<G, A, R> mapControl = mapManager.getOpenMap(); - if (mapControl == null) { - break; - } - - if (!confirmSaveChanges(mapControl)) { - return false; - } - - mapManager.closeMap(mapControl); - } - - return true; - } - - /** - * {@inheritDoc} - */ - @Override - public boolean saveAs(@NotNull final MapControl<G, A, R> mapControl) { - final File file = saveMapAs(mapControl); - if (file == null) { - return false; - } - - try { - mapControl.saveAs(file); - } catch (final IOException ex) { - reportSaveError(file, ex.getMessage()); - return false; - } - - return true; - } - - /** - * Displays a "save as" dialog. - * @param mapControl the map control for the dialog - * @return the selected file or <code>null</code> if cancelled - */ - @Nullable - private File saveMapAs(@NotNull final MapControl<G, A, R> mapControl) { - final JFileChooser saveFileChooser = new JFileChooser(); - saveFileChooser.setDialogTitle("Save Map Or Script As"); - saveFileChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES); - saveFileChooser.setMultiSelectionEnabled(false); - saveFileChooser.resetChoosableFileFilters(); - saveFileChooser.addChoosableFileFilter(scriptFileFilter); - saveFileChooser.setFileFilter(mapFileFilter); - - // default folder is the map-folder at first time, then the active folder - if (!globalSettings.hasChangedDir() && globalSettings.getMapsDirectory().exists()) { - FileChooserUtils.setCurrentDirectory(saveFileChooser, globalSettings.getMapsDirectory()); - } else if (globalSettings.getCurrentDirectory().exists()) { - FileChooserUtils.setCurrentDirectory(saveFileChooser, globalSettings.getCurrentDirectory()); - } else { - FileChooserUtils.sanitizeCurrentDirectory(saveFileChooser); - } - - // if file already exists, select it - final File mapFile = mapControl.getMapModel().getMapFile(); - if (mapFile != null && mapFile.exists()) { - saveFileChooser.setSelectedFile(mapFile); - } else { - saveFileChooser.setSelectedFile(new File(globalSettings.getMapsDirectory(), CommonConstants.DEFAULT_MAP_FILENAME)); - } - - final int returnVal = saveFileChooser.showSaveDialog(parent); - if (returnVal != JFileChooser.APPROVE_OPTION) { - return null; - } - - globalSettings.setChangedDir(true); // user has chosen an active dir - final File file = saveFileChooser.getSelectedFile(); - if (file.exists() && ACTION_BUILDER.showConfirmDialog(parent, JOptionPane.WARNING_MESSAGE, JOptionPane.OK_CANCEL_OPTION, "overwriteOtherFile", file.getName()) != JOptionPane.OK_OPTION) { - return null; - } - - return file; - } - - /** - * {@inheritDoc} - */ - @Override - public boolean confirmSaveChanges(@NotNull final MapControl<G, A, R> mapControl) { - if (mapControl.getMapModel().isModified()) { - final int result = ACTION_BUILDER.showConfirmDialog(parent, JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, "confirmSaveChanges", mapControl.getMapModel().getMapArchObject().getMapName()); - if (result == JOptionPane.YES_OPTION) { - if (!save(mapControl)) { - return false; - } - } else if (result == JOptionPane.CANCEL_OPTION || result == JOptionPane.CLOSED_OPTION) { - return false; - } - } - - return true; - } - - /** - * {@inheritDoc} - */ - @Override - public void reportSaveError(@NotNull final MapControl<G, A, R> mapControl, @NotNull final String message) { - final File file = mapControl.getMapModel().getMapFile(); - assert file != null; - reportSaveError(file, message); - } - - /** - * {@inheritDoc} - */ - @Override - public void reportSaveError(@NotNull final File mapFile, @NotNull final String message) { - ACTION_BUILDER.showMessageDialog(parent, "encodeMapFile", mapFile, message); - } - - /** - * {@inheritDoc} - */ - @Override - public void reportLoadError(@Nullable final File file, @NotNull final String message) { - ACTION_BUILDER.showMessageDialog(parent, "openFileLoadMap", file == null ? "<unknown>" : file, message); - } - - /** - * {@inheritDoc} - */ - @Override - public void reportOutOfMapBoundsDeleted(@NotNull final File file, final int outOfMapBoundsDeleted, @NotNull final StringBuilder outOfMapBoundsObjects) { - ACTION_BUILDER.showMessageDialog(parent, "openFileOutOfMapBoundsDeleted", file, outOfMapBoundsDeleted, outOfMapBoundsObjects); - } - - /** - * {@inheritDoc} - */ - @Override - public void reportOutOfMemory(@NotNull final File file) { - ACTION_BUILDER.showMessageDialog(parent, "mapOutOfMemory", file); - } - -} // class DefaultFileControl This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-11-07 11:50:42
|
Revision: 8768 http://gridarta.svn.sourceforge.net/gridarta/?rev=8768&view=rev Author: akirschbaum Date: 2010-11-07 11:50:33 +0000 (Sun, 07 Nov 2010) Log Message: ----------- Move net.sf.gridarta.mapfiles.* to net.sf.gridarta.gui.mapfiles. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTreeAction.java trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTreeActions.java trunk/src/app/net/sf/gridarta/gui/newmap/NewMapDialogFactory.java trunk/src/app/net/sf/gridarta/gui/newmap/NewPickmapDialog.java trunk/src/app/net/sf/gridarta/gui/newmap/NewPickmapFolderDialog.java trunk/src/app/net/sf/gridarta/gui/objectchooser/DefaultObjectChooser.java trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserModel.java trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserModelListener.java trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserView.java trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java Added Paths: ----------- trunk/src/app/net/sf/gridarta/gui/mapfiles/DuplicateMapFolderException.java trunk/src/app/net/sf/gridarta/gui/mapfiles/DuplicatePickmapException.java trunk/src/app/net/sf/gridarta/gui/mapfiles/InvalidNameException.java trunk/src/app/net/sf/gridarta/gui/mapfiles/Loader.java trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFile.java trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFileNameComparator.java trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolder.java trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderListener.java trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderNotEmptyException.java trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTree.java trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTreeListener.java Removed Paths: ------------- trunk/src/app/net/sf/gridarta/mapfiles/ Copied: trunk/src/app/net/sf/gridarta/gui/mapfiles/DuplicateMapFolderException.java (from rev 8766, trunk/src/app/net/sf/gridarta/mapfiles/DuplicateMapFolderException.java) =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapfiles/DuplicateMapFolderException.java (rev 0) +++ trunk/src/app/net/sf/gridarta/gui/mapfiles/DuplicateMapFolderException.java 2010-11-07 11:50:33 UTC (rev 8768) @@ -0,0 +1,43 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * 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 2 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.gui.mapfiles; + +import org.jetbrains.annotations.NotNull; + +/** + * Indicates that a folder name is not unique. + * @author Andreas Kirschbaum + */ +public class DuplicateMapFolderException extends Exception { + + /** + * The serial version UID. + */ + private static final long serialVersionUID = 1L; + + /** + * Creates a new instance. + * @param folderName the duplicate folder name + */ + public DuplicateMapFolderException(@NotNull final String folderName) { + super("duplicate folder: " + folderName); + } + +} // DuplicateMapFolderException Property changes on: trunk/src/app/net/sf/gridarta/gui/mapfiles/DuplicateMapFolderException.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:mergeinfo + /streams/cher-japi-update/src/app/net/sf/gridarta/mapfiles/DuplicateMapFolderException.java:5966-5991 Added: svn:eol-style + LF Copied: trunk/src/app/net/sf/gridarta/gui/mapfiles/DuplicatePickmapException.java (from rev 8766, trunk/src/app/net/sf/gridarta/mapfiles/DuplicatePickmapException.java) =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapfiles/DuplicatePickmapException.java (rev 0) +++ trunk/src/app/net/sf/gridarta/gui/mapfiles/DuplicatePickmapException.java 2010-11-07 11:50:33 UTC (rev 8768) @@ -0,0 +1,43 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * 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 2 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.gui.mapfiles; + +import org.jetbrains.annotations.NotNull; + +/** + * Indicates that a pickmap name is not unique within its folder. + * @author Andreas Kirschbaum + */ +public class DuplicatePickmapException extends Exception { + + /** + * The serial version UID. + */ + private static final long serialVersionUID = 1L; + + /** + * Creates a new instance. + * @param pickmapName the duplicate pickmap name + */ + public DuplicatePickmapException(@NotNull final String pickmapName) { + super("duplicate folder: " + pickmapName); + } + +} // DuplicatePickmapException Property changes on: trunk/src/app/net/sf/gridarta/gui/mapfiles/DuplicatePickmapException.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:mergeinfo + /streams/cher-japi-update/src/app/net/sf/gridarta/mapfiles/DuplicatePickmapException.java:5966-5991 Added: svn:eol-style + LF Copied: trunk/src/app/net/sf/gridarta/gui/mapfiles/InvalidNameException.java (from rev 8766, trunk/src/app/net/sf/gridarta/mapfiles/InvalidNameException.java) =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapfiles/InvalidNameException.java (rev 0) +++ trunk/src/app/net/sf/gridarta/gui/mapfiles/InvalidNameException.java 2010-11-07 11:50:33 UTC (rev 8768) @@ -0,0 +1,43 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * 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 2 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.gui.mapfiles; + +import org.jetbrains.annotations.NotNull; + +/** + * Indicates that a folder or pickmap name is invalid. + * @author Andreas Kirschbaum + */ +public class InvalidNameException extends Exception { + + /** + * The serial version UID. + */ + private static final long serialVersionUID = 1L; + + /** + * Creates a new instance. + * @param name the invalid name + */ + public InvalidNameException(@NotNull final String name) { + super(name); + } + +} // InvalidNameException Property changes on: trunk/src/app/net/sf/gridarta/gui/mapfiles/InvalidNameException.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:mergeinfo + /streams/cher-japi-update/src/app/net/sf/gridarta/mapfiles/InvalidNameException.java:5966-5991 Added: svn:eol-style + LF Copied: trunk/src/app/net/sf/gridarta/gui/mapfiles/Loader.java (from rev 8766, trunk/src/app/net/sf/gridarta/mapfiles/Loader.java) =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapfiles/Loader.java (rev 0) +++ trunk/src/app/net/sf/gridarta/gui/mapfiles/Loader.java 2010-11-07 11:50:33 UTC (rev 8768) @@ -0,0 +1,152 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * 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 2 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.gui.mapfiles; + +import java.io.File; +import java.util.Arrays; +import net.sf.gridarta.gui.map.mapview.MapViewsManager; +import net.sf.gridarta.mapmanager.MapManager; +import net.sf.gridarta.model.archetype.Archetype; +import net.sf.gridarta.model.errorview.ErrorView; +import net.sf.gridarta.model.errorview.ErrorViewCategory; +import net.sf.gridarta.model.errorview.ErrorViewCollector; +import net.sf.gridarta.model.gameobject.GameObject; +import net.sf.gridarta.model.io.MapReaderFactory; +import net.sf.gridarta.model.maparchobject.MapArchObject; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * Loader for pickmaps from a directory. + * @author Andreas Kirschbaum + */ +public class Loader<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> { + + /** + * The {@link ErrorView} for reporting errors. + */ + @NotNull + private final ErrorView errorView; + + /** + * The model to add the loaded pickmaps to. + */ + @NotNull + private final MapFolderTree<G, A, R> mapFolderTree; + + /** + * The {@link MapReaderFactory} for loading map files. + */ + @NotNull + private final MapReaderFactory<G, A> mapReaderFactory; + + /** + * The {@link MapManager} for loading pickmaps. + */ + @NotNull + private final MapManager<G, A, R> pickmapManager; + + /** + * The {@link MapViewsManager}. + */ + @NotNull + private final MapViewsManager<G, A, R> mapViewsManager; + + /** + * Creates a new instance. + * @param errorView the error view for reporting error messages + * @param mapFolderTree the model to add the loaded pickmaps to + * @param mapReaderFactory the map reader factory to loading map files + * @param pickmapManager the map manager for loading pickmaps + * @param mapViewsManager the map views manager + */ + public Loader(@NotNull final ErrorView errorView, @NotNull final MapFolderTree<G, A, R> mapFolderTree, @NotNull final MapReaderFactory<G, A> mapReaderFactory, @NotNull final MapManager<G, A, R> pickmapManager, @NotNull final MapViewsManager<G, A, R> mapViewsManager) { + this.errorView = errorView; + this.mapFolderTree = mapFolderTree; + this.mapReaderFactory = mapReaderFactory; + this.pickmapManager = pickmapManager; + this.mapViewsManager = mapViewsManager; + } + + /** + * Loads all pickmap files from a directory and its sub-directories. + */ + public void load() { + final MapFolder<G, A, R> mapFolder = load(null, ""); + if (mapFolder != null) { + mapFolderTree.setActiveMapFolder(mapFolder); + } + } + + /** + * Loads all pickmap files from a directory and its sub-directories. + * @param parent the parent folder, or <code>null</code> + * @param folderName the folder name of <code>dir</code> + * @return the default <code>Folder</code>, or <code>null</code> if this + * directory is empty + */ + @Nullable + private MapFolder<G, A, R> load(@Nullable final MapFolder<G, A, R> parent, @NotNull final String folderName) { + final File baseDir = mapFolderTree.getBaseDir(); + final File dir = parent == null ? baseDir : new File(parent.getDir(), folderName); + final ErrorViewCollector errorViewCollector = new ErrorViewCollector(errorView, dir); + final File[] files = dir.listFiles(); + if (files == null) { + errorViewCollector.addWarning(ErrorViewCategory.PICKMAPS_DIR_INVALID); + return null; + } + + final MapFolder<G, A, R> mapFolder; + try { + mapFolder = new MapFolder<G, A, R>(parent, folderName, baseDir, mapViewsManager); + } catch (final InvalidNameException ex) { + errorViewCollector.addWarning(ErrorViewCategory.PICKMAPS_DIR_INVALID, "ignoring pickmap folder with invalid name: " + ex.getMessage()); + return null; + } + try { + mapFolderTree.addMapFolder(mapFolder); + } catch (final DuplicateMapFolderException ex) { + errorViewCollector.addWarning(ErrorViewCategory.PICKMAPS_DIR_INVALID, "cannot add folder: " + ex.getMessage()); + return null; + } + + Arrays.sort(files); + MapFolder<G, A, R> result = null; + for (final File file : files) { + if (file.isFile()) { + try { + mapFolder.addPickmap(file.getName(), mapReaderFactory, pickmapManager); + } catch (final InvalidNameException ex) { + errorViewCollector.addWarning(ErrorViewCategory.PICKMAPS_FILE_INVALID, "ignoring pickmap with invalid name: " + ex.getMessage()); + } + } else if (file.isDirectory()) { + if (!file.getName().startsWith(".")) { + final MapFolder<G, A, R> tmp = load(mapFolder, file.getName()); + if (result == null && tmp != null && tmp.getPickmaps() > 0) { + result = tmp; + } + } + } + } + + return mapFolder.getPickmaps() > 0 ? mapFolder : result; + } + +} // class Loader Property changes on: trunk/src/app/net/sf/gridarta/gui/mapfiles/Loader.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:mergeinfo + /streams/cher-japi-update/src/app/net/sf/gridarta/mapfiles/Loader.java:5966-5991 Added: svn:eol-style + LF Copied: trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFile.java (from rev 8766, trunk/src/app/net/sf/gridarta/mapfiles/MapFile.java) =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFile.java (rev 0) +++ trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFile.java 2010-11-07 11:50:33 UTC (rev 8768) @@ -0,0 +1,241 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * 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 2 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.gui.mapfiles; + +import java.io.File; +import java.io.IOException; +import java.util.Collection; +import net.sf.gridarta.gui.map.mapview.MapView; +import net.sf.gridarta.gui.map.mapview.MapViewBasic; +import net.sf.gridarta.gui.map.mapview.MapViewsManager; +import net.sf.gridarta.mapmanager.MapManager; +import net.sf.gridarta.model.archetype.Archetype; +import net.sf.gridarta.model.gameobject.GameObject; +import net.sf.gridarta.model.io.MapReader; +import net.sf.gridarta.model.io.MapReaderFactory; +import net.sf.gridarta.model.maparchobject.MapArchObject; +import net.sf.gridarta.model.mapcontrol.MapControl; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * Maintains the state of a pickmap file. A <code>Pickmap</code> is part of a + * {@link MapFolder} which is part of {@link MapFolderTree}. A pickmap has an + * underlying file from which a {@link MapControl} instance may be created. + * @author Andreas Kirschbaum + */ +public class MapFile<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> { + + /** + * The folder this pickmap is part of. + */ + @NotNull + private final MapFolder<G, A, R> mapFolder; + + /** + * The underlying map file name. + */ + @NotNull + private final String name; + + /** + * The {@link MapManager} for creating new pickmaps. + */ + @NotNull + private final MapManager<G, A, R> pickmapManager; + + /** + * The {@link MapReaderFactory} to use. + */ + @NotNull + private final MapReaderFactory<G, A> mapReaderFactory; + + /** + * The {@link MapControl} instance representing the map file, or + * <code>null</code> if the map file is not loaded. + */ + @Nullable + private MapControl<G, A, R> pickmap = null; + + /** + * The {@link MapView} or {@link #pickmap}, or <code>null</code> if + * <code>pickmap == null</code>. + */ + @Nullable + private MapView<G, A, R> pickmapView = null; + + /** + * The {@link MapViewsManager}. + */ + @NotNull + private final MapViewsManager<G, A, R> mapViewsManager; + + /** + * The synchronization object for accessed to {@link #pickmap} and {@link + * #pickmapView}. + */ + @NotNull + private final Object sync = new Object(); + + /** + * Creates a new instance. + * @param mapFolder the folder ths pickmap is part of + * @param name the underlying map file name + * @param mapReaderFactory the map reader factory to use + * @param pickmapManager the map manager for creating pickmaps + * @param mapViewsManager the map views + * @throws InvalidNameException if <code>name</code> is not valid + */ + public MapFile(@NotNull final MapFolder<G, A, R> mapFolder, @NotNull final String name, @NotNull final MapReaderFactory<G, A> mapReaderFactory, @NotNull final MapManager<G, A, R> pickmapManager, @NotNull final MapViewsManager<G, A, R> mapViewsManager) throws InvalidNameException { + if (!isValidPickmapName(name)) { + throw new InvalidNameException(name); + } + + this.mapFolder = mapFolder; + this.name = name; + this.pickmapManager = pickmapManager; + this.mapReaderFactory = mapReaderFactory; + this.mapViewsManager = mapViewsManager; + } + + /** + * Returns whether a pickmap name is valid. + * @param name the name to check + * @return whether the name is valid + */ + public static boolean isValidPickmapName(@NotNull final String name) { + return name.matches("[-a-zA-Z_+ 0-9,]+"); + } + + /** + * Returns the underlying map file. + * @return the map file + */ + @NotNull + public File getFile() { + return new File(mapFolder.getDir(), name); + } + + /** + * Returns the {@link MapControl} representing this pickmap. Returns + * <code>null</code> unless {@link #loadPickmap()} was successfully called. + * @return the <code>MapControl</code> instance, or <code>null if the map + * file has not been loaded + */ + @Nullable + public MapControl<G, A, R> getPickmap() { + synchronized (sync) { + return pickmap; + } + } + + /** + * Returns the {@link MapViewBasic} instance for this pickmap. Returns + * <code>null</code> unless {@link #loadPickmap()} was successfully called. + * @return the <code>MapViewBasic</code> instance, or <code>null if the map + * file has not been loaded + */ + @Nullable + public MapViewBasic<G, A, R> getView() { + synchronized (sync) { + return pickmapView == null ? null : pickmapView.getMapViewBasic(); + } + } + + /** + * Loads the pickmap from the underlying map file. + * @throws IOException if the map file cannot be loaded + */ + public void loadPickmap() throws IOException { + synchronized (sync) { + if (pickmap != null) { + return; + } + + final File file = getFile(); + final MapReader<G, A> decoder = mapReaderFactory.newMapReader(file); + pickmap = pickmapManager.newMap(decoder.getGameObjects(), decoder.getMapArchObject(), file, true); + pickmapView = mapViewsManager.newMapView(pickmap, null); + } + } + + /** + * Unloads the map file. Undoes the effect of {@link #loadPickmap()}. + */ + public void freePickmap() { + synchronized (sync) { + if (pickmap != null) { + assert pickmapView != null; + mapViewsManager.closeView(pickmapView); + assert pickmap != null; + pickmapManager.release(pickmap); + pickmap = null; + } + } + } + + /** + * Returns this pickmap if it has been loaded and is modified. + * @param unsavedPickmaps the collection to add <code>this</code> to if + * modified + */ + public void getUnsavedPickmaps(@NotNull final Collection<MapControl<G, A, R>> unsavedPickmaps) { + synchronized (sync) { + if (pickmap != null && pickmap.getMapModel().isModified()) { + unsavedPickmaps.add(pickmap); + } + } + } + + /** + * Removes this pickmap from its folder. + * @param deleteFile if set, delete the map file as well + */ + public void remove(final boolean deleteFile) { + mapFolder.removePickmap(this, deleteFile); + } + + /** + * Saves this pickmap. Does nothing if the pickmap is not loaded or not + * modified. + * @throws IOException if saving fails + */ + public void save() throws IOException { + final MapControl<G, A, R> oldPickmap = getPickmap(); + if (oldPickmap != null && oldPickmap.getMapModel().isModified()) { + oldPickmap.save(); + } + } + + /** + * Reverts this pickmap to its underlying map file. Does nothing if the + * pickmap is not loaded. + * @throws IOException if the pickmap cannot be loaded + */ + public void revert() throws IOException { + final MapControl<G, A, R> oldPickmap = getPickmap(); + if (oldPickmap != null) { + freePickmap(); + loadPickmap(); + mapFolder.firePickmapReverted(this, oldPickmap); + } + } + +} // class MapFile Property changes on: trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFile.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:mergeinfo + /streams/cher-japi-update/src/app/net/sf/gridarta/mapfiles/MapFile.java:5966-5991 Added: svn:eol-style + LF Copied: trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFileNameComparator.java (from rev 8766, trunk/src/app/net/sf/gridarta/mapfiles/MapFileNameComparator.java) =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFileNameComparator.java (rev 0) +++ trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFileNameComparator.java 2010-11-07 11:50:33 UTC (rev 8768) @@ -0,0 +1,55 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * 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 2 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.gui.mapfiles; + +import java.io.Serializable; +import java.util.Comparator; + +/** + * A {@link Comparator} for comparing {@link MapFile}s by pickmap name. + * @author Andreas Kirschbaum + */ +public class MapFileNameComparator implements Comparator<MapFile<?, ?, ?>>, Serializable { + + /** + * The serial version UID. + */ + private static final long serialVersionUID = 1L; + + /** + * A {@link Comparator} that compares {@link MapFile} instances by name. + */ + public static final Comparator<MapFile<?, ?, ?>> INSTANCE = new MapFileNameComparator(); + + /** + * Private constructor to prevent instantiation. + */ + private MapFileNameComparator() { + } + + /** + * {@inheritDoc} + */ + @Override + public int compare(final MapFile<?, ?, ?> o1, final MapFile<?, ?, ?> o2) { + return String.CASE_INSENSITIVE_ORDER.compare(o1.getFile().getPath(), o2.getFile().getPath()); + } + +} // class MapFileNameComparator Property changes on: trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFileNameComparator.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:mergeinfo + /streams/cher-japi-update/src/app/net/sf/gridarta/mapfiles/MapFileNameComparator.java:5966-5991 Added: svn:eol-style + LF Copied: trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolder.java (from rev 8766, trunk/src/app/net/sf/gridarta/mapfiles/MapFolder.java) =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolder.java (rev 0) +++ trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolder.java 2010-11-07 11:50:33 UTC (rev 8768) @@ -0,0 +1,254 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * 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 2 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.gui.mapfiles; + +import java.io.File; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import net.sf.gridarta.gui.map.mapview.MapViewsManager; +import net.sf.gridarta.mapmanager.MapManager; +import net.sf.gridarta.model.archetype.Archetype; +import net.sf.gridarta.model.gameobject.GameObject; +import net.sf.gridarta.model.io.MapReaderFactory; +import net.sf.gridarta.model.maparchobject.MapArchObject; +import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.utils.EventListenerList2; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * Model class representing a folder of {@link MapFile}s. A folder has a name + * and a base directory. The name is a unique identifier in the model; the base + * directory is the directory where all contained pickmaps are stored. + * @author Andreas Kirschbaum + */ +public class MapFolder<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> implements Iterable<MapFile<G, A, R>> { + + /** + * The registered event listeners. + */ + private final EventListenerList2<MapFolderListener<G, A, R>> listeners = new EventListenerList2<MapFolderListener<G, A, R>>(MapFolderListener.class); + + /** + * The parent folder, or <code>null</code> if it is a top-level folder. + */ + @Nullable + private final MapFolder<G, A, R> parent; + + /** + * The synchronization object for accesses to {@link #mapFiles}. + */ + @NotNull + private final Object sync = new Object(); + + /** + * The folder's name. + */ + @NotNull + private final String name; + + /** + * The base directory for folder file names. + */ + @NotNull + private final File baseDir; + + /** + * The {@link MapViewsManager}. + */ + @NotNull + private final MapViewsManager<G, A, R> mapViewsManager; + + /** + * The pickmaps of this folder. + */ + private final List<MapFile<G, A, R>> mapFiles = new ArrayList<MapFile<G, A, R>>(); + + /** + * Creates a new instance. + * @param parent the parent folder, or <code>null</code> if it is a + * top-level folder + * @param name the name + * @param baseDir the base directory for folder file names + * @param mapViewsManager the map views + * @throws InvalidNameException if <code>name</code> is not valid + */ + public MapFolder(@Nullable final MapFolder<G, A, R> parent, @NotNull final String name, @NotNull final File baseDir, @NotNull final MapViewsManager<G, A, R> mapViewsManager) throws InvalidNameException { + this.baseDir = baseDir; + this.mapViewsManager = mapViewsManager; + if (parent == null ? name.length() > 0 : !name.matches("[-a-zA-Z_+ 0-9,]+")) { + throw new InvalidNameException(name); + } + + this.parent = parent; + this.name = name; + } + + /** + * Returns the parent folder. + * @return the parent folder, or <code>null</code> if this folder is a + * top-level folder + */ + @Nullable + public MapFolder<G, A, R> getParent() { + return parent; + } + + /** + * Returns the name. + * @return the name + */ + @NotNull + public String getName() { + if (parent == null) { + return "*default*"; + } + + return parent.parent == null ? name : parent.getName() + "/" + name; + } + + /** + * Returns the base directory. + * @return the base directory + */ + @NotNull + public File getDir() { + return parent != null ? new File(parent.getDir(), name) : baseDir; + } + + /** + * Adds a new {@link MapFile} to this folder. + * @param name the map file name + * @param mapReaderFactory the map reader factory instance + * @param pickmapManager the map manager for loading pickmaps + * @return the newly created pickmap + * @throws InvalidNameException if the pickmap name is invalid + */ + public MapFile<G, A, R> addPickmap(@NotNull final String name, @NotNull final MapReaderFactory<G, A> mapReaderFactory, @NotNull final MapManager<G, A, R> pickmapManager) throws InvalidNameException { + final MapFile<G, A, R> mapFile; + synchronized (sync) { + mapFile = new MapFile<G, A, R>(this, name, mapReaderFactory, pickmapManager, mapViewsManager); + mapFiles.add(mapFile); + } + for (final MapFolderListener<G, A, R> listenerMap : listeners.getListeners()) { + listenerMap.pickmapAdded(mapFile); + } + return mapFile; + } + + /** + * Removes a {@link MapFile} from this folder. + * @param mapFile the pickmap to remove + * @param deleteFile if set, also remove the map files + */ + public void removePickmap(@NotNull final MapFile<G, A, R> mapFile, final boolean deleteFile) { + synchronized (sync) { + final int index = mapFiles.indexOf(mapFile); + if (index == -1) { + throw new IllegalArgumentException(); + } + if (deleteFile) { + final File file = mapFile.getFile(); + file.delete(); + } + mapFiles.remove(index); + } + for (final MapFolderListener<G, A, R> listenerMap : listeners.getListeners()) { + listenerMap.pickmapRemoved(mapFile); + } + mapFile.freePickmap(); + } + + /** + * Removes all {@link MapFile} from this folder. + * @param deleteFile if set, also remove the map file + */ + public void removeAllPickmaps(final boolean deleteFile) { + while (true) { + final MapFile<G, A, R> mapFile; + synchronized (sync) { + if (mapFiles.isEmpty()) { + break; + } + mapFile = mapFiles.get(mapFiles.size() - 1); + } + removePickmap(mapFile, deleteFile); + } + } + + /** + * Returns an {@link Iterator} returning all pickmaps of this folder in + * arbitrary order. + * @return the iterator + */ + @Override + public Iterator<MapFile<G, A, R>> iterator() { + return Collections.unmodifiableList(mapFiles).iterator(); + } + + /** + * Returns the number of pickmaps in this folder. + * @return the number of pickmaps + */ + public int getPickmaps() { + return mapFiles.size(); + } + + /** + * Adds a {@link MapFolderListener} to be notified of events. + * @param listenerMap the listener to add + */ + public void addFolderListener(@NotNull final MapFolderListener<G, A, R> listenerMap) { + listeners.add(listenerMap); + } + + /** + * Removes a {@link MapFolderListener} to be notified of events. + * @param listenerMap the listener to remove + */ + public void removeFolderListener(@NotNull final MapFolderListener<G, A, R> listenerMap) { + listeners.remove(listenerMap); + } + + /** + * Returns all unsaved {@link MapFile}s in this folder. + * @param unsavedPickmaps the collection to add the unsaved pickmaps to + */ + public void getUnsavedPickmaps(@NotNull final Collection<MapControl<G, A, R>> unsavedPickmaps) { + for (final MapFile<G, A, R> mapFile : mapFiles) { + mapFile.getUnsavedPickmaps(unsavedPickmaps); + } + } + + /** + * Notifies all listeners about a reverted pickmap. + * @param mapFile the pickmap that was reverted + * @param oldPickmap the map control of the pickmap before reverting + */ + public void firePickmapReverted(@NotNull final MapFile<G, A, R> mapFile, @NotNull final MapControl<G, A, R> oldPickmap) { + for (final MapFolderListener<G, A, R> listenerMap : listeners.getListeners()) { + listenerMap.pickmapReverted(mapFile, oldPickmap); + } + } + +} // class MapFolder Property changes on: trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolder.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:mergeinfo + /streams/cher-japi-update/src/app/net/sf/gridarta/mapfiles/MapFolder.java:5966-5991 Added: svn:eol-style + LF Copied: trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderListener.java (from rev 8766, trunk/src/app/net/sf/gridarta/mapfiles/MapFolderListener.java) =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderListener.java (rev 0) +++ trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderListener.java 2010-11-07 11:50:33 UTC (rev 8768) @@ -0,0 +1,56 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * 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 2 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.gui.mapfiles; + +import java.util.EventListener; +import net.sf.gridarta.model.archetype.Archetype; +import net.sf.gridarta.model.gameobject.GameObject; +import net.sf.gridarta.model.maparchobject.MapArchObject; +import net.sf.gridarta.model.mapcontrol.MapControl; +import org.jetbrains.annotations.NotNull; + +/** + * Interface for listeners interested in events of {@link MapFolder}s. + * @author Andreas Kirschbaum + */ +public interface MapFolderListener<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends EventListener { + + /** + * A pickmap has been added to the folder. + * @param mapFile the added pickmap + */ + void pickmapAdded(@NotNull MapFile<G, A, R> mapFile); + + /** + * A pickmap has been removed from the folder. The passed + * <code>pickmap</code> instance has not been removed from its {@link + * MapFolder} but not yet unloaded. + * @param mapFile the removed pickmap + */ + void pickmapRemoved(@NotNull MapFile<G, A, R> mapFile); + + /** + * A pickmap has been reverted to the contents of its underlying file. + * @param mapFile the reverted pickmap + * @param oldPickmap the map control of the pickmap before revert + */ + void pickmapReverted(@NotNull MapFile<G, A, R> mapFile, @NotNull MapControl<G, A, R> oldPickmap); + +} // class MapFolderListener Copied: trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderNotEmptyException.java (from rev 8766, trunk/src/app/net/sf/gridarta/mapfiles/MapFolderNotEmptyException.java) =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderNotEmptyException.java (rev 0) +++ trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderNotEmptyException.java 2010-11-07 11:50:33 UTC (rev 8768) @@ -0,0 +1,43 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * 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 2 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.gui.mapfiles; + +import org.jetbrains.annotations.NotNull; + +/** + * Indicates that a folder contains sub-folders. + * @author Andreas Kirschbaum + */ +public class MapFolderNotEmptyException extends Exception { + + /** + * The serial version UID. + */ + private static final long serialVersionUID = 1L; + + /** + * Creates a new instance. + * @param folderName the folder + */ + public MapFolderNotEmptyException(@NotNull final String folderName) { + super("folder contains sub-folders: " + folderName); + } + +} // MapFolderNotEmptyException Property changes on: trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderNotEmptyException.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:mergeinfo + /streams/cher-japi-update/src/app/net/sf/gridarta/mapfiles/MapFolderNotEmptyException.java:5966-5991 Added: svn:eol-style + LF Copied: trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTree.java (from rev 8766, trunk/src/app/net/sf/gridarta/mapfiles/MapFolderTree.java) =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTree.java (rev 0) +++ trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTree.java 2010-11-07 11:50:33 UTC (rev 8768) @@ -0,0 +1,215 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * 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 2 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.gui.mapfiles; + +import java.io.File; +import java.util.Collection; +import java.util.Collections; +import java.util.Iterator; +import java.util.Map; +import java.util.TreeMap; +import net.sf.gridarta.model.archetype.Archetype; +import net.sf.gridarta.model.gameobject.GameObject; +import net.sf.gridarta.model.maparchobject.MapArchObject; +import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.utils.EventListenerList2; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * Stores all known {@link MapFile}s. The map files are grouped into {@link + * MapFolder}s. One of these folder can be the "active folder"; this is the + * folder the GUI operates on. + * @author Andreas Kirschbaum + */ +public class MapFolderTree<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> implements Iterable<MapFolder<G, A, R>> { + + /** + * The registered event listeners. + */ + private final EventListenerList2<MapFolderTreeListener<G, A, R>> listeners = new EventListenerList2<MapFolderTreeListener<G, A, R>>(MapFolderTreeListener.class); + + /** + * The base directory for creating new map folders. + */ + @NotNull + private final File baseDir; + + /** + * The active map folder. + */ + @Nullable + private MapFolder<G, A, R> activeMapFolder = null; + + /** + * The folders. Maps folder name to folder instance. + */ + private final TreeMap<String, MapFolder<G, A, R>> mapFolders = new TreeMap<String, MapFolder<G, A, R>>(); + + /** + * Creates a new instance. + * @param baseDir the base directory for creating new map folders + */ + public MapFolderTree(@NotNull final File baseDir) { + this.baseDir = baseDir; + } + + /** + * Returns the base directory for creating new map folders. + * @return the base directory for creating new map folders + */ + @NotNull + public File getBaseDir() { + return baseDir; + } + + /** + * Adds a map folder to this model. The added map folder's name must be + * different from all existing map folder names. + * @param mapFolder the map folder to add + * @throws DuplicateMapFolderException if the map folder's name is not + * unique + */ + public synchronized void addMapFolder(@NotNull final MapFolder<G, A, R> mapFolder) throws DuplicateMapFolderException { + final MapFolder<G, A, R> parent = mapFolder.getParent(); + if (parent != null && !mapFolders.containsKey(parent.getName())) { + throw new IllegalArgumentException(); + } + final String folderName = mapFolder.getName(); + if (mapFolders.containsKey(folderName)) { + throw new DuplicateMapFolderException(folderName); + } + mapFolders.put(folderName, mapFolder); + for (final MapFolderTreeListener<G, A, R> listener : listeners.getListeners()) { + listener.folderAdded(mapFolder); + } + } + + /** + * Removes a map folder from this model. If the active map folder is + * removed, the next or previous map folder becomes the active folder. + * @param mapFolder the map folder to remove + * @param deleteFile if set, also remove the map files + * @throws MapFolderNotEmptyException if the map folder contains + * sub-folders + */ + public synchronized void removeMapFolder(@NotNull final MapFolder<G, A, R> mapFolder, final boolean deleteFile) throws MapFolderNotEmptyException { + if (mapFolders.get(mapFolder.getName()) != mapFolder) { + throw new IllegalArgumentException(); + } + for (final MapFolder<G, A, R> child : mapFolders.values()) { + if (child.getParent() == mapFolder) { + throw new MapFolderNotEmptyException(mapFolder.getName()); + } + } + mapFolder.removeAllPickmaps(true); + if (deleteFile) { + mapFolder.getDir().delete(); + } + if (mapFolder == activeMapFolder) { + final Map.Entry<String, MapFolder<G, A, R>> higherEntry = mapFolders.higherEntry(mapFolder.getName()); + if (higherEntry != null) { + activeMapFolder = higherEntry.getValue(); + } else { + final Map.Entry<String, MapFolder<G, A, R>> lowerEntry = mapFolders.lowerEntry(mapFolder.getName()); + if (lowerEntry != null) { + activeMapFolder = lowerEntry.getValue(); + } else { + activeMapFolder = null; + } + } + fireActiveMapFolderChanged(); + } + mapFolders.remove(mapFolder.getName()); + for (final MapFolderTreeListener<G, A, R> listener : listeners.getListeners()) { + listener.folderRemoved(mapFolder); + } + } + + /** + * Returns the active map folder. + * @return the active map folder or <code>null</code> if no folder is + * active + */ + @Nullable + public MapFolder<G, A, R> getActiveMapFolder() { + return activeMapFolder; + } + + /** + * Sets the active map folder. The passed map folder must be part of this + * model. + * @param mapFolder the active map folder or <code>null</code> if no folder + * should be active + */ + public synchronized void setActiveMapFolder(@NotNull final MapFolder<G, A, R> mapFolder) { + if (activeMapFolder == mapFolder) { + return; + } + + activeMapFolder = mapFolder; + fireActiveMapFolderChanged(); + } + + /** + * Notifies all listeners that the active folder has changed. + */ + private void fireActiveMapFolderChanged() { + for (final MapFolderTreeListener<G, A, R> listener : listeners.getListeners()) { + listener.activeMapFolderChanged(activeMapFolder); + } + } + + /** + * Returns an {@link Iterator} returning all map folders. The folders are + * sorted by folder name. + */ + @Override + public Iterator<MapFolder<G, A, R>> iterator() { + return Collections.unmodifiableCollection(mapFolders.values()).iterator(); + } + + /** + * Adds a {@link MapFolderTreeListener} to be informed about changes. + * @param listener the listener to add + */ + public void addModelListener(@NotNull final MapFolderTreeListener<G, A, R> listener) { + listeners.add(listener); + } + + /** + * Removes a {@link MapFolderTreeListener} to be informed about changes. + * @param listener the listener to remove + */ + public void removeModelListener(@NotNull final MapFolderTreeListener<G, A, R> listener) { + listeners.remove(listener); + } + + /** + * Returns all unsaved map controls of this model. + * @param unsavedMaps the collection to add the unsaved pickmaps to + */ + public void getUnsavedPickmaps(@NotNull final Collection<MapControl<G, A, R>> unsavedMaps) { + for (final MapFolder<G, A, R> mapFolder : mapFolders.values()) { + mapFolder.getUnsavedPickmaps(unsavedMaps); + } + } + +} // class MapFolderTree Property changes on: trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTree.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:mergeinfo + /streams/cher-japi-update/src/app/net/sf/gridarta/mapfiles/MapFolderTree.java:5966-5991 Added: svn:eol-style + LF Modified: trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTreeAction.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTreeAction.java 2010-11-07 10:27:33 UTC (rev 8767) +++ trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTreeAction.java 2010-11-07 11:50:33 UTC (rev 8768) @@ -22,8 +22,6 @@ import java.awt.event.ActionEvent; import javax.swing.AbstractAction; import javax.swing.AbstractButton; -import net.sf.gridarta.mapfiles.MapFolder; -import net.sf.gridarta.mapfiles.MapFolderTree; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; Modified: trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTreeActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTreeActions.java 2010-11-07 10:27:33 UTC (rev 8767) +++ trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTreeActions.java 2010-11-07 11:50:33 UTC (rev 8768) @@ -24,10 +24,6 @@ import javax.swing.JMenu; import net.sf.gridarta.gui.newmap.NewMapDialogFactory; import net.sf.gridarta.gui.utils.MenuUtils; -import net.sf.gridarta.mapfiles.MapFolder; -import net.sf.gridarta.mapfiles.MapFolderNotEmptyException; -import net.sf.gridarta.mapfiles.MapFolderTree; -import net.sf.gridarta.mapfiles.MapFolderTreeListener; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; Copied: trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTreeListener.java (from rev 8766, trunk/src/app/net/sf/gridarta/mapfiles/MapFolderTreeListener.java) =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTreeListener.java (rev 0) +++ trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTreeListener.java 2010-11-07 11:50:33 UTC (rev 8768) @@ -0,0 +1,54 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * 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 2 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.gui.mapfiles; + +import java.util.EventListener; +import net.sf.gridarta.model.archetype.Archetype; +import net.sf.gridarta.model.gameobject.GameObject; +import net.sf.gridarta.model.maparchobject.MapArchObject; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * Interface for listeners interested in events of {@link MapFolderTree}s. + * @author Andreas Kirschbaum + */ +public interface MapFolderTreeListener<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends EventListener { + + /** + * The active folder has changed. + * @param mapFolder the new active folder, or <code>null</code> if no folder + * is active + */ + void activeMapFolderChanged(@Nullable MapFolder<G, A, R> mapFolder); + + /** + * A folder has been added to the model. + * @param mapFolder the added folder + */ + void folderAdded(@NotNull MapFolder<G, A, R> mapFolder); + + /** + * A folder has been removed from the model. + * @param mapFolder the removed folder + */ + void folderRemoved(@NotNull MapFolder<G, A, R> mapFolder); + +} // class MapFolderTreeListener Property changes on: trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTreeListener.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:mergeinfo + /streams/cher-japi-update/src/app/net/sf/gridarta/mapfiles/MapFolderTreeListener.java:5966-5991 Added: svn:eol-style + LF Modified: trunk/src/app/net/sf/gridarta/gui/newmap/NewMapDialogFactory.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/newmap/NewMapDialogFactory.java 2010-11-07 10:27:33 UTC (rev 8767) +++ trunk/src/app/net/sf/gridarta/gui/newmap/NewMapDialogFactory.java 2010-11-07 11:50:33 UTC (rev 8768) @@ -21,10 +21,10 @@ import java.awt.Component; import net.sf.gridarta.gui.map.mapview.MapViewsManager; +import net.sf.gridarta.gui.mapfiles.MapFolder; +import net.sf.gridarta.gui.mapfiles.MapFolderTree; import net.sf.gridarta.gui.objectchooser.ObjectChooser; import net.sf.gridarta.gui.pickmapchooser.PickmapChooserControl; -import net.sf.gridarta.mapfiles.MapFolder; -import net.sf.gridarta.mapfiles.MapFolderTree; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; Modified: trunk/src/app/net/sf/gridarta/gui/newmap/NewPickmapDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/newmap/NewPickmapDialog.java 2010-11-07 10:27:33 UTC (rev 8767) +++ trunk/src/app/net/sf/gridarta/gui/newmap/NewPickmapDialog.java 2010-11-07 11:50:33 UTC (rev 8768) @@ -25,9 +25,9 @@ import javax.swing.JPanel; import javax.swing.JTextField; import javax.swing.text.JTextComponent; +import net.sf.gridarta.gui.mapfiles.DuplicatePickmapException; import net.sf.gridarta.gui.objectchooser.ObjectChooser; import net.sf.gridarta.gui.pickmapchooser.PickmapChooserControl; -import net.sf.gridarta.mapfiles.DuplicatePickmapException; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; Modified: trunk/src/app/net/sf/gridarta/gui/newmap/NewPickmapFolderDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/newmap/NewPickmapFolderDialog.java 2010-11-07 10:27:33 UTC (rev 8767) +++ trunk/src/app/net/sf/gridarta/gui/newmap/NewPickmapFolderDialog.java 2010-11-07 11:50:33 UTC (rev 8768) @@ -27,10 +27,10 @@ import javax.swing.JTextField; import javax.swing.text.JTextComponent; import net.sf.gridarta.gui.map.mapview.MapViewsManager; -import net.sf.gridarta.mapfiles.DuplicateMapFolderException; -import net.sf.gridarta.mapfiles.InvalidNameException; -import net.sf.gridarta.mapfiles.MapFolder; -import net.sf.gridarta.mapfiles.MapFolderTree; +import net.sf.gridarta.gui.mapfiles.DuplicateMapFolderException; +import net.sf.gridarta.gui.mapfiles.InvalidNameException; +import net.sf.gridarta.gui.mapfiles.MapFolder; +import net.sf.gridarta.gui.mapfiles.MapFolderTree; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; Modified: trunk/src/app/net/sf/gridarta/gui/objectchooser/DefaultObjectChooser.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/objectchooser/DefaultObjectChooser.java 2010-11-07 10:27:33 UTC (rev 8767) +++ trunk/src/app/net/sf/gridarta/gui/objectchooser/DefaultObjectChooser.java 2010-11-07 11:50:33 UTC (rev 8768) @@ -31,10 +31,10 @@ import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import net.sf.gridarta.gui.map.mapview.MapViewBasic; +import net.sf.gridarta.gui.mapfiles.MapFile; import net.sf.gridarta.gui.objectchoicedisplay.ObjectChoiceDisplay; import net.sf.gridarta.gui.pickmapchooser.PickmapChooserModel; import net.sf.gridarta.gui.pickmapchooser.PickmapChooserModelListener; -import net.sf.gridarta.mapfiles.MapFile; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.archetypechooser.ArchetypeChooserFolder; import net.sf.gridarta.model.archetypechooser.ArchetypeChooserModel; Modified: trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java 2010-11-07 10:27:33 UTC (rev 8767) +++ trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java 2010-11-07 11:50:33 UTC (rev 8768) @@ -34,13 +34,13 @@ import javax.swing.event.ChangeListener; import net.sf.gridarta.gui.map.mapview.MapView; import net.sf.gridarta.gui.map.mapview.MapViewsManager; +import net.sf.gridarta.gui.mapfiles.DuplicatePickmapException; +import net.sf.gridarta.gui.mapfiles.InvalidNameException; +import net.sf.gridarta.gui.mapfiles.MapFile; +import net.sf.gridarta.gui.mapfiles.MapFolder; +import net.sf.gridarta.gui.mapfiles.MapFolderTree; import net.sf.gridarta.gui.newmap.NewMapDialogFactory; import net.sf.gridarta.gui.objectchooser.ObjectChooserTab; -import net.sf.gridarta.mapfiles.DuplicatePickmapException; -import net.sf.gridarta.mapfiles.InvalidNameException; -import net.sf.gridarta.mapfiles.MapFile; -import net.sf.gridarta.mapfiles.MapFolder; -imp... [truncated message content] |
From: <aki...@us...> - 2010-11-07 10:27:39
|
Revision: 8767 http://gridarta.svn.sourceforge.net/gridarta/?rev=8767&view=rev Author: akirschbaum Date: 2010-11-07 10:27:33 +0000 (Sun, 07 Nov 2010) Log Message: ----------- Force non-GUI mode when using --script. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/crossfire/ChangeLog trunk/daimonin/ChangeLog trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2010-11-06 15:27:29 UTC (rev 8766) +++ trunk/atrinik/ChangeLog 2010-11-07 10:27:33 UTC (rev 8767) @@ -1,3 +1,7 @@ +2010-11-07 Andreas Kirschbaum + + * Force non-GUI mode when using --script. + 2010-11-05 Andreas Kirschbaum * Add "type" attribute to <Attrib> game object matchers. Allowed Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2010-11-06 15:27:29 UTC (rev 8766) +++ trunk/crossfire/ChangeLog 2010-11-07 10:27:33 UTC (rev 8767) @@ -1,3 +1,7 @@ +2010-11-07 Andreas Kirschbaum + + * Force non-GUI mode when using --script. + 2010-11-06 Andreas Kirschbaum * Update game object matchers to treat game objects having Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2010-11-06 15:27:29 UTC (rev 8766) +++ trunk/daimonin/ChangeLog 2010-11-07 10:27:33 UTC (rev 8767) @@ -1,3 +1,7 @@ +2010-11-07 Andreas Kirschbaum + + * Force non-GUI mode when using --script. + 2010-11-05 Andreas Kirschbaum * Add "type" attribute to <Attrib> game object matchers. Allowed Modified: trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java 2010-11-06 15:27:29 UTC (rev 8766) +++ trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java 2010-11-07 10:27:33 UTC (rev 8767) @@ -230,7 +230,7 @@ actionBuilder.addParent(ActionBuilderFactory.getInstance().getActionBuilder(actionBuilderPackage)); // Create the application and give it the parameters - final ErrorView errorView = GraphicsEnvironment.isHeadless() || mode.isConsoleMode() ? new ConsoleErrorView() : new DefaultErrorView(null); + final ErrorView errorView = GraphicsEnvironment.isHeadless() || mode.isConsoleMode() || script != null ? new ConsoleErrorView() : new DefaultErrorView(null); final GUIUtils guiUtils = new GUIUtils(); final SystemIcons systemIcons = new SystemIcons(guiUtils); final ConfigSourceFactory configSourceFactory = new DefaultConfigSourceFactory(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-11-06 16:23:03
|
Revision: 8766 http://gridarta.svn.sourceforge.net/gridarta/?rev=8766&view=rev Author: akirschbaum Date: 2010-11-06 15:27:29 +0000 (Sat, 06 Nov 2010) Log Message: ----------- Add configuration files for building .deb packages. Modified Paths: -------------- trunk/INSTALL Added Paths: ----------- trunk/debian/ trunk/debian/changelog trunk/debian/compat trunk/debian/control trunk/debian/copyright trunk/debian/docs trunk/debian/gridarta-atrinik.install trunk/debian/gridarta-atrinik.manpages trunk/debian/gridarta-atrinik.menu trunk/debian/gridarta-common.install trunk/debian/gridarta-common.manpages trunk/debian/gridarta-crossfire.install trunk/debian/gridarta-crossfire.manpages trunk/debian/gridarta-crossfire.menu trunk/debian/gridarta-daimonin.install trunk/debian/gridarta-daimonin.manpages trunk/debian/gridarta-daimonin.menu trunk/debian/gridarta.substvars trunk/debian/rules trunk/debian/source/ trunk/debian/source/format trunk/misc/ trunk/misc/gridarta-atrinik trunk/misc/gridarta-atrinik.6 trunk/misc/gridarta-atrinik.desktop trunk/misc/gridarta-crossfire trunk/misc/gridarta-crossfire.6 trunk/misc/gridarta-crossfire.desktop trunk/misc/gridarta-daimonin trunk/misc/gridarta-daimonin.6 trunk/misc/gridarta-daimonin.desktop trunk/misc/gridarta.6 trunk/misc/gridartarc Modified: trunk/INSTALL =================================================================== --- trunk/INSTALL 2010-11-06 07:30:10 UTC (rev 8765) +++ trunk/INSTALL 2010-11-06 15:27:29 UTC (rev 8766) @@ -25,7 +25,9 @@ CrossfireEditor.jar, and DaimoninEditor.jar. To find out options about building Gridarta, run "ant -projecthelp". +To build Debian packages, run "debuild -uc -us". + How to Run ---------- java -jar AtrinikEditor.jar Property changes on: trunk/debian ___________________________________________________________________ Added: svn:ignore + files gridarta-atrinik gridarta-atrinik.debhelper.log gridarta-atrinik.postinst.debhelper gridarta-atrinik.postrm.debhelper gridarta-atrinik.substvars gridarta-common gridarta-common.debhelper.log gridarta-common.substvars gridarta-crossfire gridarta-crossfire.debhelper.log gridarta-crossfire.postinst.debhelper gridarta-crossfire.postrm.debhelper gridarta-crossfire.substvars gridarta-daimonin gridarta-daimonin.debhelper.log gridarta-daimonin.postinst.debhelper gridarta-daimonin.postrm.debhelper gridarta-daimonin.substvars gridarta.debhelper.log Added: trunk/debian/changelog =================================================================== --- trunk/debian/changelog (rev 0) +++ trunk/debian/changelog 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1,5 @@ +gridarta (0.8.trunk) unstable; urgency=low + + * Initial Release. + + -- Andreas Kirschbaum <aki...@us...> Wed, 6 Nov 2010 11:48:52 +0200 Property changes on: trunk/debian/changelog ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/debian/compat =================================================================== --- trunk/debian/compat (rev 0) +++ trunk/debian/compat 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1 @@ +7 Property changes on: trunk/debian/compat ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/debian/control =================================================================== --- trunk/debian/control (rev 0) +++ trunk/debian/control 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1,48 @@ +Source: gridarta +Section: editors +Priority: optional +Maintainer: Andreas Kirschbaum <aki...@us...> +Build-Depends: debhelper (>= 7.0.50~), ant, ant-optional, openjdk-6-jdk | sun-java6-jdk +Standards-Version: 3.9.1 +Homepage: http://gridarta.sourceforge.net/ + +Package: gridarta-common +Architecture: all +Depends: ${misc:Depends} +Description: Common files for Gridarta + Gridarta is a map editor for Atrinik, Crossfire, and Daimonin map files. + . + This package contains common files for all editor variants. + +Package: gridarta-atrinik +Architecture: all +Tag: implemented-in::java, interface::x11, works-with::atrinik, x11::application, role::program, scope::application +Depends: ${misc:Depends}, openjdk-6-jre | sun-java6-jre +#Recommends: atrinik-maps +Suggests: menu +Description: A map editor for Atrinik map files + Gridarta is a map editor for Atrinik, Crossfire, and Daimonin map files. + . + This package contains the editor variant for Atrinik map files. + +Package: gridarta-crossfire +Architecture: all +Tag: implemented-in::java, interface::x11, works-with::crossfire, x11::application, role::program, scope::application +Depends: ${misc:Depends}, openjdk-6-jre | sun-java6-jre +Recommends: crossfire-maps +Suggests: menu +Description: A map editor for Crossfire map files + Gridarta is a map editor for Atrinik, Crossfire, and Daimonin map files. + . + This package contains the editor variant for Crossfire map files. + +Package: gridarta-daimonin +Architecture: all +Tag: implemented-in::java, interface::x11, works-with::daimonin, x11::application, role::program, scope::application +Depends: ${misc:Depends}, openjdk-6-jre | sun-java6-jre +#Recommends: daimonin-maps +Suggests: menu +Description: A map editor for Daimonin map files + Gridarta is a map editor for Atrinik, Crossfire, and Daimonin map files. + . + This package contains the editor variant for Daimonin map files. Property changes on: trunk/debian/control ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/debian/copyright =================================================================== --- trunk/debian/copyright (rev 0) +++ trunk/debian/copyright 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1,45 @@ +This work was packaged for Debian by: + + Andreas Kirschbaum <aki...@us...> on Wed, 6 Nov 2010 11:48:52 +0200 + +It was downloaded from: + + <https://gridarta.svn.sourceforge.net/svnroot/gridarta/trunk> + +Upstream Author(s): + Pasi Keränen + Michael Tönnies <in...@da...> + Andreas Vogel <av...@us...> + Christian Hujer <ch...@ri...> + Daniel Viegas <der...@us...> + Andreas Kirschbaum <aki...@us...> + +Copyright: + Copyright (C) 2000-2010 The Gridarta Developers. + +License: + + This package 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 2 of the License, or + (at your option) any later version. + + This package 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 <http://www.gnu.org/licenses/> + +On Debian systems, the complete text of the GNU General +Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". + +The Debian packaging is: + + Copyright (C) 2010 Andreas Kirschbaum <aki...@us...> + +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 2 of the License, or +(at your option) any later version. Property changes on: trunk/debian/copyright ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/debian/docs =================================================================== --- trunk/debian/docs (rev 0) +++ trunk/debian/docs 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1 @@ +README Property changes on: trunk/debian/docs ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/debian/gridarta-atrinik.install =================================================================== --- trunk/debian/gridarta-atrinik.install (rev 0) +++ trunk/debian/gridarta-atrinik.install 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1,3 @@ +AtrinikEditor.jar usr/share/java +misc/gridarta-atrinik usr/bin +misc/gridarta-atrinik.desktop usr/share/applications Property changes on: trunk/debian/gridarta-atrinik.install ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/debian/gridarta-atrinik.manpages =================================================================== --- trunk/debian/gridarta-atrinik.manpages (rev 0) +++ trunk/debian/gridarta-atrinik.manpages 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1 @@ +misc/gridarta-atrinik.6 Property changes on: trunk/debian/gridarta-atrinik.manpages ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/debian/gridarta-atrinik.menu =================================================================== --- trunk/debian/gridarta-atrinik.menu (rev 0) +++ trunk/debian/gridarta-atrinik.menu 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1,2 @@ +?package(gridarta-atrinik):needs="X11" section="Games/Tools" \ + title="Gridarta for Atrinik" command="/usr/bin/gridarta-atrinik" Property changes on: trunk/debian/gridarta-atrinik.menu ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/debian/gridarta-common.install =================================================================== --- trunk/debian/gridarta-common.install (rev 0) +++ trunk/debian/gridarta-common.install 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1 @@ +misc/gridartarc etc/gridarta Property changes on: trunk/debian/gridarta-common.install ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/debian/gridarta-common.manpages =================================================================== --- trunk/debian/gridarta-common.manpages (rev 0) +++ trunk/debian/gridarta-common.manpages 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1 @@ +misc/gridarta.6 Property changes on: trunk/debian/gridarta-common.manpages ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/debian/gridarta-crossfire.install =================================================================== --- trunk/debian/gridarta-crossfire.install (rev 0) +++ trunk/debian/gridarta-crossfire.install 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1,3 @@ +CrossfireEditor.jar usr/share/java +misc/gridarta-crossfire usr/bin +misc/gridarta-crossfire.desktop usr/share/applications Property changes on: trunk/debian/gridarta-crossfire.install ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/debian/gridarta-crossfire.manpages =================================================================== --- trunk/debian/gridarta-crossfire.manpages (rev 0) +++ trunk/debian/gridarta-crossfire.manpages 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1 @@ +misc/gridarta-crossfire.6 Property changes on: trunk/debian/gridarta-crossfire.manpages ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/debian/gridarta-crossfire.menu =================================================================== --- trunk/debian/gridarta-crossfire.menu (rev 0) +++ trunk/debian/gridarta-crossfire.menu 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1,2 @@ +?package(gridarta-crossfire):needs="X11" section="Games/Tools" \ + title="Gridarta for Crossfire" command="/usr/bin/gridarta-crossfire" Property changes on: trunk/debian/gridarta-crossfire.menu ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/debian/gridarta-daimonin.install =================================================================== --- trunk/debian/gridarta-daimonin.install (rev 0) +++ trunk/debian/gridarta-daimonin.install 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1,3 @@ +DaimoninEditor.jar usr/share/java +misc/gridarta-daimonin usr/bin +misc/gridarta-daimonin.desktop usr/share/applications Property changes on: trunk/debian/gridarta-daimonin.install ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/debian/gridarta-daimonin.manpages =================================================================== --- trunk/debian/gridarta-daimonin.manpages (rev 0) +++ trunk/debian/gridarta-daimonin.manpages 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1 @@ +misc/gridarta-daimonin.6 Property changes on: trunk/debian/gridarta-daimonin.manpages ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/debian/gridarta-daimonin.menu =================================================================== --- trunk/debian/gridarta-daimonin.menu (rev 0) +++ trunk/debian/gridarta-daimonin.menu 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1,2 @@ +?package(gridarta-daimonin):needs="X11" section="Games/Tools" \ + title="Gridarta for Daimonin" command="/usr/bin/gridarta-daimonin" Property changes on: trunk/debian/gridarta-daimonin.menu ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/debian/gridarta.substvars =================================================================== --- trunk/debian/gridarta.substvars (rev 0) +++ trunk/debian/gridarta.substvars 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1 @@ +misc:Depends= Property changes on: trunk/debian/gridarta.substvars ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/debian/rules =================================================================== --- trunk/debian/rules (rev 0) +++ trunk/debian/rules 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1,12 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +%: + dh $@ + +override_dh_auto_test: + dh_auto_test + ant test Property changes on: trunk/debian/rules ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/debian/source/format =================================================================== --- trunk/debian/source/format (rev 0) +++ trunk/debian/source/format 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1 @@ +3.0 (native) Property changes on: trunk/debian/source/format ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/misc/gridarta-atrinik =================================================================== --- trunk/misc/gridarta-atrinik (rev 0) +++ trunk/misc/gridarta-atrinik 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1,12 @@ +#!/bin/sh + +for rcfile in /etc/gridarta/gridartarc ~/.gridarta/gridartarc; do + if [ -e "$rcfile" ]; then + . "$rcfile" + fi +done + +. /usr/lib/java-wrappers/java-wrappers.sh +require_java_runtime +locate_jar AtrinikEditor.jar +"$JAVA_CMD" -jar "$found_jar" "$@" Property changes on: trunk/misc/gridarta-atrinik ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/misc/gridarta-atrinik.6 =================================================================== --- trunk/misc/gridarta-atrinik.6 (rev 0) +++ trunk/misc/gridarta-atrinik.6 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1 @@ +.so man6/gridarta.6 Property changes on: trunk/misc/gridarta-atrinik.6 ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/misc/gridarta-atrinik.desktop =================================================================== --- trunk/misc/gridarta-atrinik.desktop (rev 0) +++ trunk/misc/gridarta-atrinik.desktop 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Version=1.0 +Name=Gridarta for Atrinik +GenericName=Gridarta +Comment=Map editor for Atrinik map files. +Exec=/usr/bin/gridarta-atrinik +Categories=Development;Java Property changes on: trunk/misc/gridarta-atrinik.desktop ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/misc/gridarta-crossfire =================================================================== --- trunk/misc/gridarta-crossfire (rev 0) +++ trunk/misc/gridarta-crossfire 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1,12 @@ +#!/bin/sh + +for rcfile in /etc/gridarta/gridartarc ~/.gridarta/gridartarc; do + if [ -e "$rcfile" ]; then + . "$rcfile" + fi +done + +. /usr/lib/java-wrappers/java-wrappers.sh +require_java_runtime +locate_jar CrossfireEditor.jar +"$JAVA_CMD" -jar "$found_jar" "$@" Property changes on: trunk/misc/gridarta-crossfire ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/misc/gridarta-crossfire.6 =================================================================== --- trunk/misc/gridarta-crossfire.6 (rev 0) +++ trunk/misc/gridarta-crossfire.6 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1 @@ +.so man6/gridarta.6 Property changes on: trunk/misc/gridarta-crossfire.6 ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/misc/gridarta-crossfire.desktop =================================================================== --- trunk/misc/gridarta-crossfire.desktop (rev 0) +++ trunk/misc/gridarta-crossfire.desktop 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Version=1.0 +Name=Gridarta for Crossfire +GenericName=Gridarta +Comment=Map editor for Crossfire map files. +Exec=/usr/bin/gridarta-crossfire +Categories=Development;Java Property changes on: trunk/misc/gridarta-crossfire.desktop ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/misc/gridarta-daimonin =================================================================== --- trunk/misc/gridarta-daimonin (rev 0) +++ trunk/misc/gridarta-daimonin 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1,12 @@ +#!/bin/sh + +for rcfile in /etc/gridarta/gridartarc ~/.gridarta/gridartarc; do + if [ -e "$rcfile" ]; then + . "$rcfile" + fi +done + +. /usr/lib/java-wrappers/java-wrappers.sh +require_java_runtime +locate_jar DaimoninEditor.jar +"$JAVA_CMD" -jar "$found_jar" "$@" Property changes on: trunk/misc/gridarta-daimonin ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/misc/gridarta-daimonin.6 =================================================================== --- trunk/misc/gridarta-daimonin.6 (rev 0) +++ trunk/misc/gridarta-daimonin.6 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1 @@ +.so man6/gridarta.6 Property changes on: trunk/misc/gridarta-daimonin.6 ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/misc/gridarta-daimonin.desktop =================================================================== --- trunk/misc/gridarta-daimonin.desktop (rev 0) +++ trunk/misc/gridarta-daimonin.desktop 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Version=1.0 +Name=Gridarta for Daimonin +GenericName=Gridarta +Comment=Map editor for Daimonin map files. +Exec=/usr/bin/gridarta-daimonin +Categories=Development;Java Property changes on: trunk/misc/gridarta-daimonin.desktop ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/misc/gridarta.6 =================================================================== --- trunk/misc/gridarta.6 (rev 0) +++ trunk/misc/gridarta.6 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1,82 @@ +.\" Hey, EMACS: -*- nroff -*- +.TH GRIDARTA 6 "November 6, 2010" +.\" Please adjust this date whenever revising the manpage. +.SH NAME +Gridarta, gridarta-atrinik, gridarta-crossfire, gridarta-daimonin \- a map editor for Atrinik, Crossfire, and Daimonin +.SH SYNOPSIS +.B gridarta-atrinik +.RI [ options ] " [files" ...] +.br +.B gridarta-crossfire +.RI [ options ] " [files" ...] +.br +.B gridarta-daimonin +.RI [ options ] " [files" ...] +.SH DESCRIPTION +This manual page documents briefly the +.B gridarta-atrinik +, +.B gridarta-crossfire +, and +.B gridarta-daimonin +commands. +.PP +.B Gridarta +is a program that allows to create and modify map files for the games Atrinik, +Crossfire, and Daimonin. +.SH OPTIONS +These programs follow the usual GNU command line syntax, with long +options starting with two dashes (`-'). +.TP +.B \-h, \-\-help +Show summary of options. +.TP +.B \-b, \-\-batchpng +Create .png files for all given map files. The .png files are created in the +same directories as the map files. +.TP +.B \-c, \-\-collectarches +Runs archetype collection. This process combines individual files from the +"arch" directory into condensed files needed by the game server. +.TP +.B \-n, \-\-normal +Start the editor in GUI mode. This is the default if no other option is given. +.TP +.B \-s, \-\-singlepng +Create a .png file from the specified map file. This mode needs two file +arguments: the map file to convert and the .png file to write. +.TP +.B \-\-config=config-file +Specify the config file to use. The +.B config-file +must exist. To create a new config file, create an empty file; Gridarta will +fill in missing entries. The default is +.B ~/.gridarta/atrinik.conf +for +.B gridarta-atrinik +, +.B ~/.gridarta/crossfire.conf +for +.B gridarta-crossfire +, and +the Java preferences for +.B gridarta-daimonin +. +.TP +.B \-\-noexit +Do not call +.B System.exit() +to terminate the application. This option is useful only for debugging +Gridarta. +.TP +.B \-\-script=name [arg=value...] +Run a plugin script +.B name +with the given arguments. This mode does not take files but plugin script +arguments. To find out which parameter a particular script supports, pass an +invalid parameter name. +.SH AUTHOR +Gridarta was written by Pasi Keränen, Michael Tönnies, Andreas Vogel, Christian +Hujer, Daniel Viegas, and Andreas Kirschbaum. +.PP +This manual page was written by Andreas Kirschbaum. Property changes on: trunk/misc/gridarta.6 ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/misc/gridartarc =================================================================== --- trunk/misc/gridartarc (rev 0) +++ trunk/misc/gridartarc 2010-11-06 15:27:29 UTC (rev 8766) @@ -0,0 +1,2 @@ +# The java command for running Gridarta. +#JAVA_CMD=/usr/lib/jvm/java-6-sun/bin/java Property changes on: trunk/misc/gridartarc ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-11-06 07:30:16
|
Revision: 8765 http://gridarta.svn.sourceforge.net/gridarta/?rev=8765&view=rev Author: akirschbaum Date: 2010-11-06 07:30:10 +0000 (Sat, 06 Nov 2010) Log Message: ----------- Update game object matchers to treat game objects having weight=0 as non-pickable. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/resource/resource/conf/GameObjectMatchers.xml Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2010-11-06 07:28:32 UTC (rev 8764) +++ trunk/crossfire/ChangeLog 2010-11-06 07:30:10 UTC (rev 8765) @@ -1,5 +1,8 @@ 2010-11-06 Andreas Kirschbaum + * Update game object matchers to treat game objects having + weight=0 as non-pickable. + * Fix #3079982 (bad warning for potion level). Now warns for potions with level >130 and skills with level >250. Modified: trunk/crossfire/resource/resource/conf/GameObjectMatchers.xml =================================================================== --- trunk/crossfire/resource/resource/conf/GameObjectMatchers.xml 2010-11-06 07:28:32 UTC (rev 8764) +++ trunk/crossfire/resource/resource/conf/GameObjectMatchers.xml 2010-11-06 07:30:10 UTC (rev 8765) @@ -65,6 +65,7 @@ <And> <TypeNrs numbers="4 5 36 60 85 111 123 124 130"/> <Attrib name="no_pick" type="int" value="0"/> + <Attrib name="weight" type="int" op="ne" value="0"/> </And> </GameObjectMatcher> <GameObjectMatcher id="door"> @@ -82,6 +83,7 @@ <And> <TypeNrs numbers="3 13 14 15 16 33 34 35 39 70 87 99 100 104 109 113 122"/> <Attrib name="no_pick" type="int" value="0"/> + <Attrib name="weight" type="int" op="ne" value="0"/> </And> </GameObjectMatcher> <GameObjectMatcher id="blocked"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-11-06 07:28:38
|
Revision: 8764 http://gridarta.svn.sourceforge.net/gridarta/?rev=8764&view=rev Author: akirschbaum Date: 2010-11-06 07:28:32 +0000 (Sat, 06 Nov 2010) Log Message: ----------- Fix #3079982 (bad warning for potion level). Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/resource/resource/conf/types.xml Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2010-11-06 07:20:50 UTC (rev 8763) +++ trunk/crossfire/ChangeLog 2010-11-06 07:28:32 UTC (rev 8764) @@ -1,5 +1,8 @@ 2010-11-06 Andreas Kirschbaum + * Fix #3079982 (bad warning for potion level). Now warns for + potions with level >130 and skills with level >250. + * Collect resources. Fixes #3079985 (warning (pickable connected object) on cannon). Modified: trunk/crossfire/resource/resource/conf/types.xml =================================================================== --- trunk/crossfire/resource/resource/conf/types.xml 2010-11-06 07:20:50 UTC (rev 8763) +++ trunk/crossfire/resource/resource/conf/types.xml 2010-11-06 07:28:32 UTC (rev 8764) @@ -3812,7 +3812,7 @@ <use><![CDATA[ One potion should never give multiple benefits at once. ]]> </use> - <attribute arch="level" editor="potion level" type="int" min="-32768" max="32767" check_min="1" check_max="115"> + <attribute arch="level" editor="potion level" type="int" min="-32768" max="32767" check_min="1" check_max="130"> If the potion contains a spell, the spell is cast at this level. For other potions it should be set at least to 1. </attribute> @@ -4661,7 +4661,7 @@ Skill types are hard-coded in the Crossfire server. It isn't hard to create new skill types, but it requires a bit of server-coding. </attribute> - <attribute arch="level" editor="level" type="int" min="-32768" max="32767" check_min="1" check_max="115"></attribute> + <attribute arch="level" editor="level" type="int" min="-32768" max="32767" check_min="1" check_max="250"></attribute> <attribute arch="exp" editor="experience" type="int" min="0"></attribute> <attribute arch="perm_exp" editor="permanent experience" type="long"> <Permanent experience> is the experience the player gained This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-11-06 07:20:57
|
Revision: 8763 http://gridarta.svn.sourceforge.net/gridarta/?rev=8763&view=rev Author: akirschbaum Date: 2010-11-06 07:20:50 +0000 (Sat, 06 Nov 2010) Log Message: ----------- Collect resources. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/resource/resource/conf/archetypes Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2010-11-06 07:19:25 UTC (rev 8762) +++ trunk/crossfire/ChangeLog 2010-11-06 07:20:50 UTC (rev 8763) @@ -1,5 +1,8 @@ 2010-11-06 Andreas Kirschbaum + * Collect resources. Fixes #3079985 (warning (pickable connected + object) on cannon). + * Collect resources. Fixes #3080032 (wild pyromaniac uses wrong object type in ui). Modified: trunk/crossfire/resource/resource/conf/archetypes =================================================================== --- trunk/crossfire/resource/resource/conf/archetypes 2010-11-06 07:19:25 UTC (rev 8762) +++ trunk/crossfire/resource/resource/conf/archetypes 2010-11-06 07:20:50 UTC (rev 8763) @@ -20795,6 +20795,7 @@ speed -0.4 move_block all blocksview 1 +no_pick 1 end Object cannon_1 editor_folder misc/misc @@ -20809,6 +20810,7 @@ speed -0.1 move_block all blocksview 1 +no_pick 1 end Object cannon_2 editor_folder misc/misc @@ -20823,6 +20825,7 @@ speed -0.1 move_block all blocksview 1 +no_pick 1 end Object cannon_3 editor_folder misc/misc @@ -20837,6 +20840,7 @@ speed -0.1 move_block all blocksview 1 +no_pick 1 end Object cannon_4 editor_folder misc/misc @@ -20851,6 +20855,7 @@ speed -0.1 move_block all blocksview 1 +no_pick 1 end Object cannon_5 editor_folder misc/misc @@ -20865,6 +20870,7 @@ speed -0.1 move_block all blocksview 1 +no_pick 1 end Object cannon_6 editor_folder misc/misc @@ -20879,6 +20885,7 @@ speed -0.1 move_block all blocksview 1 +no_pick 1 end Object cannon_7 editor_folder misc/misc @@ -20893,6 +20900,7 @@ speed -0.1 move_block all blocksview 1 +no_pick 1 end Object cannon_8 editor_folder misc/misc @@ -20907,6 +20915,7 @@ speed -0.1 move_block all blocksview 1 +no_pick 1 end Object chalice editor_folder misc/misc This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-11-06 07:19:31
|
Revision: 8762 http://gridarta.svn.sourceforge.net/gridarta/?rev=8762&view=rev Author: akirschbaum Date: 2010-11-06 07:19:25 +0000 (Sat, 06 Nov 2010) Log Message: ----------- Update ChangeLog entry. Modified Paths: -------------- trunk/crossfire/ChangeLog Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2010-11-06 07:06:28 UTC (rev 8761) +++ trunk/crossfire/ChangeLog 2010-11-06 07:19:25 UTC (rev 8762) @@ -1,6 +1,7 @@ 2010-11-06 Andreas Kirschbaum - * Collect resources. + * Collect resources. Fixes #3080032 (wild pyromaniac uses wrong + object type in ui). 2010-11-05 Andreas Kirschbaum This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-11-06 07:06:38
|
Revision: 8761 http://gridarta.svn.sourceforge.net/gridarta/?rev=8761&view=rev Author: akirschbaum Date: 2010-11-06 07:06:28 +0000 (Sat, 06 Nov 2010) Log Message: ----------- Collect resources. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/resource/resource/conf/animations trunk/crossfire/resource/resource/conf/animtree trunk/crossfire/resource/resource/conf/archetypes trunk/crossfire/resource/resource/conf/bmaps.paths trunk/crossfire/resource/resource/conf/crossfire.0 Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2010-11-06 06:33:24 UTC (rev 8760) +++ trunk/crossfire/ChangeLog 2010-11-06 07:06:28 UTC (rev 8761) @@ -1,3 +1,7 @@ +2010-11-06 Andreas Kirschbaum + + * Collect resources. + 2010-11-05 Andreas Kirschbaum * Enhance "Shop square allows magic and/or prayers" validator: Modified: trunk/crossfire/resource/resource/conf/animations =================================================================== --- trunk/crossfire/resource/resource/conf/animations 2010-11-06 06:33:24 UTC (rev 8760) +++ trunk/crossfire/resource/resource/conf/animations 2010-11-06 07:06:28 UTC (rev 8761) @@ -3307,6 +3307,17 @@ mudman.111 mudman.112 mina +anim mushman1 +facings 4 +mushman1.111 +mushman1.112 +mushman1.131 +mushman1.132 +mushman1.151 +mushman1.152 +mushman1.171 +mushman1.172 +mina anim mystic_fist mystic_fist.111 mystic_fist.112 @@ -4389,6 +4400,11 @@ shadow.111 shadow.112 mina +anim shadow_dragon +facings 2 +shadow_dragon.x31 +shadow_dragon.x61 +mina anim shadowpup facings 2 panther.131 Modified: trunk/crossfire/resource/resource/conf/animtree =================================================================== --- trunk/crossfire/resource/resource/conf/animtree 2010-11-06 06:33:24 UTC (rev 8760) +++ trunk/crossfire/resource/resource/conf/animtree 2010-11-06 07:06:28 UTC (rev 8761) @@ -436,6 +436,7 @@ /connect/mover_8 /connect/mover_turn /monster/misc/mudman +/monster/animal/mushman1 /spell/Golem/mystic_fist /monster/undead/nazgul /monster/humanoid/necromancer @@ -587,6 +588,7 @@ /monster/giant/serpent/serpent /player/race/serpentman_player /monster/elemental/Shadow/shadow +/monster/dragon/Shadow_Dra/shadow_dragon /monster/animal/shadowtiger/shadowpup /monster/animal/shadowtiger/shadowtiger /ground/shallow_sea Modified: trunk/crossfire/resource/resource/conf/archetypes =================================================================== --- trunk/crossfire/resource/resource/conf/archetypes 2010-11-06 06:33:24 UTC (rev 8760) +++ trunk/crossfire/resource/resource/conf/archetypes 2010-11-06 07:06:28 UTC (rev 8761) @@ -1377,8 +1377,7 @@ Object DShieldm editor_folder armour/shield msg - There is a strong evil spirit in the shield - trying to dominate you. + There is a strong evil spirit in the shield trying to dominate you. endmsg name Demonspawn Shield name_pl Demonspawn Shields @@ -1406,9 +1405,7 @@ Object DShieldms editor_folder armour/shield msg - There is a powerful evil spirit in the - shield dominating your mind. You are - struggling to retain control of yourself. + There is a powerful evil spirit in the shield dominating your mind. You are struggling to retain control of yourself. endmsg name Demonspawn Shield name_pl Demonspawn Shields @@ -1437,8 +1434,7 @@ Object DShields editor_folder armour/shield msg - There is a strong evil spirit in the shield - trying to dominate you. + There is a strong evil spirit in the shield trying to dominate you. endmsg name Demonspawn Shield name_pl Demonspawn Shields @@ -3864,198 +3860,6 @@ no_pick 1 y 1 end -Object footbridge_0 -editor_folder construct/bridge -name footbridge -face footbridge_0.111 -no_pick 1 -end -Object footbridge_1_2 -editor_folder construct/bridge -name footbridge -face footbridge_1.111 -no_pick 1 -end -Object footbridge_1_4 -editor_folder construct/bridge -name footbridge -face footbridge_2.111 -no_pick 1 -end -Object footbridge_2_2_1 -editor_folder construct/bridge -name footbridge -face footbridge_3.111 -no_pick 1 -end -Object footbridge_1_1 -editor_folder construct/bridge -name footbridge -face footbridge_4.111 -no_pick 1 -end -Object footbridge_2_1_1 -editor_folder construct/bridge -name footbridge -face footbridge_5.111 -no_pick 1 -end -Object footbridge_2_2_2 -editor_folder construct/bridge -name footbridge -face footbridge_6.111 -no_pick 1 -end -Object footbridge_3_2 -editor_folder construct/bridge -name footbridge -face footbridge_7.111 -no_pick 1 -end -Object footbridge_1_3 -editor_folder construct/bridge -name footbridge -face footbridge_8.111 -no_pick 1 -end -Object footbridge_2_2_4 -editor_folder construct/bridge -name footbridge -face footbridge_9.111 -no_pick 1 -end -Object footbridge_2_1_2 -editor_folder construct/bridge -name footbridge -face footbridge_A.111 -no_pick 1 -end -Object footbridge_3_1 -editor_folder construct/bridge -name footbridge -face footbridge_B.111 -no_pick 1 -end -Object footbridge_2_2_3 -editor_folder construct/bridge -name footbridge -face footbridge_C.111 -no_pick 1 -end -Object footbridge_3_4 -editor_folder construct/bridge -name footbridge -face footbridge_D.111 -no_pick 1 -end -Object footbridge_3_3 -editor_folder construct/bridge -name footbridge -face footbridge_E.111 -no_pick 1 -end -Object footbridge_4 -editor_folder construct/bridge -name footbridge -face footbridge_F.111 -no_pick 1 -end -Object stonebridge_0 -editor_folder construct/bridge -name stonebridge -face stonebridge_0.111 -no_pick 1 -end -Object stonebridge_1_2 -editor_folder construct/bridge -name stonebridge -face stonebridge_1.111 -no_pick 1 -end -Object stonebridge_1_4 -editor_folder construct/bridge -name stonebridge -face stonebridge_2.111 -no_pick 1 -end -Object stonebridge_2_2_1 -editor_folder construct/bridge -name stonebridge -face stonebridge_3.111 -no_pick 1 -end -Object stonebridge_1_1 -editor_folder construct/bridge -name stonebridge -face stonebridge_4.111 -no_pick 1 -end -Object stonebridge_2_1_1 -editor_folder construct/bridge -name stonebridge -face stonebridge_5.111 -no_pick 1 -end -Object stonebridge_2_2_2 -editor_folder construct/bridge -name stonebridge -face stonebridge_6.111 -no_pick 1 -end -Object stonebridge_3_2 -editor_folder construct/bridge -name stonebridge -face stonebridge_7.111 -no_pick 1 -end -Object stonebridge_1_3 -editor_folder construct/bridge -name stonebridge -face stonebridge_8.111 -no_pick 1 -end -Object stonebridge_2_2_4 -editor_folder construct/bridge -name stonebridge -face stonebridge_9.111 -no_pick 1 -end -Object stonebridge_2_1_2 -editor_folder construct/bridge -name stonebridge -face stonebridge_A.111 -no_pick 1 -end -Object stonebridge_3_1 -editor_folder construct/bridge -name stonebridge -face stonebridge_B.111 -no_pick 1 -end -Object stonebridge_2_2_3 -editor_folder construct/bridge -name stonebridge -face stonebridge_C.111 -no_pick 1 -end -Object stonebridge_3_4 -editor_folder construct/bridge -name stonebridge -face stonebridge_D.111 -no_pick 1 -end -Object stonebridge_3_3 -editor_folder construct/bridge -name stonebridge -face stonebridge_E.111 -no_pick 1 -end -Object stonebridge_4 -editor_folder construct/bridge -name stonebridge -face stonebridge_F.111 -no_pick 1 -end Object bungalow editor_folder construct/construct type 66 @@ -5549,54 +5353,6 @@ move_block all -fly_high no_pick 1 end -Object s_bridge1 -editor_folder construct/construct -name bridge -face s_bridge1.111 -type 67 -move_on walk -no_pick 1 -end -Object s_bridge1a -editor_folder construct/construct -name bridge -face s_bridge1a.111 -type 67 -move_on walk -no_pick 1 -end -Object s_bridge1b -editor_folder construct/construct -name bridge -face s_bridge1b.111 -type 67 -move_on walk -no_pick 1 -end -Object s_bridge2 -editor_folder construct/construct -name bridge -face s_bridge2.111 -type 67 -move_on walk -no_pick 1 -end -Object s_bridge2a -editor_folder construct/construct -name bridge -face s_bridge2a.111 -type 67 -move_on walk -no_pick 1 -end -Object s_bridge2b -editor_folder construct/construct -name bridge -face s_bridge2b.111 -type 67 -move_on walk -no_pick 1 -end Object cathedral editor_folder construct/temple name cathedral @@ -6160,22 +5916,6 @@ no_pick 1 y 1 end -Object a_bridge1 -editor_folder construct/town -name bridge -face a_bridge1.111 -type 67 -move_on walk -no_pick 1 -end -Object a_bridge2 -editor_folder construct/town -name bridge -face a_bridge2.111 -type 67 -move_on walk -no_pick 1 -end Object a_civic editor_folder construct/town name civic building @@ -8006,8 +7746,7 @@ Object anthrax editor_folder disease/disease msg -You feel feverish. Your muscles spasm -oddly.... Breathing is difficult. +You feel feverish. Your muscles spasm oddly.... Breathing is difficult. endmsg name anthrax type 158 @@ -8036,8 +7775,7 @@ Object arthritis editor_folder disease/disease msg -Your joints are swollen. You feel weak and -less dextrous. +Your joints are swollen. You feel weak and less dextrous. endmsg name arthritis type 158 @@ -8153,8 +7891,7 @@ Object diarrhea editor_folder disease/disease msg -You can't control your sphincter. You have -a messy accident. Yuck! +You can't control your sphincter. You have a messy accident. Yuck! endmsg name the runs type 158 @@ -8267,8 +8004,7 @@ Object flaming_fart editor_folder disease/disease msg -You blow a great fart. It ignites. My God, -the REEK! +You blow a great fart. It ignites. My God, the REEK! endmsg name flaming farts type 158 @@ -8377,8 +8113,7 @@ Object incontinence editor_folder disease/disease msg -You can't control your bladder. You have a -messy accident. Yuck! +You can't control your bladder. You have a messy accident. Yuck! endmsg name lack of bladder control type 158 @@ -8412,8 +8147,7 @@ Object insanity editor_folder disease/disease msg -You start gibbering incoherently. You -forget where you are and what you were doing. +You start gibbering incoherently. You forget where you are and what you were doing. endmsg name insanity type 158 @@ -8439,9 +8173,7 @@ Object leprosy editor_folder disease/disease msg -Splotches are spreading around your body. -You feel disgusted with yourself. A piece -of skin flakes off and falls to the ground. +Splotches are spreading around your body. You feel disgusted with yourself. A piece of skin flakes off and falls to the ground. endmsg name leprosy type 158 @@ -8543,9 +8275,7 @@ Object rabies editor_folder disease/disease msg -You notice everyone is looking at you with -evil intent. You must kill them! You begin -to salivate. +You notice everyone is looking at you with evil intent. You must kill them! You begin to salivate. endmsg name rabies type 158 @@ -8586,8 +8316,7 @@ Object scurvy editor_folder disease/disease msg -You spit out a tooth. Better increase that -dietary vitamin C! +You spit out a tooth. Better increase that dietary vitamin C! endmsg name scurvy type 158 @@ -8611,8 +8340,7 @@ Object smallpox editor_folder disease/disease msg -You have a nasty rash all over you. Are those -pustules? +You have a nasty rash all over you. Are those pustules? endmsg name smallpox type 158 @@ -8672,10 +8400,7 @@ Object tooth_decay editor_folder disease/disease msg -A tooth wiggles loose and falls to the -ground. You should brush more. Have I -mentioned that your breath is disgusting, -too? +A tooth wiggles loose and falls to the ground. You should brush more. Have I mentioned that your breath is disgusting, too? endmsg name tooth decay type 158 @@ -8699,8 +8424,7 @@ Object typhoid editor_folder disease/disease msg -You feel feverish. Your muscles spasm -oddly.... Breathing is difficult. +You feel feverish. Your muscles spasm oddly.... Breathing is difficult. endmsg name typhoid type 158 @@ -10172,9 +9896,7 @@ Object sewer_access editor_folder exit/exit msg -You open the sewer access -grid and jump down. -My god, you are stinking! +You open the sewer access grid and jump down. My god, you are stinking! endmsg name sewer face sewer_access.111 @@ -10185,9 +9907,7 @@ Object sewer_access2 editor_folder exit/exit msg -You open the sewer access -grid and jump down. -My god, you are stinking! +You open the sewer access grid and jump down. My god, you are stinking! endmsg name sewer face sewer_access.112 @@ -11072,7 +10792,6 @@ Object fireholes_moving editor_folder floor/floor name holes -type 108 face fireholes.111 no_pick 1 speed -0.02 @@ -11943,6 +11662,13 @@ no_pick 1 is_floor 1 end +Object tile_shop +editor_folder floor/floor +name tiles +face shop_empty.111 +no_pick 1 +is_floor 1 +end Object tile_tan_floor editor_folder floor/floor face tile_tan.111 @@ -12192,7 +11918,7 @@ face coffee.111 food 10 nrof 1 -type 6 +type 7 material 32 value 1 weight 100 @@ -12962,8 +12688,7 @@ Object Gnarg editor_folder gods/demihumans msg -Father of goblins, Lord Troll, Master of -poisons, Patron of assassins +Father of goblins, Lord Troll, Master of poisons, Patron of assassins endmsg title Lythander type 50 @@ -13047,8 +12772,7 @@ Object gnarg_general_info editor_folder gods/demihumans msg -You are filled with a desire to slay all -faeries and dwarfs. +You are filled with a desire to slay all faeries and dwarfs. endmsg type 8 invisible 1 @@ -13064,8 +12788,7 @@ Object Lythander editor_folder gods/demihumans msg -Elven god of luck, Huntsman of Goblins, -Trollslayer, the Trickster +Elven god of luck, Huntsman of Goblins, Trollslayer, the Trickster endmsg title Gnarg type 50 @@ -13154,8 +12877,7 @@ Object lythander_general_info editor_folder gods/demihumans msg -You are filled with a desire to slay all -goblins and trolls. +You are filled with a desire to slay all goblins and trolls. endmsg type 8 invisible 1 @@ -13171,8 +12893,7 @@ Object Mostrai editor_folder gods/demihumans msg -Dwarven deity of metal smithing and warcraft, -Giant basher, Delver of secrets +Dwarven deity of metal smithing and warcraft, Giant basher, Delver of secrets endmsg title Gnarg type 50 @@ -13256,8 +12977,7 @@ Object mostrai_general_info editor_folder gods/demihumans msg -You are filled with a desire to slay all -goblins and giants. +You are filled with a desire to slay all goblins and giants. endmsg type 8 invisible 1 @@ -13310,8 +13030,7 @@ Object valkyrie_general_info editor_folder gods/demihumans msg -You are filled with a desire to fight - but -with honor, not with filthy magics. +You are filled with a desire to fight - but with honor, not with filthy magics. endmsg type 8 invisible 1 @@ -13411,8 +13130,7 @@ Object gaea_general_info editor_folder gods/elemental msg -You are filled with a desire to slay all -undead and unnatural creatures. +You are filled with a desire to slay all undead and unnatural creatures. endmsg type 8 invisible 1 @@ -13623,8 +13341,7 @@ Object ruggilli_general_info editor_folder gods/elemental msg -You feel a bond with all things which are -made of fire. +You feel a bond with all things which are made of fire. endmsg type 8 invisible 1 @@ -13721,8 +13438,7 @@ Object sorig_general_info editor_folder gods/elemental msg -You feel a bond with all things which are -made of air and lightning. +You feel a bond with all things which are made of air and lightning. endmsg type 8 invisible 1 @@ -13738,9 +13454,7 @@ Object bow_lythander editor_folder gods/items msg - You look at this wonderful bow with - pride. It is only granted to the best - of Lythander's disciples. + You look at this wonderful bow with pride. It is only granted to the best of Lythander's disciples. endmsg name Lythander's Elven Bow name_pl Lythander's Elven Bows @@ -13763,12 +13477,9 @@ Object bracers_gnarg editor_folder gods/items msg - An exceptional pair of bracers. Not only do - they provide the wearer with protection - from cold, they also increase the wearer's - damage and strength, and help heal the body - from damage. A mighty gift from Gnarg sent - to aid you in annihilating His enemies. + An exceptional pair of bracers. Not only do they provide the wearer with protection from cold, they also increase the wearer's damage and strength, and help heal the body from damage. + + A mighty gift from Gnarg sent to aid you in annihilating His enemies. endmsg nrof 1 name bracers @@ -13817,9 +13528,7 @@ Object shield_gaea editor_folder gods/items msg - This shield is highly enchanted by the forces - of life and nature. It is a personal gift from - Gaea, to protect her beloved children. + This shield is highly enchanted by the forces of life and nature. It is a personal gift from Gaea, to protect her beloved children. endmsg name Gaea's Shield of Earth face earth_shield.111 @@ -13844,8 +13553,7 @@ Object glovesofsun editor_folder gods/items msg - This pair of gloves will aid any of Gaea's - most faithful in seeing her will protected. + This pair of gloves will aid any of Gaea's most faithful in seeing her will protected. endmsg name Gloves of the Sun name_pl Gloves of the Sun @@ -13871,8 +13579,7 @@ Object helmet_gnarg editor_folder gods/items msg - This helmet good protection. From mighty - Gnarg it is. + This helmet good protection. From mighty Gnarg it is. endmsg name Gnarg's Orc Helmet name_pl Gnarg's Orc Helmets @@ -13892,8 +13599,7 @@ Object horn_siren editor_folder gods/items msg - Putting this shell to your ear, you hear a - strange and haunting melody. + Putting this shell to your ear, you hear a strange and haunting melody. endmsg name horn title of the Sirens @@ -13915,8 +13621,7 @@ Object horn_waves editor_folder gods/items msg - Putting this shell to your ear, you hear - the crashing sound of ocean waves. + Putting this shell to your ear, you hear the crashing sound of ocean waves. endmsg name horn title of Ocean Waves @@ -13938,11 +13643,7 @@ Object mail_mostrai editor_folder gods/items msg - This shining plate mail is Mostrai's - gift to the bravest of his warriors. - It is highly enchanted, increasing the - strength of the wearer and protecting - against fire. + This shining plate mail is Mostrai's gift to the bravest of his warriors. It is highly enchanted, increasing the strength of the wearer and protecting against fire. endmsg name Thorin's Plate Mail name_pl Thorin's Plate Mails @@ -13965,11 +13666,7 @@ Object mithril_ar_ele_sorig editor_folder gods/items msg - Sorig has granted you this fine mail. It - grants great protection from electricity - and physical attacks without reducing your - mobility. Be warned that what Sorig gives, - Sorig can take away. + Sorig has granted you this fine mail. It grants great protection from electricity and physical attacks without reducing your mobility. Be warned that what Sorig gives, Sorig can take away. endmsg nrof 1 name mithril chainmail of lightning of Sorig @@ -13998,9 +13695,7 @@ Object pipe_lythander editor_folder gods/items msg - This pipe is the finest you have ever - seen. Imagine the smoke rings you - could blow with it... + This pipe is the finest you have ever seen. Imagine the smoke rings you could blow with it... endmsg name Lythander's pipe name_pl Lythander's pipes @@ -14278,8 +13973,7 @@ Object Devourers editor_folder gods/supernatural msg -Soul Eaters, Harbingers of Death, Nameless -Lords of the Tomb +Soul Eaters, Harbingers of Death, Nameless Lords of the Tomb endmsg type 50 title Gaea @@ -14381,8 +14075,7 @@ Object devourers_general_info editor_folder gods/supernatural msg -You feel a bond with all things which are -undead. +You feel a bond with all things which are undead. endmsg type 8 invisible 1 @@ -14486,8 +14179,7 @@ Object gorokh_general_info editor_folder gods/supernatural msg -You are filled with a desire to slay all -angels. +You are filled with a desire to slay all angels. endmsg type 8 invisible 1 @@ -14589,8 +14281,7 @@ Object valriel_general_info editor_folder gods/supernatural msg -You are filled with a desire to slay all -demons. +You are filled with a desire to slay all demons. endmsg type 8 invisible 1 @@ -16754,6 +16445,42 @@ speed 0.001 blocksview 1 end +Object temp_fog_moving +editor_folder ground/ground +name fog +face fog.111 +animation temp_fog +type 67 +move_type fly_low +no_pick 1 +is_used_up 1 +resist_fire 100 +resist_electricity 100 +resist_confusion 100 +resist_acid 100 +resist_drain 100 +resist_weaponmagic 100 +resist_ghosthit 100 +resist_poison 100 +resist_slow 100 +resist_paralyze 100 +resist_turn_undead 100 +resist_fear 100 +resist_cancellation 100 +resist_deplete 100 +resist_death 100 +material 1 +changing 1 +blocksview 1 +weight 1000 +value 1 +speed 0.5 +arch event_destroy +name GenerateFog +title Python +slaying /python/Moving_Fog.py +end +end Object thorns editor_folder ground/ground type 102 @@ -18277,9 +18004,7 @@ Object vial_poison editor_folder inorganic/inorganic msg -A poison of some sort. -Maybe it could be used -to taint someone's food. +A poison of some sort. Maybe it could be used to taint someone's food. endmsg nrof 1 type 7 @@ -18646,7 +18371,7 @@ material 2 materialname gold type 73 -value 177777 +value 700000000 weight 700000000 name_pl huge gold nuggets client_type 2005 @@ -18661,7 +18386,7 @@ material 2 materialname gold value 400 -weight 180 +weight 400 name_pl large gold nuggets client_type 2005 end @@ -18675,7 +18400,7 @@ material 2 materialname gold value 40 -weight 20 +weight 40 name_pl small gold nuggets client_type 2005 end @@ -21856,14 +21581,11 @@ Object naz_report editor_folder misc/misc msg -A Nazgul is somewhat like a grimreaper. -However, while grimreapers are vulnerable to -magic, Nazgul seem to be immune to magic. -Nazgul have a drain attack. -Nazgul cannot be attacked physically, -except in a Special Case: +A Nazgul is somewhat like a grimreaper. However, while grimreapers are vulnerable to magic, Nazgul seem to be immune to magic. + +Nazgul have a drain attack. Nazgul cannot be attacked physically, except in a Special Case: * this scroll is broken, * -*so I cannot continue to read * +* so I cannot continue to read * endmsg name Nazgul Report face naz_report.111 @@ -24276,6 +23998,33 @@ maxsp 1 generator_limit 5 end +Object mushman1 +editor_folder monster/animal +other_arch mushman1 +name Mushroom Man +race slime +face mushman1.111 +speed -0.08 +generator 1 +sp 129 +maxsp 20 +no_pick 1 +animation mushman1 +monster 1 +move_type walk +sleep 1 +Wis 5 +alive 1 +exp 15 +ac 8 +wc 14 +dam 3 +attacktype 1024 +hp 20 +maxhp 20 +level 2 +weight 10000 +end Object panther editor_folder monster/animal face panther.131 @@ -27111,18 +26860,19 @@ editor_folder monster/dragon name shadow dragon race dragon -randomitems dragon +randomitems shadow_dragon monster 1 move_type walk sleep 1 Wis 20 face shadow_dragon.x31 +animation shadow_dragon level 35 Con 11 Pow 26 can_cast_spell 1 -sp 200 -maxsp 200 +sp 800 +maxsp 800 hp 5500 maxhp 5500 resist_fire 100 @@ -27146,6 +26896,7 @@ Object shadow_dragon_2 name shadow dragon face shadow_dragon.x31 +animation shadow_dragon monster 1 move_type walk alive 1 @@ -27156,6 +26907,7 @@ Object shadow_dragon_3 name shadow dragon face shadow_dragon.x31 +animation shadow_dragon monster 1 move_type walk alive 1 @@ -27166,6 +26918,7 @@ Object shadow_dragon_4 name shadow dragon face shadow_dragon.x31 +animation shadow_dragon monster 1 move_type walk alive 1 @@ -27176,6 +26929,7 @@ Object shadow_dragon_5 name shadow dragon face shadow_dragon.x31 +animation shadow_dragon monster 1 move_type walk alive 1 @@ -27187,6 +26941,7 @@ Object shadow_dragon_6 name shadow dragon face shadow_dragon.x31 +animation shadow_dragon monster 1 move_type walk alive 1 @@ -27850,6 +27605,29 @@ weight 200 level 9 end +Object elem_dust +editor_folder monster/elemental +animation elem_dust +name dust devil +race air_elemental +face elem_dust.111 +monster 1 +move_type walk fly_low +alive 1 +resist_electricity 100 +resist_blind 100 +attacktype 8 +resist_physical -100 +ac 4 +wc 10 +dam 10 +hp 500 +maxhp 500 +speed -0.3 +exp 4500 +weight 200 +level 11 +end Object earth_elemental editor_folder monster/elemental name earth elemental @@ -27874,6 +27652,30 @@ attacktype 1 resist_fire -60 end +Object greater_earth_elemental +editor_folder monster/elemental +name greater earth elemental +hp 500 +maxhp 500 +exp 6000 +race earth_elemental +face elem_earth.111 +animation earth_elemental +monster 1 +move_type walk +alive 1 +ac 6 +wc 10 +dam 50 +speed -0.08 +weight 100000 +level 10 +resist_physical 70 +resist_cold 50 +resist_blind 100 +attacktype 1 +resist_fire -60 +end Object fire_elemental editor_folder monster/elemental name fire elemental @@ -27898,6 +27700,30 @@ exp 3000 weight 200 end +Object elem_fire_black +editor_folder monster/elemental +animation elem_fire_black +name black fire +hp 1000 +maxhp 1000 +exp 5000 +race fire_elemental +face elem_fire_black.111 +monster 1 +move_type walk fly_low +alive 1 +resist_fire 100 +attacktype 4 +resist_confusion -100 +resist_blind 100 +glow_radius 1 +ac 4 +wc 13 +dam 20 +level 10 +speed -0.25 +weight 200 +end Object water_elemental editor_folder monster/elemental name water elemental @@ -27960,6 +27786,184 @@ body_skill 1 body_finger 2 end +Object ice_warrior +editor_folder monster/elemental +name ice warrior +race elemental +face ice_warrior.x11 +randomitems ice_warrior +monster 1 +move_type walk +level 35 +hp 6000 +maxhp 6000 +ac -5 +wc -34 +dam 65 +speed 0.4 +attacktype 2065 +can_see_in_dark 1 +can_use_rod 0 +will_apply 4 +Con 10 +Pow 32 +maxsp 40 +sp 40 +Wis 12 +exp 180000 +see_invisible 1 +no_pick 1 +alive 1 +resist_magic 80 +resist_blind 100 +resist_fire -20 +resist_ice 100 +resist_paralyze 90 +resist_fear 100 +weight 75000 +run_away 18 +pick_up 24 +can_use_skill 1 +can_cast_spell 1 +can_use_shield 1 +can_use_armour 1 +can_use_weapon 1 +can_use_ring 1 +body_skill 1 +body_torso 1 +body_head 1 +body_shoulder 1 +body_foot 2 +body_wrist 2 +body_hand 2 +body_waist 1 +body_finger 2 +body_arm 2 +body_range 1 +end +More +Object ice_warrior_2 +name ice warrior +face ice_warrior.x11 +monster 1 +move_type walk +alive 1 +no_pick 1 +weight 75000 +x 1 +end +More +Object ice_warrior_3 +name ice warrior +face ice_warrior.x11 +monster 1 +move_type walk +alive 1 +no_pick 1 +weight 75000 +y 1 +end +More +Object ice_warrior_4 +name ice warrior +face ice_warrior.x11 +monster 1 +move_type walk +alive 1 +no_pick 1 +weight 75000 +x 1 +y 1 +end +More +Object ice_warrior_5 +name ice warrior +face ice_warrior.x11 +monster 1 +move_type walk +alive 1 +no_pick 1 +weight 75000 +y 2 +end +More +Object ice_warrior_6 +name ice warrior +face ice_warrior.x11 +monster 1 +move_type walk +alive 1 +no_pick 1 +weight 75000 +x 1 +y 2 +end +More +Object ice_warrior_7 +name ice warrior +face ice_warrior.x11 +monster 1 +move_type walk +alive 1 +no_pick 1 +weight 75000 +y 3 +end +More +Object ice_warrior_8 +name ice warrior +face ice_warrior.x11 +monster 1 +move_type walk +alive 1 +no_pick 1 +weight 75000 +x 1 +y 3 +end +Object golem_red +editor_folder monster/elemental +animation golem_red +hp 750 +maxhp 750 +exp 6000 +name lava man +type 46 +face golem_red.111 +monster 1 +alive 1 +ac 5 +wc 12 +dam 8 +attacktype 1 +level 8 +speed 0.1 +weight 200000 +end +Object tsunami +editor_folder monster/elemental +name tsunami +hp 400 +maxhp 400 +exp 5000 +race water_elemental +face elem_water.111 +animation water_elemental +monster 1 +move_type walk +alive 1 +ac 4 +wc 8 +dam 40 +speed -0.1 +weight 50000 +level 11 +resist_confusion 100 +resist_blind 100 +attacktype 17 +resist_cold 50 +resist_fire -50 +end Object air_witch editor_folder monster/elemental name air witch @@ -28393,7 +28397,7 @@ weight 400000 run_away 3 can_use_scroll 1 -can_use_rod 1 +can_use_range 1 can_cast_spell 1 can_use_shield 1 can_use_armour 1 @@ -34981,7 +34985,6 @@ Object pyro_gen editor_folder monster/humanoid race human -type 140 name a bottleful of bombers other_arch pyromaniac generator 1 @@ -35006,7 +35009,6 @@ monster 1 move_type walk no_pick 1 -type 139 face pyromaniac.111 animation pyromaniac ac 6 @@ -40095,39 +40097,13 @@ no_drop 1 speed 0 end -Object cleric_class -editor_folder player/class -race cleric -anim_suffix class_cleric -name cleric -randomitems cleric_class_items -face cleric.151 -animation cleric_class -is_animated 1 -anim_speed -1 -type 37 -level 1 -ac 10 -wc 21 -dam 1 -can_use_shield 1 -can_use_armour 1 -can_use_weapon 1 -alive 1 -weight 70000 -food 500 -speed 0.5 -attacktype 1 -Str 0 -Dex -1 -Con -1 -Wis 2 -Cha 1 -Int -2 -Pow 1 -end Object monk_class editor_folder player/class +msg +In the Monastery, they believed in mental discipline and peace through physical training, meditation, and, to a lesser extent, religious devotion. +Your mental equilibrium requires you to forego the use of weapons, but your physical training in karate means you're not helpless. +Your inner peace grants you the ability to regenerate faster and to sense metaphysical auras. +endmsg name monk anim_suffix class_monk randomitems monk_class_items @@ -40154,6 +40130,11 @@ end Object paladin_class editor_folder player/class +msg +You are a militant priest, with an emphasis on 'priest'. +You've been taught archery and the use of weapons, but great care has been taken that you're doctrinally correct. Now you've been sent out in the world to convert the unrighteous and destroy the enemies of the faith. Your churchmembers have been charged a pretty penny to equip you for the job! +All other areas of your education have been neglected. Perhaps aware of your deficiency, your superiors have given you some measure of protection from magic. +endmsg name paladin anim_suffix class_paladin randomitems paladin_class_items @@ -40186,6 +40167,11 @@ end Object priest_class editor_folder player/class +msg +As a priest, you've learned an intense devotion to your god, and you've learned how to channel the energies your god vouchsafes to his devotees. +You've been taught the use of weapons, but only cursorily, and your physical training has been lacking in general. +Since you're in tune with the holy powers, you can tell when a god has marked an object as accursed. +endmsg anim_suffix class_priest name priest randomitems priest_class_items @@ -40204,6 +40190,10 @@ end Object ninja_class editor_folder player/class +msg +As a member of the secret society of the Ninja, you've been taught archery, the use of weapons, and also the art of combat without weapons. Your style of combat, leans very much toward the sneak attack, so you've been taught how to be inconspicuous and to appear in places you're not expected. +You have had no introduction to either religious devotion or magic. +endmsg name ninja anim_suffix class_ninja randomitems ninja_class_items @@ -40222,6 +40212,11 @@ end Object thief_class editor_folder player/class +msg +Trained to be a thief from a young age, you've learned to steal and you're familiar with the value a fence will give you on your "finds". +You've had some weaponry training, including archery; this being advisable to someone who is likely to have acrimonious disagreements about the ownership of valuable objects. +You've had no time for either religious devotion or the study of magecraft, but your quick wits have been enough to keep you alive so far. +endmsg name thief anim_suffix class_thief randomitems thief_class_items @@ -40238,26 +40233,14 @@ Pow -1 Cha -3 end -Object mountain_dwarf_class -editor_folder player/class -name mountain dwarf -anim_suffix class_mountain_dwarf -randomitems barbarian_class_items -face mountain_dwarf.151 -animation mountain_dwarf_class -is_animated 1 -anim_speed -1 -type 37 -Str 4 -Dex 1 -Con 4 -Int -6 -Wis -1 -Pow -1 -Cha -4 -end Object barbarian_class editor_folder player/class +msg +Growing up in the howling wilderness, you've had no chance to pursue anything remotely intellectual, let alone learn your letters! It's amazing you ever thought of leaving your hovel and going somewhere else, you're so ignorant. But now you have. +You find that you're a lot tougher and stronger than these cityfolk, and you know how to get around in rough terrain. You've learned archery in order to fill your cookpot, and weaponry is second nature to anyone who's had to fight with the local orc-tribe over food once a month. +You're deeply afraid of magic, and it'll be a while before you get over that and develop any facility with it. +You've no deep problem with the idea of gods, but you don't know much about them. +endmsg name barbarian anim_suffix class_barbarian randomitems barbarian_class_items @@ -40293,6 +40276,11 @@ end Object swashbuckler_class editor_folder player/class +msg +Shipboard most of your life, you've learned good balance and agility, and you've also become strong and hardy. Because of occasional oarswork, you and your shipmates have an admirable command of rhythm, and you can sing well. +You've learned to make the most of your time in port: after passing out drunk in a bar and waking to find yourself short your pay, you've found ways to acquire new capital, or at the very least, talk someone into helping you out of your fix. +On numerous occasions, you've taken up arms and bow in defense of your ship, so you're facile with weapons, but you've had no chance to learn magic or the ways of gods. +endmsg name swashbuckler randomitems swashbuckler_class_items anim_suffix class_swashbuckler @@ -40311,6 +40299,10 @@ end Object warlock_class editor_folder player/class +msg +You've divided your time between learning magic and learning weapons, but have totally disregarded religious devotion. +You're physically stronger and hardier because of your training, and you know the use of weapons and bows. However, you're just a bit clumsy in both weaponry and magic because you've had to divide your time between them. +endmsg name warlock randomitems warlock_class_items face mage.151 @@ -40328,7 +40320,12 @@ end Object warrior_class editor_folder player/class -name Warrior +msg +As a Warrior you've been trained in the art of combat with weapons and in archery. +Because of your training, you're stronger, more agile, and hardier than you would be otherwise. +Your education, however, has not included studies in the magical arts or religious devotion, and, in general, lacks breadth. +endmsg +name warrior randomitems warrior_class_items anim_suffix class_warrior face warrior.151 @@ -40345,6 +40342,12 @@ end Object alchemist_class editor_folder player/class +msg +Your specialty is magical devices and concoctions, but you've also had some training in weaponry, so that you could fend off townsfolk angered by the vile reeks that frequently emanate from your workshop. +Searching for the ultimate recipe and trying to recover lost knowledge has sharpened your wits considerably. +Your focus, however, has left little time for physical training, and your sedentary lifestyle has weakened you. +Your dependence on magical devices extends to the use of a talisman to channel mana. The talisman has become attuned to detonation and transmutation because of the way you have used it. +endmsg name alchemist anim_suffix class_alchemist randomitems alchemist_class_items @@ -40376,6 +40379,12 @@ end Object devotee_class editor_folder player/class +msg +Devotee +The axis of your existence is your devotion to your god, but you've also been busy in other areas. +Your sensitivity to godly powers has also caused your natural magical ability to bloom, and your religious order has encouraged your study. +Your religious superiors have forced you to learn weaponry against your choice, but you will find that they were wise to do so. You haven't trained as assiduously as you should have, so you are soft and weak. +endmsg name devotee anim_suffix class_devotee randomitems devotee_class_items @@ -40393,6 +40402,12 @@ end Object evoker_class editor_folder player/class +msg +Your specialty is the use of attack spells in combat. You practice these spells daily, and your capacity to cast them has increased hugely. +You've had some training in weaponry to help defend yourself, but you tend to leave most of the fighting to others, so your physical training has been somewhat lacking. +You've never learned to use magic innately, but instead rely on a magic talisman to channel mana for you. The attack spells have imprinted themselves somewhat on your talisman, making it good for those and less useful for anything else. +You have not been trained in religious devotion: however, you come from a religious family and will have no particular difficulty taking up the service of a god. +endmsg name evoker anim_suffix class_evoker randomitems evoker_class_items @@ -40425,6 +40440,12 @@ end Object sorcerer_class editor_folder player/class +msg +Your study of magic has been obsessive. Your frequent practice has greatly enhanced your powers, and your intellect has been sharpened enormously by your quest for ever better ways to channel energies. +Barbarians used to push you around on the street until you blasted one's leg off with a lightning bolt. You reflected later on the stupidity of this, because you could by no means have blasted his friends, too. Fortunately, they ran off. You resolved to learn how to take out a whole group of barbarians before losing your temper again. +On the other hand, you have totally neglected to learn to use weaponry, so you're soft and weak. +Your study of magical devices allows you to notice when an object has a magical aura, and you are often able to fathom the purpose of magical devices. +endmsg name sorcerer anim_suffix class_sorcerer randomitems sorcerer_class_items @@ -40458,6 +40479,11 @@ end Object summoner_class editor_folder player/class +msg +You've had more of an emphasis on physical training than most spellcasters, at the expense of less practice with spellcasting. You've never learned to use magic innately, but instead rely on a magic talisman to channel mana for you. +Your work has leaned heavily toward the art of summoning creatures to help you in a fight, and your talisman has become attuned to that. That attunement, however, makes it harder for you to reject unwanted creatures. +You've also had a reasonable education in religious devotion. +endmsg name summoner anim_suffix class_summoner randomitems summoner_class_items @@ -40489,6 +40515,11 @@ end Object wizard_class editor_folder player/class +msg +You're the generalist of the spellcasters. You've emphasized the use of magic and studied all its areas equally. +You've learned something about the gods and religious devotion as well. +To a much lesser extent, you've studied weaponry, but you've not had much physical training: you're mostly sedentary, and so you're not nearly so strong and healthy as you could be. +endmsg race human anim_suffix class_wizard name wizard @@ -40508,8 +40539,7 @@ Object dragon_ability_xrays editor_folder player/dragon_ability msg -Your senses are stimulated. You gain the -ability of X-ray vision! +Your senses are stimulated. You gain the ability of X-ray vision! endmsg name xrays type 114 @@ -41144,7 +41174,7 @@ Description: Northmen are simply humans who have been shaped by their harsh environment. They are stronger, quicker, and hardier than most humans, but also stupid and impious. Most races also consider them a bit unattractive. They have some resistance to cold, but the few of them who take up magic find it difficult to master fire spells. endmsg -name Northman +name northman race human randomitems northman_player_items face viking.151 @@ -41331,7 +41361,7 @@ Quetzalcoatls are a strange mix of snake, bird, human, and a dash of the divine. They are able to manipulate objects with their claws. They are amazingly strong, very quick, and amazingly hardy, but quite stupid and impious (despite the dash of divinity). However, they are strongly magical in nature and usually have a vast reservoir of mana with which to cast any spell they're not too stupid to learn. Often, they're only able to grasp one basic fire spell. Their strongly draconic nature makes them immune to fire and helps them with fire spells, but they are vulnerable to cold. They can grasp weapons, but their bizarre body shape prevents them from using armour, helmets, and other items of apparel intended for bipedal creatures with two arms, two legs, and a head. Their inability to use armour comes back to haunt them when they compare themselves with other races: highly enchanted armour is usually more beneficial than dragonhide! The wings come in handy: they can use them to levitate, and their hide gets thicker as they gain power, compensating them somewhat for not being able to use armour. endmsg -name Quetzalcoatl +name quetzalcoatl race reptile randomitems quetzalcoatl_player_items face quetzalcoatl.131 @@ -41383,7 +41413,7 @@ The Serpentman adventurer is a rare breed. Few Serpentmen ever leave the swamps, as they are not well adjusted for human society. Their heads and feet are not shaped properly to use boots or helmets made for humanoid folk, but their unusual build has given rise to a cultural habit of wearing pieces of bracelet- and ring-like jewelry on their tails. They possess a tough hide and strong legs which enable them to leap further than most folks. Their nasty claws can also double as weapons. They are only partially warm-blooded, and are as a result somewhat susceptible to cold. endmsg -name Serpentman +name serpentman race reptile randomitems serpentman_player_items face serpentman.131 @@ -41729,7 +41759,7 @@ material 4 weight 1800 value 5800 -resist_fire 90 +resist_cold 90 name_pl potions of cold resistance on_use_yield potion_empty client_type 651 @@ -41744,7 +41774,7 @@ material 4 weight 1800 value 28000 -resist_fire 95 +resist_cold 95 name_pl potions of frost resistance on_use_yield potion_empty client_type 651 @@ -41789,7 +41819,7 @@ material 4 weight 1800 value 5200 -resist_cold 90 +resist_fire 90 name_pl potions of fire resistance on_use_yield potion_empty client_type 651 @@ -41804,7 +41834,7 @@ material 4 weight 1800 value 28000 -resist_cold 95 +resist_fire 95 name_pl potions of lava resistance on_use_yield potion_empty client_type 651 @@ -42353,29 +42383,11 @@ Object guide_alchemy editor_folder readable/guide msg -o To practice the art of alchemy, you will - first need to learn some recipes. - These can be found in some of the old - books that are sold in magic shops. -o To earn a little money, you should kill - some orcs/goblins and cast the spell - "alchemy" over the loot, turning it - into small gold nuggets. -o When you know some recipes, you must - try to collect the listed ingredients. - Some can be bought in alchemy-shops, - others must be collected in dungeons. - To identify unknown minerals or potions - type "use_skill alchemy". -o Once you got all ingredients to complete - a recipe, you must put them into your - cauldron. The amount of ingredients must - also be correct. Put the cauldron on the - floor, close it and use the skill - "alchemy" upon it. If you are lucky, you - will get what you longed for. -o Use alchemy to earn money as well as for - creating potions/balms for combat. +o To practice the art of alchemy, you will first need to learn some recipes. These can be found in some of the old books that are sold in magic shops. +o To earn a little money, you should kill some orcs/goblins and cast the spell "alchemy" over the loot, turning it into small gold nuggets. +o When you know some recipes, you must try to collect the listed ingredients. Some can be bought in alchemy-shops, others must be collected in dungeons. To identify unknown minerals or potions type "use_skill alchemy". +o Once you got all ingredients to complete a recipe, you must put them into your cauldron. The amount of ingredients must also be correct. Put the cauldron on the floor, close it and use the skill "alchemy" upon it. If you are lucky, you will get what you longed for. +o Use alchemy to earn money as well as for creating potions/balms for combat. endmsg name guide to Alchemy nrof 1 @@ -42389,34 +42401,13 @@ Object guide_melee editor_folder readable/guide msg -o To become a mighty warrior, you need - basically three things: A good weapon, - good armour and physical toughness. - Then you can kill your foes simply by - running into them. -o Physical toughness means you will need - high Str (for good attacking power) and - Con (for many hitpoints) stats. Look - for "potions of Strength/Constitution". - Try to get items that speed up your - health-regeneration too. -o Weapons will be very important for you. - Note that every weapon has certain - "attacktypes". Most monsters are vulner- - able to one or two attacktypes. Search - for artifact weapons and experiment with - different weapons on different monsters. -o You should know that there are ways to - enchant ordinary weapons. However, it - tends to be very costly. -o It can be helpful to advance at least a - very little bit in divine magic. Spells - for healing, curing and protections can - save your life more than once. +o To become a mighty warrior, you need basically three things: A good weapon, good armour and physical toughness. Then you can kill your foes simply by running into them. +o Physical toughness means you will need high Str (for good attacking power) and Con (for many hitpoints) stats. Look for "potions of Strength/Constitution". Try to get items that speed up your health-regeneration too. +o Weapons will be very important for you. Note that every weapon has certain "attacktypes". Most monsters are vulner- able to one or two attacktypes. Search for artifact weapons and experiment with different weapons on different monsters. +o You should know that there are ways to enchant ordinary weapons. However, it tends to be very costly. +o It can be helpful to advance at least a very little bit in divine magic. Spells for healing, curing and protections can save your life more than once. o Use resist. potions to level up quickly. -o Feeling strong already? Hah - You're - a greenhorn unless you can at least - kill a titan with one hit! +o Feeling strong already? Hah - You're a greenhorn unless you can at least kill a titan with one hit! endmsg name guide to Close Combat nrof 1 @@ -42429,32 +42420,12 @@ Object guide_priest editor_folder readable/guide msg -o If you plan to utilize divine powers you - must first choose a cult. Enter a temple - of the cult you want to join. Step onto - the altar and pray (type "use_skill - praying"). The divine spirit will touch - your soul, attuning your mortal being - to your god. -o Next you must learn prayers. Prayer books - can be bought in magic shops. Some prayers - will have different effects for every cult. - Try to find "holy word" and "bless". -o Casting divine spells (= prayers) will drain - grace. When it runs low, pray to renew your - faith. If your maximum grace is too low - you should try to increase your Wisdom stat. -o You can change cults anytime, but beware: - Your former deity will become very angry and - punish you! You might lose wisdom levels. -o Return to the temple of your cult regularly. - Step onto the altar and pray. This will - please your deity... And rest assured, the - gods do know how to reward a worthy disciple! -o Never lose your faith! Rumors tell about - divine spells of incredible power, and of - old, wise priests that have almost reached - immortality... +o If you plan to utilize divine powers you must first choose a cult. Enter a temple of the cult you want to join. Step onto the altar and pray (type "use_skill praying"). The divine spirit will touch your soul, attuning your mortal being to your god. +o Next you must learn prayers. Prayer books can be bought in magic shops. Some prayers will have different effects for every cult. Try to find "holy word" and "bless". +o Casting divine spells (= prayers) will drain grace. When it runs low, pray to renew your faith. If your maximum grace is too low you should try to increase your Wisdom stat. +o You can change cults anytime, but beware: Your former deity will become very angry and punish you! You might lose wisdom levels. +o Return to the temple of your cult regularly. Step onto the altar and pray. This will please your deity... And rest assured, the gods do know how to reward a worthy disciple! +o Never lose your faith! Rumors tell about divine spells of incredible power, and of old, wise priests that have almost reached immortality... endmsg name guide to Faith nrof 1 @@ -42468,31 +42439,11 @@ Object guide_summon editor_folder readable/guide msg -o There are two classes of summoning spells: - Golem-type spells, which summon a creature - that will move straight forward attempting - to kill any monster blocking the way; and - Petmonster-type spells, which summon masses - of little helpers, that fight in your - cause. -o Use golem-like spells to take down strong - enemies. For example: "summon golem", - "summon xxx elemental", "staff to snake", - "summon avatar". -o Use petmonsters to clear out large maps - with creatures of decent level (compared - to yours). For example: "summon pet - monster", "summon cult monster", "call - holy servant". -o As you raise your skill-level, most - summoning spells will increase in power. -o It is probably stupid to use *nothing* - except summoning spells. But there are - situations where a summoner survives - while another wizard would have died. - Once you have seen the first Balrog fall to - your avatar, there will be no doubt about - your power. +o There are two classes of summoning spells: Golem-type spells, which summon a creature that will move straight forward attempting to kill any monster blocking the way; and Petmonster-type spells, which summon masses of little helpers, that fight in your cause. +o Use golem-like spells to take down strong enemies. For example: "summon golem", "summon xxx elemental", "staff to snake", "summon avatar". +o Use petmonsters to clear out large maps with creatures of decent level (compared to yours). For example: "summon pet monster", "summon cult monster", "call holy servant". +o As you raise your skill-level, most summoning spells will increase in power. +o It is probably stupid to use *nothing* except summoning spells. But there are situations where a summoner survives while another wizard would have died. Once you have seen the first Balrog fall to your avatar, there will be no doubt about your power. endmsg name guide to the Art of Summoning nrof 1 @@ -42506,37 +42457,13 @@ Object guide_wizard editor_folder readable/guide msg -o There are four separate magic skills: - evocation, pyromancy, sorcery, and - summoning. Each skill allows a different - set of spells to be learned and used. -o To advance in the powerful art of magic - you must first learn some spells. - Spellbooks can be bought in magic stores. -o Spellcasting will drain your mana. If you - run low drink a "magic power potion" if - you can afford it. Extremely helpful are - items that speed up your mana-regeneration. - Don't expect to find them easily though! -o Try to increase your Pow stat. by wearing - rings and drinking "potions of power". - This will boost your max. amount of mana. -o All spells are classified in certain spell- - paths. Most of them divide up into one of - the elemental paths: fire, cold and - electricity. Search for items granting - attunement to these spell-paths. This will - reduce the mana-cost for affected spells. - Sometimes it can have other positive - effects as well. -o Most monsters are vulnerable to certain - elemental (and other) attacks. Try to figure - out what spells work best for each type of - monster. This will increase your efficiency. -o Your magic attacks might soon become very - powerful. But don't forget to seize your - full capabilities: use spells for protection, - concealing, summoning... be inventive! +o There are four separate magic skills: evocation, pyromancy, sorcery, and summoning. Each skill allows a different set of spells to be learned and used. +o To advance in the powerful art of magic you must first learn some spells. Spellbooks can be bought in magic stores. +o Spellcasting will drain your mana. If you run low drink a "magic power potion" if you can afford it. Extremely helpful are items that speed up your mana-regeneration. Don't expect to find them easily though! +o Try to increase your Pow stat. by wearing rings and drinking "potions of power". This will boost your max. amount of mana. +o All spells are classified in certain spell-paths. Most of them divide up into one of the elemental paths: fire, cold and electricity. Search for items granting attunement to these spell-paths. This will reduce the mana-cost for affected spells. Sometimes it can have other positive effects as well. +o Most monsters are vulnerable to certain elemental (and other) attacks. Try to figure out what spells work best for each type of monster. This will increase your efficiency. +o Your magic attacks might soon become very powerful. But don't forget to seize your full capabilities: use spells for protection, concealing, summoning... be inventive! endmsg name guide to Wizardry nrof 1 @@ -42554,18 +42481,59 @@ "Nunc Est Dispendum" eton lairepmI enO endmsg +name Imperial Bank Note face imperial.111 race gold and jewels nrof 1 -type 8 +type 36 skill literacy material 1 -value 1 +value 10000 weight 5 name_pl imperials level 1 client_type 1041 end +Object imperial10 +editor_folder readable/readable +msg +One Imperial note + "Nunc Est Dispendum" + eton lairepmI enO +endmsg +name Ten Imperial Bank Note +face imperial.111 +race gold and jewels +nrof 1 +type 36 +skill literacy +material 1 +value 100000 +weight 5 +name_pl 10 Imperial Bank Notes +level 1 +client_type 1041 +end +Object imperial100 +editor_folder readable/readable +msg +One Imperial note + "Nunc Est Dispendum" + eton lairepmI enO +endmsg +name One Hundred Imperial Bank Note +face imperial.111 +race gold and jewels +nrof 1 +type 36 +skill literacy +material 1 +value 1000000 +weight 5 +name_pl 100 Imperial Bank Notes +level 1 +client_type 1041 +end Object letter editor_folder readable/readable face letter.111 @@ -43017,6 +42985,811 @@ no_pick 1 is_water 1 end +Object a_bridge1 +editor_folder road/a_bridge +name bridge +face a_bridge1.111 +type 67 +move_on walk +no_pick 1 +end +Object a_bridge2 +editor_folder road/a_bridge +name bridge +face a_bridge2.111 +type 67 +move_on walk +no_pick 1 +end +Object bridge_2 +editor_folder road/bridgemoat +name bridge +face bridge_m0.111 +no_pick 1 +end +Object bridge_1 +editor_folder road/bridgemoat +name bridge +face bridge_m1.111 +no_pick 1 +end +Object dirtroad_0 +editor_folder road/dirtroad +name dirtroad +face dirtroad_0.111 +no_pick 1 +end +Object dirtroad_1_2 +editor_folder road/dirtroad +name dirtroad +face dirtroad_1.111 +no_pick 1 +end +Object dirtroad_1_4 +editor_folder road/dirtroad +name dirtroad +face dirtroad_2.111 +no_pick 1 +end +Object dirtroad_2_2_1 +editor_folder road/dirtroad +name dirtroad +face dirtroad_3.111 +no_pick 1 +end +Object dirtroad_1_1 +editor_folder road/dirtroad +name dirtroad +face dirtroad_4.111 +no_pick 1 +end +Object dirtroad_2_1_1 +editor_folder road/dirtroad +name dirtroad +face dirtroad_5.111 +no_pick 1 +end +Object dirtroad_2_2_2 +editor_folder road/dirtroad +name dirtroad +face dirtroad_6.111 +no_pick 1 +end +Object dirtroad_3_2 +editor_folder road/dirtroad +name dirtroad +face dirtroad_7.111 +no_pick 1 +end +Object dirtroad_1_3 +editor_folder road/dirtroad +name dirtroad +face dirtroad_8.111 +no_pick 1 +end +Object dirtroad_2_2_4 +editor_folder road/dirtroad +name dirtroad +face dirtroad_9.111 +no_pick 1 +end +Object dirtroad_2_1_2 +editor_folder road/dirtroad +name dirtroad +face dirtroad_A.111 +no_pick 1 +end +Object dirtroad_3_1 +editor_folder road/dirtroad +name dirtroad +face dirtroad_B.111 +no_pick 1 +end +Object dirtroad_2_2_3 +editor_folder road/dirtroad +name dirtroad +face dirtroad_C.111 +no_pick 1 +end +Object dirtroad_3_4 +editor_folder road/dirtroad +name dirtroad +face dirtroad_D.111 +no_pick 1 +end +Object dirtroad_3_3 +editor_folder road/dirtroad +name dirtroad +face dirtroad_E.111 +no_pick 1 +end +Object dirtroad_4 +editor_folder road/dirtroad +name dirtroad +face dirtroad_F.111 +no_pick 1 +end +Object dirtroad_2_051 +editor_folder road/dirtroad +name dirtroad +face dirtroad_05.111 +no_pick 1 +end +Object dirtroad_2_052 +editor_folder road/dirtroad +name dirtroad +face dirtroad_05.211 +no_pick 1 +end +Object dirtroad_2_053 +editor_folder road/dirtroad +name dirtroad +face dirtroad_05.311 +no_pick 1 +end +Object dirtroad_2_0A1 +editor_folder road/dirtroad +name dirtroad +face dirtroad_0A.111 +no_pick 1 +end +Object dirtroad_2_0A2 +editor_folder road/dirtroad +name dirtroad +face dirtroad_0A.211 +no_pick 1 +end +Object dirtroad_2_0A3 +editor_folder road/dirtroad +name dirtroad +face dirtroad_0A.311 +no_pick 1 +end +Object dirtroad_2_141 +editor_folder road/dirtroad +name dirtroad +face dirtroad_14.111 +no_pick 1 +end +Object dirtroad_2_181 +editor_folder road/dirtroad +name dirtroad +face dirtroad_18.111 +no_pick 1 +end +Object dirtroad_2_211 +editor_folder road/dirtroad +name dirtroad +face dirtroad_21.111 +no_pick 1 +end +Object dirtroad_2_281 +editor_folder road/dirtroad +name dirtroad +face dirtroad_28.111 +no_pick 1 +end +Object dirtroad_2_411 +editor_folder road/dirtroad +name dirtroad +face dirtroad_41.111 +no_pick 1 +end +Object dirtroad_2_421 +editor_folder road/dirtroad +name dirtroad +face dirtroad_42.111 +no_pick 1 +end +Object dirtroad_2_821 +editor_folder road/dirtroad +name dirtroad +face dirtroad_82.111 +no_pick 1 +end +Object dirtroad_2_841 +editor_folder road/dirtroad +name dirtroad +face dirtroad_84.111 +no_pick 1 +end +Object drawbridge_1 +editor_folder road/drawbridge +name drawbridge +face dbridge1.111 +no_pick 1 +end +Object drawbridge_2 +editor_folder road/drawbridge +name drawbridge +face dbridge2.111 +no_pick 1 +end +Object footbridge_0 +editor_folder road/footbridge +name footbridge +face footbridge_0.111 +no_pick 1 +end +Object footbridge_1_2 +editor_folder road/footbridge +name footbridge +face footbridge_1.111 +no_pick 1 +end +Object footbridge_1_4 +editor_folder road/footbridge +name footbridge +face footbridge_2.111 +no_pick 1 +end +Object footbridge_2_2_1 +editor_folder road/footbridge +name footbridge +face footbridge_3.111 +no_pick 1 +end +Object footbridge_1_1 +editor_folder road/footbridge +name footbridge +face footbridge_4.111 +no_pick 1 +end +Object footbridge_2_1_1 +editor_folder road/footbridge +name footbridge +face footbridge_5.111 +no_pick 1 +end +Object footbridge_2_2_2 +editor_folder road/footbridge +name footbridge +face footbridge_6.111 +no_pick 1 +end +Object footbridge_3_2 +editor_folder road/footbridge +name footbridge +face footbridge_7.111 +no_pick 1 +end +Object footbridge_1_3 +editor_folder road/footbridge +name footbridge +face footbridge_8.111 +no_pick 1 +end +Object footbridge_2_2_4 +editor_folder road/footbridge +name footbridge +face footbridge_9.111 +no_pick 1 +end +Object footbridge_2_1_2 +editor_folder road/footbridge +name footbridge +face footbridge_A.111 +no_pick 1 +end +Object footbridge_3_1 +editor_folder road/footbridge +name footbridge +face footbridge_B.111 +no_pick 1 +end +Object footbridge_2_2_3 +editor_folder road/footbridge +name footbridge +face footbridge_C.111 +no_pick 1 +end +Object footbridge_3_4 +editor_folder road/footbridge +name footbridge +face footbridge_D.111 +no_pick 1 +end +Object footbridge_3_3 +editor_folder road/footbridge +name footbridge +face footbridge_E.111 +no_pick 1 +end +Object footbridge_4 +editor_folder road/footbridge +name footbridge +face footbridge_F.111 +no_pick 1 +end +Object footpath_0 +editor_folder road/footpath +name footpath +face footpath_0.111 +no_pick 1 +is_floor 1 +smoothlevel 40 +end +Object footpath_1_2 +editor_folder road/footpath +name footpath +face footpath_1.111 +no_pick 1 +is_floor 1 +smoothlevel 40 +end +Object footpath_1_4 +editor_folder road/footpath +name footpath +face footpath_2.111 +no_pick 1 +is_floor 1 +smoothlevel 40 +end +Object footpath_2_2_1 +editor_folder road/footpath +na... [truncated message content] |