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-06-28 06:33:51
|
Revision: 8535 http://gridarta.svn.sourceforge.net/gridarta/?rev=8535&view=rev Author: akirschbaum Date: 2010-06-28 06:33:45 +0000 (Mon, 28 Jun 2010) Log Message: ----------- Explicitly initialize fields. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/map/event/MouseOpEvent.java trunk/src/app/net/sf/gridarta/gui/misc/SplashScreen.java trunk/src/app/net/sf/gridarta/gui/replacedialog/ReplaceDialog.java trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/ScrollLayout.java Modified: trunk/src/app/net/sf/gridarta/gui/map/event/MouseOpEvent.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/event/MouseOpEvent.java 2010-06-28 06:26:10 UTC (rev 8534) +++ trunk/src/app/net/sf/gridarta/gui/map/event/MouseOpEvent.java 2010-06-28 06:33:45 UTC (rev 8535) @@ -62,30 +62,30 @@ /** * The location of the point on the map model. */ - private Point mapLocation; + private Point mapLocation = null; /** * The pressed mouse button. * @see java.awt.event.MouseEvent#getButton() */ - private int button; + private int button = 0; /** * The type of event. * @see java.awt.AWTEvent#getID() */ - private int id; + private int id = 0; /** * The modifiers during this event. * @see java.awt.event.MouseEvent#getModifiers() */ - private int modifiers; + private int modifiers = 0; /** * The number of consecutive mouse clicks (only valid for click events). */ - private int clickCount; + private int clickCount = 0; /** * Create an empty MouseOpEvent. Modified: trunk/src/app/net/sf/gridarta/gui/misc/SplashScreen.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/misc/SplashScreen.java 2010-06-28 06:26:10 UTC (rev 8534) +++ trunk/src/app/net/sf/gridarta/gui/misc/SplashScreen.java 2010-06-28 06:33:45 UTC (rev 8535) @@ -42,7 +42,7 @@ * SplashScreen window. */ @Nullable - private Frame splashScreen; + private Frame splashScreen = null; /** * Show the splash screen. Modified: trunk/src/app/net/sf/gridarta/gui/replacedialog/ReplaceDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/replacedialog/ReplaceDialog.java 2010-06-28 06:26:10 UTC (rev 8534) +++ trunk/src/app/net/sf/gridarta/gui/replacedialog/ReplaceDialog.java 2010-06-28 06:33:45 UTC (rev 8535) @@ -203,7 +203,7 @@ @NotNull private JTextComponent replaceDensityInput; - private int lastSelectedIndex; + private int lastSelectedIndex = REPLACE_WITH_OBJECT_CHOOSER; /** * The {@link ObjectChooserListener} for tracking the selection. Modified: trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/ScrollLayout.java =================================================================== --- trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/ScrollLayout.java 2010-06-28 06:26:10 UTC (rev 8534) +++ trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/ScrollLayout.java 2010-06-28 06:33:45 UTC (rev 8535) @@ -44,13 +44,13 @@ private static final String LEFT_OF_SCROLL_BAR = "los"; @Nullable - private Component center; + private Component center = null; @Nullable - private Component right; + private Component right = null; @Nullable - private Component bottom; + private Component bottom = null; @NotNull private final Collection<Component> leftOfScrollBar = new ArrayList<Component>(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-28 06:26:16
|
Revision: 8534 http://gridarta.svn.sourceforge.net/gridarta/?rev=8534&view=rev Author: akirschbaum Date: 2010-06-28 06:26:10 +0000 (Mon, 28 Jun 2010) Log Message: ----------- Add private modifier. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/TabbedPanel.java Modified: trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/TabbedPanel.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/TabbedPanel.java 2010-06-28 06:23:59 UTC (rev 8533) +++ trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/TabbedPanel.java 2010-06-28 06:26:10 UTC (rev 8534) @@ -270,7 +270,7 @@ * Defines {@link ActionMethod ActionMethods} to move tab locations. * @author Andreas Kirschbaum */ - public class MoveToActions { + private class MoveToActions { /** * The tab. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-28 06:24:05
|
Revision: 8533 http://gridarta.svn.sourceforge.net/gridarta/?rev=8533&view=rev Author: akirschbaum Date: 2010-06-28 06:23:59 +0000 (Mon, 28 Jun 2010) Log Message: ----------- Remove redundant module dependencies. Modified Paths: -------------- trunk/atrinik.iml trunk/crossfire.iml Modified: trunk/atrinik.iml =================================================================== --- trunk/atrinik.iml 2010-06-28 06:22:28 UTC (rev 8532) +++ trunk/atrinik.iml 2010-06-28 06:23:59 UTC (rev 8533) @@ -12,7 +12,6 @@ <orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="module" module-name="gridarta" /> <orderEntry type="module" module-name="utils" /> - <orderEntry type="module" module-name="preferences" /> <orderEntry type="module-library"> <library> <CLASSES> Modified: trunk/crossfire.iml =================================================================== --- trunk/crossfire.iml 2010-06-28 06:22:28 UTC (rev 8532) +++ trunk/crossfire.iml 2010-06-28 06:23:59 UTC (rev 8533) @@ -13,7 +13,6 @@ <orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="module" module-name="gridarta" /> <orderEntry type="module" module-name="utils" /> - <orderEntry type="module" module-name="preferences" /> <orderEntry type="module-library"> <library> <CLASSES> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-28 06:22:34
|
Revision: 8532 http://gridarta.svn.sourceforge.net/gridarta/?rev=8532&view=rev Author: akirschbaum Date: 2010-06-28 06:22:28 +0000 (Mon, 28 Jun 2010) Log Message: ----------- Remove redundant warning suppressions. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/prefs/NetPreferences.java trunk/src/app/net/sf/gridarta/gui/utils/DirectionLayout.java Modified: trunk/src/app/net/sf/gridarta/gui/prefs/NetPreferences.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/prefs/NetPreferences.java 2010-06-28 06:19:22 UTC (rev 8531) +++ trunk/src/app/net/sf/gridarta/gui/prefs/NetPreferences.java 2010-06-28 06:22:28 UTC (rev 8532) @@ -141,7 +141,6 @@ /** * {@inheritDoc} - * @noinspection SuppressionAnnotation */ @Override public final void revert() { Modified: trunk/src/app/net/sf/gridarta/gui/utils/DirectionLayout.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/DirectionLayout.java 2010-06-28 06:19:22 UTC (rev 8531) +++ trunk/src/app/net/sf/gridarta/gui/utils/DirectionLayout.java 2010-06-28 06:22:28 UTC (rev 8532) @@ -320,7 +320,7 @@ * {@inheritDoc} */ @Override - @SuppressWarnings({ "ObjectEquality", "AssignmentToNull" }) + @SuppressWarnings({ "ObjectEquality" }) public void removeLayoutComponent(@NotNull final Component comp) { synchronized (comp.getTreeLock()) { if (cC == comp) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-28 06:19:29
|
Revision: 8531 http://gridarta.svn.sourceforge.net/gridarta/?rev=8531&view=rev Author: akirschbaum Date: 2010-06-28 06:19:22 +0000 (Mon, 28 Jun 2010) Log Message: ----------- Remove redundant this qualifiers. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/script/parameter/MapParameterView.java trunk/src/app/net/sf/gridarta/gui/script/parameter/StringParameterView.java Modified: trunk/src/app/net/sf/gridarta/gui/script/parameter/MapParameterView.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/script/parameter/MapParameterView.java 2010-06-28 06:18:22 UTC (rev 8530) +++ trunk/src/app/net/sf/gridarta/gui/script/parameter/MapParameterView.java 2010-06-28 06:19:22 UTC (rev 8531) @@ -70,7 +70,7 @@ @NotNull @Override public JComponent getValueComponent() { - return this.value; + return value; } /** @@ -79,7 +79,7 @@ @NotNull @Override public JComponent getConfigComponent() { - return this.config; + return config; } } // class MapParameterView Modified: trunk/src/app/net/sf/gridarta/gui/script/parameter/StringParameterView.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/script/parameter/StringParameterView.java 2010-06-28 06:18:22 UTC (rev 8530) +++ trunk/src/app/net/sf/gridarta/gui/script/parameter/StringParameterView.java 2010-06-28 06:19:22 UTC (rev 8531) @@ -71,7 +71,7 @@ @NotNull @Override public JComponent getConfigComponent() { - return this.config; + return config; } @NotNull This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-28 06:18:29
|
Revision: 8530 http://gridarta.svn.sourceforge.net/gridarta/?rev=8530&view=rev Author: akirschbaum Date: 2010-06-28 06:18:22 +0000 (Mon, 28 Jun 2010) Log Message: ----------- Add @Override annotations. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/script/parameter/AbstractPluginParameter.java Modified: trunk/src/app/net/sf/gridarta/script/parameter/AbstractPluginParameter.java =================================================================== --- trunk/src/app/net/sf/gridarta/script/parameter/AbstractPluginParameter.java 2010-06-28 06:03:54 UTC (rev 8529) +++ trunk/src/app/net/sf/gridarta/script/parameter/AbstractPluginParameter.java 2010-06-28 06:18:22 UTC (rev 8530) @@ -63,25 +63,45 @@ this.config = config; } + /** + * {@inheritDoc} + */ @NotNull + @Override public String getDescription() { return description; } + /** + * {@inheritDoc} + */ + @Override public void setDescription(@NotNull final String description) { this.description = description; } + /** + * {@inheritDoc} + */ @NotNull + @Override public String getName() { return name; } + /** + * {@inheritDoc} + */ + @Override public void setName(@NotNull final String name) { this.name = name; } + /** + * {@inheritDoc} + */ @Nullable + @Override public V getValue() { return value; } @@ -96,13 +116,16 @@ } /** - * Sets the parameter value from string representation. - * @param value the value to set - * @return whether the value was updated + * {@inheritDoc} */ + @Override public abstract boolean setStringValue(@NotNull final String value); + /** + * {@inheritDoc} + */ @NotNull + @Override public Element toXML() { final Element e = new Element("parameter"); final Element n = new Element("name"); @@ -117,18 +140,34 @@ return e; } + /** + * {@inheritDoc} + */ + @Override public void fromXML(@NotNull final Element e) { name = e.getChildText("name"); description = e.getChildText("description"); } + /** + * {@inheritDoc} + */ @NotNull + @Override public abstract String getParameterType(); + /** + * {@inheritDoc} + */ + @Override public void addChangeListener(@NotNull final ChangeListener listener) { listeners.add(listener); } + /** + * {@inheritDoc} + */ + @Override public void removeChangeListener(@NotNull final ChangeListener listener) { listeners.remove(listener); } @@ -140,6 +179,10 @@ } } + /** + * {@inheritDoc} + */ + @Override public abstract void visit(@NotNull final PluginParameterVisitor<G, A, R> visitor); } // class PluginParameter This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-28 06:04:00
|
Revision: 8529 http://gridarta.svn.sourceforge.net/gridarta/?rev=8529&view=rev Author: akirschbaum Date: 2010-06-28 06:03:54 +0000 (Mon, 28 Jun 2010) Log Message: ----------- Whitespace changes. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/newmap/NewMapDialog.java trunk/src/app/net/sf/gridarta/validation/checks/ExitChecker.java Modified: trunk/src/app/net/sf/gridarta/gui/newmap/NewMapDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/newmap/NewMapDialog.java 2010-06-27 20:58:53 UTC (rev 8528) +++ trunk/src/app/net/sf/gridarta/gui/newmap/NewMapDialog.java 2010-06-28 06:03:54 UTC (rev 8529) @@ -243,7 +243,7 @@ */ @Override protected boolean isOkButtonEnabled() { - return super.isOkButtonEnabled() &&(mapSizeDefault || (getMapWidth() >= 0 && getMapHeight() >= 0)) && getMapName() != null && (!showMapDifficulty || getDifficulty() >= 0); + return super.isOkButtonEnabled() && (mapSizeDefault || (getMapWidth() >= 0 && getMapHeight() >= 0)) && getMapName() != null && (!showMapDifficulty || getDifficulty() >= 0); } /** Modified: trunk/src/app/net/sf/gridarta/validation/checks/ExitChecker.java =================================================================== --- trunk/src/app/net/sf/gridarta/validation/checks/ExitChecker.java 2010-06-27 20:58:53 UTC (rev 8528) +++ trunk/src/app/net/sf/gridarta/validation/checks/ExitChecker.java 2010-06-28 06:03:54 UTC (rev 8529) @@ -81,7 +81,7 @@ newFile = new File(globalSettings.getMapsDirectory().getAbsolutePath(), path.substring(1)); } else { // we have a relative path: - final MapSquare<G,A,R> mapSquare = gameObject.getMapSquare(); + final MapSquare<G, A, R> mapSquare = gameObject.getMapSquare(); assert mapSquare != null; final File mapFile = mapSquare.getMapModel().getMapFile(); if (mapFile == null) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-27 20:59:00
|
Revision: 8528 http://gridarta.svn.sourceforge.net/gridarta/?rev=8528&view=rev Author: akirschbaum Date: 2010-06-27 20:58:53 +0000 (Sun, 27 Jun 2010) Log Message: ----------- Add regression tests for map validators. Modified Paths: -------------- trunk/build.xml Added Paths: ----------- trunk/test-mapvalidator/ trunk/test-mapvalidator/arch/ trunk/test-mapvalidator/arch/altar.base.111.png trunk/test-mapvalidator/arch/altar.face trunk/test-mapvalidator/arch/altar1.arc trunk/test-mapvalidator/arch/altar2.face trunk/test-mapvalidator/arch/door1.arc trunk/test-mapvalidator/arch/door2.arc trunk/test-mapvalidator/arch/exit1.arc trunk/test-mapvalidator/arch/gate1.arc trunk/test-mapvalidator/arch/mob1.arc trunk/test-mapvalidator/arch/rod1.arc trunk/test-mapvalidator/arch/shop1.arc trunk/test-mapvalidator/arch/shop2.arc trunk/test-mapvalidator/maps/ trunk/test-mapvalidator/maps/AttributeRange trunk/test-mapvalidator/maps/AttributeRange.expected trunk/test-mapvalidator/maps/ConnectedInsideContainer trunk/test-mapvalidator/maps/ConnectedInsideContainer.expected trunk/test-mapvalidator/maps/ConnectedPickable trunk/test-mapvalidator/maps/ConnectedPickable.expected trunk/test-mapvalidator/maps/Connection trunk/test-mapvalidator/maps/Connection.expected trunk/test-mapvalidator/maps/CustomType trunk/test-mapvalidator/maps/CustomType.expected trunk/test-mapvalidator/maps/Exit trunk/test-mapvalidator/maps/Exit.expected trunk/test-mapvalidator/maps/MapDifficulty trunk/test-mapvalidator/maps/MapDifficulty.expected trunk/test-mapvalidator/maps/NonAbsoluteExitPath trunk/test-mapvalidator/maps/NonAbsoluteExitPath.expected trunk/test-mapvalidator/maps/PaidItemShopSquare trunk/test-mapvalidator/maps/PaidItemShopSquare.expected trunk/test-mapvalidator/maps/ShopSquare trunk/test-mapvalidator/maps/ShopSquare.expected trunk/test-mapvalidator/maps/TilePaths trunk/test-mapvalidator/maps/TilePaths.expected trunk/test-mapvalidator/maps/UndefinedArchetype trunk/test-mapvalidator/maps/UndefinedArchetype.expected trunk/test-mapvalidator/maps/UndefinedFace trunk/test-mapvalidator/maps/UndefinedFace.expected trunk/test-mapvalidator/maps/UnsetSlaying trunk/test-mapvalidator/maps/UnsetSlaying.expected trunk/test-mapvalidator/maps/editor/ trunk/test-mapvalidator/maps/editor/pickmaps/ trunk/test-mapvalidator/maps/editor/scripts/ trunk/test-mapvalidator/maps/editor/scripts/MapValidator trunk/test-mapvalidator/regtest.conf Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2010-06-27 20:27:26 UTC (rev 8527) +++ trunk/build.xml 2010-06-27 20:58:53 UTC (rev 8528) @@ -833,7 +833,9 @@ </javadoc> </target> - <target name="test" description="Executes the junit tests." depends="test-atrinik,test-crossfire,test-daimonin,test-gridarta,test-model,test-preferences,test-textedit,test-utils"> + <target name="test" description="Executes all tests." depends="test-junit,test-mapvalidator"/> + + <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"> <include name="TEST-*.xml"/> @@ -1029,4 +1031,11 @@ </junit> </target> + <target name="test-mapvalidator" description="Executes the map validator tests." depends="jar-crossfire"> + <java jar="CrossfireEditor.jar" failonerror="true" fork="true"> + <arg value="--config=test-mapvalidator/regtest.conf"/> + <arg value="--script=MapValidator"/> + </java> + </target> + </project> Added: trunk/test-mapvalidator/arch/altar.base.111.png =================================================================== (Binary files differ) Property changes on: trunk/test-mapvalidator/arch/altar.base.111.png ___________________________________________________________________ Added: svn:mime-type + image/png Added: trunk/test-mapvalidator/arch/altar.face =================================================================== --- trunk/test-mapvalidator/arch/altar.face (rev 0) +++ trunk/test-mapvalidator/arch/altar.face 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,5 @@ +animation altar +altar.111 +mina +face altar.111 +end Property changes on: trunk/test-mapvalidator/arch/altar.face ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/arch/altar1.arc =================================================================== --- trunk/test-mapvalidator/arch/altar1.arc (rev 0) +++ trunk/test-mapvalidator/arch/altar1.arc 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,5 @@ +Object altar1 +type 18 +no_pick 1 +food 1 +end Property changes on: trunk/test-mapvalidator/arch/altar1.arc ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/arch/altar2.face =================================================================== --- trunk/test-mapvalidator/arch/altar2.face (rev 0) +++ trunk/test-mapvalidator/arch/altar2.face 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,5 @@ +animation altar2 +altar.112 +mina +face altar.112 +end Property changes on: trunk/test-mapvalidator/arch/altar2.face ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/arch/door1.arc =================================================================== --- trunk/test-mapvalidator/arch/door1.arc (rev 0) +++ trunk/test-mapvalidator/arch/door1.arc 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,4 @@ +Object door1 +type 20 +slaying unset_value +end Property changes on: trunk/test-mapvalidator/arch/door1.arc ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/arch/door2.arc =================================================================== --- trunk/test-mapvalidator/arch/door2.arc (rev 0) +++ trunk/test-mapvalidator/arch/door2.arc 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,4 @@ +Object door2 +type 20 +slaying player +end Property changes on: trunk/test-mapvalidator/arch/door2.arc ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/arch/exit1.arc =================================================================== --- trunk/test-mapvalidator/arch/exit1.arc (rev 0) +++ trunk/test-mapvalidator/arch/exit1.arc 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,4 @@ +Object exit1 +type 66 +no_pick 1 +end Property changes on: trunk/test-mapvalidator/arch/exit1.arc ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/arch/gate1.arc =================================================================== --- trunk/test-mapvalidator/arch/gate1.arc (rev 0) +++ trunk/test-mapvalidator/arch/gate1.arc 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,4 @@ +Object gate1 +type 91 +no_pick 1 +end Property changes on: trunk/test-mapvalidator/arch/gate1.arc ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/arch/mob1.arc =================================================================== --- trunk/test-mapvalidator/arch/mob1.arc (rev 0) +++ trunk/test-mapvalidator/arch/mob1.arc 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,5 @@ +Object mob1 +alive 1 +monster 1 +level 1 +end Property changes on: trunk/test-mapvalidator/arch/mob1.arc ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/arch/rod1.arc =================================================================== --- trunk/test-mapvalidator/arch/rod1.arc (rev 0) +++ trunk/test-mapvalidator/arch/rod1.arc 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,4 @@ +Object rod1 +type 3 +level 1 +end Property changes on: trunk/test-mapvalidator/arch/rod1.arc ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/arch/shop1.arc =================================================================== --- trunk/test-mapvalidator/arch/shop1.arc (rev 0) +++ trunk/test-mapvalidator/arch/shop1.arc 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,4 @@ +Object shop1 +type 68 +no_pick 1 +end Property changes on: trunk/test-mapvalidator/arch/shop1.arc ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/arch/shop2.arc =================================================================== --- trunk/test-mapvalidator/arch/shop2.arc (rev 0) +++ trunk/test-mapvalidator/arch/shop2.arc 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,6 @@ +Object shop2 +type 68 +damned 1 +no_magic 1 +no_pick 1 +end Property changes on: trunk/test-mapvalidator/arch/shop2.arc ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/maps/AttributeRange =================================================================== --- trunk/test-mapvalidator/maps/AttributeRange (rev 0) +++ trunk/test-mapvalidator/maps/AttributeRange 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,55 @@ +arch map +name test for AttributeRange map validator +difficulty 1 +width 6 +height 2 +msg +Created: 2010-06-24 Andreas Kirschbaum +endmsg +end +arch rod1 +level 0 +end +arch mob1 +y 1 +level 0 +end +arch rod1 +x 1 +end +arch mob1 +x 1 +y 1 +level 1 +end +arch rod1 +x 2 +level 115 +end +arch mob1 +x 2 +y 1 +level 200 +end +arch rod1 +x 3 +level 116 +end +arch mob1 +x 3 +y 1 +level 201 +end +arch mob1 +x 5 +arch rod1 +level 0 +end +end +arch mob1 +x 5 +y 1 +arch mob1 +level 0 +end +end Property changes on: trunk/test-mapvalidator/maps/AttributeRange ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/maps/AttributeRange.expected =================================================================== --- trunk/test-mapvalidator/maps/AttributeRange.expected (rev 0) +++ trunk/test-mapvalidator/maps/AttributeRange.expected 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,6 @@ +[0|0] Suspicious attribute value [rod1] [rod1] [casting level, 0] +[3|0] Suspicious attribute value [rod1] [rod1] [casting level, 116] +[5|0] Suspicious attribute value [rod1] [rod1] [casting level, 0] +[0|1] Suspicious attribute value [mob1] [mob1] [level, 0] +[3|1] Suspicious attribute value [mob1] [mob1] [level, 201] +[5|1] Suspicious attribute value [mob1] [mob1] [level, 0] Property changes on: trunk/test-mapvalidator/maps/AttributeRange.expected ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/maps/ConnectedInsideContainer =================================================================== --- trunk/test-mapvalidator/maps/ConnectedInsideContainer (rev 0) +++ trunk/test-mapvalidator/maps/ConnectedInsideContainer 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,49 @@ +arch map +name test for ConnectedInsideContainer map validator +difficulty 1 +width 2 +height 4 +msg +Created: 2010-06-24 Andreas Kirschbaum +endmsg +end +arch altar1 +connected 1 +end +arch mob1 +y 1 +arch altar1 +connected 1 +end +end +arch altar1 +y 2 +connected 1 +no_pick 0 +end +arch altar1 +y 3 +connected 2 +end +arch gate1 +x 1 +connected 1 +end +arch mob1 +x 1 +y 1 +arch gate1 +connected 1 +end +end +arch gate1 +x 1 +y 2 +connected 1 +no_pick 0 +end +arch gate1 +x 1 +y 3 +connected 3 +end Property changes on: trunk/test-mapvalidator/maps/ConnectedInsideContainer ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/maps/ConnectedInsideContainer.expected =================================================================== --- trunk/test-mapvalidator/maps/ConnectedInsideContainer.expected (rev 0) +++ trunk/test-mapvalidator/maps/ConnectedInsideContainer.expected 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,6 @@ +[0|1] Connected object inside container [altar1] [altar1] +[1|1] Connected object inside container [gate1] [gate1] +[0|2] Pickable connected object [altar1] [altar1] +[1|2] Pickable connected object [gate1] [gate1] +[0|3] Connection without sinks [altar1] [altar1] [2] +[1|3] Connection without sources [gate1] [gate1] [3] Property changes on: trunk/test-mapvalidator/maps/ConnectedInsideContainer.expected ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/maps/ConnectedPickable =================================================================== --- trunk/test-mapvalidator/maps/ConnectedPickable (rev 0) +++ trunk/test-mapvalidator/maps/ConnectedPickable 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,32 @@ +arch map +name test for ConnectedPickable map validator +difficulty 1 +width 3 +height 2 +msg +Created: 2010-06-27 Andreas Kirschbaum +endmsg +end +arch altar1 +connected 1 +move_on walk +end +arch altar1 +x 1 +connected 1 +move_on walk +no_pick 0 +end +arch mob1 +x 1 +y 1 +arch altar1 +connected 1 +move_on walk +no_pick 0 +end +end +arch gate1 +x 2 +connected 1 +end Property changes on: trunk/test-mapvalidator/maps/ConnectedPickable ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/maps/ConnectedPickable.expected =================================================================== --- trunk/test-mapvalidator/maps/ConnectedPickable.expected (rev 0) +++ trunk/test-mapvalidator/maps/ConnectedPickable.expected 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,3 @@ +[1|0] Pickable connected object [altar1] [altar1] +[1|1] Connected object inside container [altar1] [altar1] +[1|1] Pickable connected object [altar1] [altar1] Property changes on: trunk/test-mapvalidator/maps/ConnectedPickable.expected ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/maps/Connection =================================================================== --- trunk/test-mapvalidator/maps/Connection (rev 0) +++ trunk/test-mapvalidator/maps/Connection 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,71 @@ +arch map +name test for Connection map validator +difficulty 1 +width 5 +height 8 +msg +Created: 2010-06-27 Andreas Kirschbaum +endmsg +end +arch altar1 +y 1 +connected 2 +end +arch altar1 +y 3 +connected 4 +end +arch rod1 +y 7 +connected 10 +no_pick 1 +end +arch altar1 +x 1 +connected 1 +end +arch altar1 +x 1 +y 1 +connected 2 +end +arch altar1 +x 1 +y 2 +connected 3 +end +arch altar1 +x 1 +y 3 +connected 4 +end +arch gate1 +x 3 +y 2 +connected 3 +end +arch gate1 +x 3 +y 3 +connected 4 +end +arch gate1 +x 3 +y 5 +connected 6 +end +arch gate1 +x 3 +y 6 +connected 7 +end +arch gate1 +x 4 +y 3 +connected 4 +end +arch gate1 +x 4 +y 5 +connected 6 +end Property changes on: trunk/test-mapvalidator/maps/Connection ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/maps/Connection.expected =================================================================== --- trunk/test-mapvalidator/maps/Connection.expected (rev 0) +++ trunk/test-mapvalidator/maps/Connection.expected 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,5 @@ +[1|0] Connection without sinks [altar1] [altar1] [1] +[0|1 1|1] Connection without sinks [altar1 altar1] [altar1] [altar1] [2] +[3|5 4|5] Connection without sources [gate1 gate1] [gate1] [gate1] [6] +[3|6] Connection without sources [gate1] [gate1] [7] +[0|7] Unexpected connection [rod1] [rod1] Property changes on: trunk/test-mapvalidator/maps/Connection.expected ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/maps/CustomType =================================================================== --- trunk/test-mapvalidator/maps/CustomType (rev 0) +++ trunk/test-mapvalidator/maps/CustomType 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,21 @@ +arch map +name test for CustomType map validator +difficulty 1 +width 3 +height 1 +msg +Created: 2010-06-27 Andreas Kirschbaum +endmsg +end +arch rod1 +end +arch rod1 +x 1 +type 1 +end +arch mob1 +x 2 +arch rod1 +type 1 +end +end Property changes on: trunk/test-mapvalidator/maps/CustomType ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/maps/CustomType.expected =================================================================== --- trunk/test-mapvalidator/maps/CustomType.expected (rev 0) +++ trunk/test-mapvalidator/maps/CustomType.expected 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,2 @@ +[1|0] Object with custom type [rod1] [rod1] [3, 1] +[2|0] Object with custom type [rod1] [rod1] [3, 1] Property changes on: trunk/test-mapvalidator/maps/CustomType.expected ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/maps/Exit =================================================================== --- trunk/test-mapvalidator/maps/Exit (rev 0) +++ trunk/test-mapvalidator/maps/Exit 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,33 @@ +arch map +name test for Exit map validator +difficulty 1 +width 2 +height 6 +msg +Created: 2010-06-27 Andreas Kirschbaum +endmsg +end +arch exit1 +end +arch exit1 +slaying /! +y 1 +end +arch exit1 +slaying /Exit +y 3 +end +arch exit1 +slaying Exit +y 5 +end +arch exit1 +slaying /nonexisting +x 1 +y 2 +end +arch exit1 +slaying nonexisting +x 1 +y 4 +end Property changes on: trunk/test-mapvalidator/maps/Exit ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/maps/Exit.expected =================================================================== --- trunk/test-mapvalidator/maps/Exit.expected (rev 0) +++ trunk/test-mapvalidator/maps/Exit.expected 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,2 @@ +[1|2] Exit path invalid [exit1] [exit1] +[1|4] Exit path invalid [exit1] [exit1] Property changes on: trunk/test-mapvalidator/maps/Exit.expected ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/maps/MapDifficulty =================================================================== --- trunk/test-mapvalidator/maps/MapDifficulty (rev 0) +++ trunk/test-mapvalidator/maps/MapDifficulty 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,8 @@ +arch map +name test for MapDifficulty map validator +width 1 +height 1 +msg +Created: 2010-06-27 Andreas Kirschbaum +endmsg +end Property changes on: trunk/test-mapvalidator/maps/MapDifficulty ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/maps/MapDifficulty.expected =================================================================== --- trunk/test-mapvalidator/maps/MapDifficulty.expected (rev 0) +++ trunk/test-mapvalidator/maps/MapDifficulty.expected 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1 @@ +Map difficulty invalid Property changes on: trunk/test-mapvalidator/maps/MapDifficulty.expected ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/maps/NonAbsoluteExitPath =================================================================== --- trunk/test-mapvalidator/maps/NonAbsoluteExitPath (rev 0) +++ trunk/test-mapvalidator/maps/NonAbsoluteExitPath 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,17 @@ +arch map +name test for NonAbsoluteExitPath map validator +difficulty 1 +width 2 +height 1 +msg +Created: 2010-06-27 Andreas Kirschbaum +endmsg +unique 1 +end +arch exit1 +slaying NonAbsoluteExitPath +end +arch exit1 +slaying /NonAbsoluteExitPath +x 1 +end Property changes on: trunk/test-mapvalidator/maps/NonAbsoluteExitPath ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/maps/NonAbsoluteExitPath.expected =================================================================== --- trunk/test-mapvalidator/maps/NonAbsoluteExitPath.expected (rev 0) +++ trunk/test-mapvalidator/maps/NonAbsoluteExitPath.expected 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1 @@ +[0|0] Exit path is not absolute [exit1] [exit1] [NonAbsoluteExitPath] Property changes on: trunk/test-mapvalidator/maps/NonAbsoluteExitPath.expected ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/maps/PaidItemShopSquare =================================================================== --- trunk/test-mapvalidator/maps/PaidItemShopSquare (rev 0) +++ trunk/test-mapvalidator/maps/PaidItemShopSquare 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,26 @@ +arch map +name test for ShopSquare map validator +difficulty 1 +width 1 +height 3 +msg +Created: 2010-06-27 Andreas Kirschbaum +endmsg +end +arch shop2 +end +arch rod1 +end +arch shop2 +y 1 +end +arch rod1 +y 1 +unpaid 1 +end +arch shop2 +y 2 +end +arch mob1 +y 2 +end Property changes on: trunk/test-mapvalidator/maps/PaidItemShopSquare ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/maps/PaidItemShopSquare.expected =================================================================== --- trunk/test-mapvalidator/maps/PaidItemShopSquare.expected (rev 0) +++ trunk/test-mapvalidator/maps/PaidItemShopSquare.expected 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1 @@ +[0|0] Shop square contains paid item Property changes on: trunk/test-mapvalidator/maps/PaidItemShopSquare.expected ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/maps/ShopSquare =================================================================== --- trunk/test-mapvalidator/maps/ShopSquare (rev 0) +++ trunk/test-mapvalidator/maps/ShopSquare 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,43 @@ +arch map +name test for ShopSquare map validator +difficulty 1 +width 4 +height 2 +msg +Created: 2010-06-27 Andreas Kirschbaum +endmsg +end +arch shop1 +end +arch shop2 +y 1 +no_magic 0 +damned 0 +end +arch shop1 +x 1 +no_magic 1 +end +arch shop2 +x 1 +y 1 +damned 0 +end +arch shop1 +x 2 +damned 1 +end +arch shop2 +x 2 +y 1 +no_magic 0 +end +arch shop1 +x 3 +no_magic 1 +damned 1 +end +arch shop2 +x 3 +y 1 +end Property changes on: trunk/test-mapvalidator/maps/ShopSquare ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/maps/ShopSquare.expected =================================================================== --- trunk/test-mapvalidator/maps/ShopSquare.expected (rev 0) +++ trunk/test-mapvalidator/maps/ShopSquare.expected 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,6 @@ +[0|0] Shop square allows magic and/or prayers +[1|0] Shop square allows magic and/or prayers +[2|0] Shop square allows magic and/or prayers +[0|1] Shop square allows magic and/or prayers +[1|1] Shop square allows magic and/or prayers +[2|1] Shop square allows magic and/or prayers Property changes on: trunk/test-mapvalidator/maps/ShopSquare.expected ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/maps/TilePaths =================================================================== --- trunk/test-mapvalidator/maps/TilePaths (rev 0) +++ trunk/test-mapvalidator/maps/TilePaths 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,13 @@ +arch map +name test for TilePaths map validator +difficulty 1 +width 1 +height 1 +msg +Created: 2010-06-27 Andreas Kirschbaum +endmsg +tile_path_1 nonexistant +tile_path_2 TilePaths +tile_path_3 /TilePaths +tile_path_4 /nonexistant +end Property changes on: trunk/test-mapvalidator/maps/TilePaths ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/maps/TilePaths.expected =================================================================== --- trunk/test-mapvalidator/maps/TilePaths.expected (rev 0) +++ trunk/test-mapvalidator/maps/TilePaths.expected 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,2 @@ +Tile path invalid [NORTH, nonexistant] +Tile path invalid [WEST, /nonexistant] Property changes on: trunk/test-mapvalidator/maps/TilePaths.expected ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/maps/UndefinedArchetype =================================================================== --- trunk/test-mapvalidator/maps/UndefinedArchetype (rev 0) +++ trunk/test-mapvalidator/maps/UndefinedArchetype 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,11 @@ +arch map +name test for UndefinedArchetype map validator +difficulty 1 +width 1 +height 1 +msg +Created: 2010-06-27 Andreas Kirschbaum +endmsg +end +arch undefined +end Property changes on: trunk/test-mapvalidator/maps/UndefinedArchetype ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/maps/UndefinedArchetype.expected =================================================================== --- trunk/test-mapvalidator/maps/UndefinedArchetype.expected (rev 0) +++ trunk/test-mapvalidator/maps/UndefinedArchetype.expected 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1 @@ +[0|0] Undefined archetype [undefined] [undefined] Property changes on: trunk/test-mapvalidator/maps/UndefinedArchetype.expected ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/maps/UndefinedFace =================================================================== --- trunk/test-mapvalidator/maps/UndefinedFace (rev 0) +++ trunk/test-mapvalidator/maps/UndefinedFace 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,40 @@ +arch map +name test for UndefinedFace map validator +difficulty 1 +width 2 +height 4 +msg +Created: 2010-06-27 Andreas Kirschbaum +endmsg +end +arch exit1 +face altar.111 +end +arch exit1 +face altar.112 +y 1 +end +arch exit1 +animation altar +x 1 +is_animated 1 +end +arch exit1 +animation altar2 +x 1 +y 1 +is_animated 1 +end +arch exit1 +animation altar3 +x 1 +y 2 +is_animated 1 +end +arch exit1 +face altar.111 +animation altar3 +x 1 +y 3 +is_animated 1 +end Property changes on: trunk/test-mapvalidator/maps/UndefinedFace ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/maps/UndefinedFace.expected =================================================================== --- trunk/test-mapvalidator/maps/UndefinedFace.expected (rev 0) +++ trunk/test-mapvalidator/maps/UndefinedFace.expected 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,4 @@ +[0|1] Undefined face [exit1] [exit1] [altar.112] +[1|1] Undefined animation [exit1] [exit1] [altar2] +[1|2] Undefined animation [exit1] [exit1] [altar3] +[1|3] Undefined animation [exit1] [exit1] [altar3] Property changes on: trunk/test-mapvalidator/maps/UndefinedFace.expected ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/maps/UnsetSlaying =================================================================== --- trunk/test-mapvalidator/maps/UnsetSlaying (rev 0) +++ trunk/test-mapvalidator/maps/UnsetSlaying 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,37 @@ +arch map +name test for UnsetSlaying map validator +difficulty 1 +width 2 +height 4 +msg +Created: 2010-06-27 Andreas Kirschbaum +endmsg +end +arch door1 +end +arch door1 +slaying unset_value1 +y 1 +end +arch door1 +slaying player +y 2 +end +arch mob1 +y 3 +arch door1 +end +end +arch door2 +x 1 +end +arch door2 +slaying player1 +x 1 +y 1 +end +arch door2 +slaying unset_value +x 1 +y 2 +end Property changes on: trunk/test-mapvalidator/maps/UnsetSlaying ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/maps/UnsetSlaying.expected =================================================================== --- trunk/test-mapvalidator/maps/UnsetSlaying.expected (rev 0) +++ trunk/test-mapvalidator/maps/UnsetSlaying.expected 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,2 @@ +[0|0] Invalid key string [door1] [door1] +[0|3] Invalid key string [door1] [door1] Property changes on: trunk/test-mapvalidator/maps/UnsetSlaying.expected ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/maps/editor/scripts/MapValidator =================================================================== --- trunk/test-mapvalidator/maps/editor/scripts/MapValidator (rev 0) +++ trunk/test-mapvalidator/maps/editor/scripts/MapValidator 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,134 @@ +<?xml version="1.0" encoding="UTF-8"?> +<script> + <name>MapValidator</name> + <code><![CDATA[import java.io.BufferedWriter; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileWriter; +import java.io.InputStream; +import java.util.Iterator; +import net.sf.gridarta.model.gameobject.GameObject; +import net.sf.gridarta.model.io.RecursiveFileIterator; +import net.sf.gridarta.model.map.validation.ErrorCollector; +import net.sf.gridarta.model.map.validation.errors.ValidationError; + +String checkMap(File mapFile, String mapPath) { + try { + map = mapManager.openMapFile(mapFile, false); + } catch (IOException ex) { + print("Cannot load map '"+mapFile+"': "+ex.getMessage()); + return null; + } + if (map == null) { + print(mapPath + ":"); + print("- cannot load map file"); + return null; + } + + ErrorCollector errorCollector; + try { + try { + validators.validateAll(map.getMapModel()); + } finally { + errorCollector = map.getMapModel().getErrors(); + } + } finally { + mapManager.release(map); + } + + StringBuffer sb = new StringBuffer(); + Iterator it = errorCollector.iterator(); + while (it.hasNext()) { + ValidationError validationError = it.next(); + + sb.append(validationError); + + Iterator it2 = validationError.getGameObjects().iterator(); + while (it2.hasNext()) { + GameObject gameObject = it2.next(); + sb.append(" [").append(gameObject.getBestName()).append(']'); + } + + String parameter0 = validationError.getParameter(0); + if (parameter0 != null) { + sb.append(" [").append(parameter0); + String parameter1 = validationError.getParameter(1); + if (parameter1 != null) { + sb.append(", ").append(parameter1); + } + sb.append(']'); + } + sb.append("\n"); + } + + return sb.toString(); +} + +if (baseDirectory == null || baseDirectory.length() <= 0) { + baseDirectory = "/"; +} +print("Checking maps below " + baseDirectory + "..."); +if (baseDirectory.endsWith("/")) { + baseDirectory = baseDirectory.substring(0, baseDirectory.length() - 1); +} + +String mapDefaultFolder = globalSettings.getMapsDirectory().getPath(); +String rootDirectory = mapDefaultFolder + baseDirectory; +boolean ok = true; +Iterator it = new RecursiveFileIterator(new File(rootDirectory)); +while (it.hasNext()) { + File file = it.next(); + String name = file.getName(); + String path = file.getPath(); + if (file.isFile() + && path.startsWith(rootDirectory) + && !name.endsWith(".expected")) { + File expectedFile = new File(file.getPath() + ".expected"); + if (expectedFile.exists()) { + String result = checkMap(file, file.getPath().substring(mapDefaultFolder.length())); + + final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); + final InputStream inputStream = new FileInputStream(expectedFile); + try { + final byte[] buf = new byte[1024]; + for (;;) { + final int len = inputStream.read(buf); + if (len == -1) { + break; + } + byteArrayOutputStream.write(buf, 0, len); + } + } finally { + inputStream.close(); + } + final String expected = byteArrayOutputStream.toString("UTF-8"); + if (result.equals(expected)) { + print(file + ": OK"); + } else { + print(file + ": unexpected result:"); + print(result); + print("expected result:"); + print(expected); + ok = false; + } + } + } +} +if (!ok) { + throw new AssertionError(); +} +]]></code> + <mode> + <autoboot>false</autoboot> + <bash>true</bash> + <filter>false</filter> + </mode> + <parameter> + <name>baseDirectory</name> + <description>Base Directory</description> + <type>java.lang.String</type> + <value>/</value> + </parameter> +</script> + Property changes on: trunk/test-mapvalidator/maps/editor/scripts/MapValidator ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + CRLF Added: trunk/test-mapvalidator/regtest.conf =================================================================== --- trunk/test-mapvalidator/regtest.conf (rev 0) +++ trunk/test-mapvalidator/regtest.conf 2010-06-27 20:58:53 UTC (rev 8528) @@ -0,0 +1,71 @@ + +# Whether the map validator is enabled. +MapValidator.All=true + +UpdaterAutoCheck=false + +# Whether this map validator check is is enabled. +Validator.AttributeRange=true + +# Whether this map validator check is is enabled. +Validator.ConnectedInsideContainer=true + +# Whether this map validator check is is enabled. +Validator.ConnectedPickable=true + +# Whether this map validator check is is enabled. +Validator.Connection=true + +# Whether this map validator check is enabled. +Validator.CustomType=true + +# Whether this map validator check is is enabled. +Validator.Exit=true + +# Whether this map validator check is is enabled. +Validator.MapDifficulty=true + +# Whether this map validator check is is enabled. +Validator.NonAbsoluteExitPath=true + +# Whether this map validator check is is enabled. +Validator.PaidItemShopSquare=true + +# Whether this map validator check is is enabled. +Validator.ShopSquare=true + +# Whether this map validator check is is enabled. +Validator.TilePaths=true + +# Whether this map validator check is is enabled. +Validator.UndefinedArchetype=true + +# Whether this map validator check is is enabled. +Validator.UndefinedFace=true + +# Whether this map validator check is is enabled. +Validator.UnsetSlaying=true + +# Archetype directory. +archDirectory=test-mapvalidator/arch + +configSource=ARCH_DIRECTORY + +# Last displayed version of the help documentation. +docuVersion=2 + +filterRealMaps=true + +# Language for the user interface. +language=en + +# Maps directory. +mapDirectory=test-mapvalidator/maps + +mediaDirectory= + +# Script directory. +scriptDirectory=test-mapvalidator/scripts + +# The image set to use. +useImageSet=base Property changes on: trunk/test-mapvalidator/regtest.conf ___________________________________________________________________ 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-06-27 20:27:33
|
Revision: 8527 http://gridarta.svn.sourceforge.net/gridarta/?rev=8527&view=rev Author: akirschbaum Date: 2010-06-27 20:27:26 +0000 (Sun, 27 Jun 2010) Log Message: ----------- Improve --script command-line option to report plugin script errors to the operating system. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/crossfire/ChangeLog trunk/daimonin/ChangeLog trunk/src/app/net/sf/gridarta/script/BshThread.java trunk/src/app/net/sf/gridarta/script/ScriptExecutor.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2010-06-27 20:25:56 UTC (rev 8526) +++ trunk/atrinik/ChangeLog 2010-06-27 20:27:26 UTC (rev 8527) @@ -1,7 +1,7 @@ 2010-06-27 Andreas Kirschbaum - * Improve --script command-line option to report some plugin - script errors to the operating system. + * Improve --script command-line option to report plugin script + errors to the operating system. * Include details in error messages of "Tile path invalid" map validator. Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2010-06-27 20:25:56 UTC (rev 8526) +++ trunk/crossfire/ChangeLog 2010-06-27 20:27:26 UTC (rev 8527) @@ -1,7 +1,7 @@ 2010-06-27 Andreas Kirschbaum - * Improve --script command-line option to report some plugin - script errors to the operating system. + * Improve --script command-line option to report plugin script + errors to the operating system. * Include details in error messages of "Tile path invalid" map validator. Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2010-06-27 20:25:56 UTC (rev 8526) +++ trunk/daimonin/ChangeLog 2010-06-27 20:27:26 UTC (rev 8527) @@ -1,7 +1,7 @@ 2010-06-27 Andreas Kirschbaum - * Improve --script command-line option to report some plugin - script errors to the operating system. + * Improve --script command-line option to report plugin script + errors to the operating system. * Include details in error messages of "Tile path invalid" map validator. Modified: trunk/src/app/net/sf/gridarta/script/BshThread.java =================================================================== --- trunk/src/app/net/sf/gridarta/script/BshThread.java 2010-06-27 20:25:56 UTC (rev 8526) +++ trunk/src/app/net/sf/gridarta/script/BshThread.java 2010-06-27 20:27:26 UTC (rev 8527) @@ -43,6 +43,11 @@ private final Interpreter interpreter; /** + * Whether the script has been executed successfully. + */ + private boolean success = false; + + /** * Create a BshThread with name. * @param name Name to assign to the BshThread. * @param script ScriptModel for this BshThread. @@ -62,9 +67,18 @@ try { interpreter.set("scriptThread", this); interpreter.eval(script.getCode()); + success = true; } catch (final EvalError e) { e.printStackTrace(interpreter.getErr()); } } + /** + * Returns whether the script has been executed successfully. + * @return whether the script has been executed successfully + */ + public boolean isSuccess() { + return success; + } + } // class BshThread Modified: trunk/src/app/net/sf/gridarta/script/ScriptExecutor.java =================================================================== --- trunk/src/app/net/sf/gridarta/script/ScriptExecutor.java 2010-06-27 20:25:56 UTC (rev 8526) +++ trunk/src/app/net/sf/gridarta/script/ScriptExecutor.java 2010-06-27 20:27:26 UTC (rev 8527) @@ -145,13 +145,18 @@ } }; - final Thread scriptThread = doRunScript(clonedScript, console); + final BshThread<G, A, R> scriptThread = doRunScript(clonedScript, console); try { scriptThread.join(); - } catch (final InterruptedException ignored) { + } catch (final InterruptedException ex) { scriptThread.interrupt(); Thread.currentThread().interrupt(); + throw new ScriptExecException("interrupted", ex); } + + if (!scriptThread.isSuccess()) { + throw new ScriptExecException("script failed"); + } } /** @@ -163,7 +168,7 @@ * @throws ScriptExecException if an error occurs */ @NotNull - public Thread doRunScript(@NotNull final Script<G, A, R> script, @NotNull final ConsoleInterface console) throws ScriptExecException { + public BshThread<G, A, R> doRunScript(@NotNull final Script<G, A, R> script, @NotNull final ConsoleInterface console) throws ScriptExecException { final Interpreter runner = new Interpreter(); runner.setConsole(console); try { @@ -187,7 +192,7 @@ } catch (final EvalError ex) { throw new ScriptExecException("evaluation error: " + ex.getMessage(), ex); } - final Thread scriptThread = new BshThread<G, A, R>(script.getName(), script, runner); + final BshThread<G, A, R> scriptThread = new BshThread<G, A, R>(script.getName(), script, runner); scriptThread.start(); return scriptThread; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-27 20:26:02
|
Revision: 8526 http://gridarta.svn.sourceforge.net/gridarta/?rev=8526&view=rev Author: akirschbaum Date: 2010-06-27 20:25:56 +0000 (Sun, 27 Jun 2010) Log Message: ----------- Add TODO comment. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/script/ScriptController.java Modified: trunk/src/app/net/sf/gridarta/gui/script/ScriptController.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/script/ScriptController.java 2010-06-27 20:17:34 UTC (rev 8525) +++ trunk/src/app/net/sf/gridarta/gui/script/ScriptController.java 2010-06-27 20:25:56 UTC (rev 8526) @@ -340,7 +340,7 @@ final ConsoleInterface console = view.createConsole(clonedScript.getName()); try { - scriptExecutor.doRunScript(clonedScript, console); + scriptExecutor.doRunScript(clonedScript, console); // XXX: drops Thread } catch (final ScriptExecException ex) { console.print(ex.getMessage()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-27 20:17:41
|
Revision: 8525 http://gridarta.svn.sourceforge.net/gridarta/?rev=8525&view=rev Author: akirschbaum Date: 2010-06-27 20:17:34 +0000 (Sun, 27 Jun 2010) Log Message: ----------- Improve --script command-line option to report some plugin script errors to the operating system. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/crossfire/ChangeLog trunk/daimonin/ChangeLog trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java Removed Paths: ------------- trunk/src/app/net/sf/gridarta/commands/ScriptCommand.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2010-06-27 20:03:32 UTC (rev 8524) +++ trunk/atrinik/ChangeLog 2010-06-27 20:17:34 UTC (rev 8525) @@ -1,5 +1,8 @@ 2010-06-27 Andreas Kirschbaum + * Improve --script command-line option to report some plugin + script errors to the operating system. + * Include details in error messages of "Tile path invalid" map validator. Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2010-06-27 20:03:32 UTC (rev 8524) +++ trunk/crossfire/ChangeLog 2010-06-27 20:17:34 UTC (rev 8525) @@ -1,5 +1,8 @@ 2010-06-27 Andreas Kirschbaum + * Improve --script command-line option to report some plugin + script errors to the operating system. + * Include details in error messages of "Tile path invalid" map validator. Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2010-06-27 20:03:32 UTC (rev 8524) +++ trunk/daimonin/ChangeLog 2010-06-27 20:17:34 UTC (rev 8525) @@ -1,5 +1,8 @@ 2010-06-27 Andreas Kirschbaum + * Improve --script command-line option to report some plugin + script errors to the operating system. + * Include details in error messages of "Tile path invalid" map validator. Deleted: trunk/src/app/net/sf/gridarta/commands/ScriptCommand.java =================================================================== --- trunk/src/app/net/sf/gridarta/commands/ScriptCommand.java 2010-06-27 20:03:32 UTC (rev 8524) +++ trunk/src/app/net/sf/gridarta/commands/ScriptCommand.java 2010-06-27 20:17:34 UTC (rev 8525) @@ -1,76 +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.commands; - -import net.sf.gridarta.script.ScriptExecException; -import net.sf.gridarta.script.ScriptExecutor; -import org.jetbrains.annotations.NotNull; - -/** - * Executes a plugin script. - * @author Andreas Kirschbaum - */ -public class ScriptCommand implements Command { - - /** - * The script to execute. - */ - @NotNull - private final String script; - - /** - * The script parameters. - */ - @NotNull - private final Iterable<String> params; - - /** - * The {@link ScriptExecutor} to execute. - */ - @NotNull - private final ScriptExecutor<?, ?, ?> scriptExecutor; - - /** - * Creates a new instance. - * @param script the script to execute - * @param params the script parameters - * @param scriptExecutor the script executor to use - */ - public ScriptCommand(@NotNull final String script, @NotNull final Iterable<String> params, @NotNull final ScriptExecutor<?, ?, ?> scriptExecutor) { - this.script = script; - this.params = params; - this.scriptExecutor = scriptExecutor; - } - - /** - * {@inheritDoc} - */ - @Override - public int execute() { - try { - scriptExecutor.executeScript(script, params); - } catch (final ScriptExecException ex) { - System.err.println(ex.getMessage()); - return 1; - } - return 0; - } - -} // class ScriptCommand Modified: trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java 2010-06-27 20:03:32 UTC (rev 8524) +++ trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java 2010-06-27 20:17:34 UTC (rev 8525) @@ -35,8 +35,6 @@ import net.sf.gridarta.MainControl; import net.sf.gridarta.commands.BatchPngCommand; import net.sf.gridarta.commands.CollectArchesCommand; -import net.sf.gridarta.commands.Command; -import net.sf.gridarta.commands.ScriptCommand; import net.sf.gridarta.commands.SinglePngCommand; import net.sf.gridarta.gui.errorview.ConsoleErrorView; import net.sf.gridarta.gui.errorview.DefaultErrorView; @@ -90,6 +88,7 @@ import net.sf.gridarta.model.spells.NumberSpell; import net.sf.gridarta.model.spells.Spells; import net.sf.gridarta.preferences.FilePreferencesFactory; +import net.sf.gridarta.script.ScriptExecException; import net.sf.gridarta.script.ScriptExecutor; import net.sf.gridarta.script.ScriptModel; import net.sf.gridarta.script.ScriptParameters; @@ -343,12 +342,18 @@ * @param scriptExecutor the script executor to use * @return return code suitable for passing to {@link System#exit(int)} */ - private int runScript(@NotNull final String script, final ErrorView errorView, final List<String> args, @NotNull final ScriptExecutor<G, A, R> scriptExecutor) { + private int runScript(@NotNull final String script, final ErrorView errorView, final Iterable<String> args, @NotNull final ScriptExecutor<G, A, R> scriptExecutor) { checkForErrors(errorView); waitDialog(errorView); - final Command command = new ScriptCommand(script, args, scriptExecutor); - return command.execute(); + try { + scriptExecutor.executeScript(script, args); + } catch (final ScriptExecException ex) { + System.err.println(ex.getMessage()); + return 1; + } + + return 0; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-27 20:03:38
|
Revision: 8524 http://gridarta.svn.sourceforge.net/gridarta/?rev=8524&view=rev Author: akirschbaum Date: 2010-06-27 20:03:32 +0000 (Sun, 27 Jun 2010) Log Message: ----------- Simplify code: EDT is not anymore needed when running plugin scripts. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java Modified: trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java 2010-06-27 20:00:15 UTC (rev 8523) +++ trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java 2010-06-27 20:03:32 UTC (rev 8524) @@ -347,28 +347,8 @@ checkForErrors(errorView); waitDialog(errorView); - final int[] tmp = { 1 }; - final Runnable runnable = new Runnable() { - - /** {@inheritDoc} */ - @Override - public void run() { - final Command command = new ScriptCommand(script, args, scriptExecutor); - tmp[0] = command.execute(); - } - - }; - try { - SwingUtilities.invokeAndWait(runnable); - } catch (final InterruptedException ex) { - log.fatal(ex.getMessage(), ex); - Thread.currentThread().interrupt(); - return 1; - } catch (final InvocationTargetException ex) { - log.fatal(ex.getMessage(), ex); - return 1; - } - return tmp[0]; + final Command command = new ScriptCommand(script, args, scriptExecutor); + return command.execute(); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-27 20:00:21
|
Revision: 8523 http://gridarta.svn.sourceforge.net/gridarta/?rev=8523&view=rev Author: akirschbaum Date: 2010-06-27 20:00:15 +0000 (Sun, 27 Jun 2010) Log Message: ----------- Rename variable names. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java Modified: trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java 2010-06-27 18:14:53 UTC (rev 8522) +++ trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java 2010-06-27 20:00:15 UTC (rev 8523) @@ -339,22 +339,21 @@ * Executes a plugin script. * @param script the name of the script to run * @param errorView the error view to add errors to - * @param args2 the arguments for the script + * @param args the arguments for the script * @param scriptExecutor the script executor to use * @return return code suitable for passing to {@link System#exit(int)} */ - private int runScript(@NotNull final String script, final ErrorView errorView, final List<String> args2, @NotNull final ScriptExecutor<G, A, R> scriptExecutor) { + private int runScript(@NotNull final String script, final ErrorView errorView, final List<String> args, @NotNull final ScriptExecutor<G, A, R> scriptExecutor) { checkForErrors(errorView); waitDialog(errorView); final int[] tmp = { 1 }; - final String script2 = script; final Runnable runnable = new Runnable() { /** {@inheritDoc} */ @Override public void run() { - final Command command = new ScriptCommand(script2, args2, scriptExecutor); + final Command command = new ScriptCommand(script, args, scriptExecutor); tmp[0] = command.execute(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-27 18:14:59
|
Revision: 8522 http://gridarta.svn.sourceforge.net/gridarta/?rev=8522&view=rev Author: akirschbaum Date: 2010-06-27 18:14:53 +0000 (Sun, 27 Jun 2010) Log Message: ----------- Include details in error messages of "Tile path invalid" map validator. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/crossfire/ChangeLog trunk/daimonin/ChangeLog trunk/model/src/app/net/sf/gridarta/model/map/validation/errors/TilePathsError.java trunk/src/app/net/sf/gridarta/messages.properties trunk/src/app/net/sf/gridarta/messages_de.properties trunk/src/app/net/sf/gridarta/validation/checks/TilePathsChecker.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2010-06-27 17:20:01 UTC (rev 8521) +++ trunk/atrinik/ChangeLog 2010-06-27 18:14:53 UTC (rev 8522) @@ -1,3 +1,8 @@ +2010-06-27 Andreas Kirschbaum + + * Include details in error messages of "Tile path invalid" map + validator. + 2010-06-25 Andreas Kirschbaum * Implement #3018432 (Display archetype titles): Include "title" Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2010-06-27 17:20:01 UTC (rev 8521) +++ trunk/crossfire/ChangeLog 2010-06-27 18:14:53 UTC (rev 8522) @@ -1,3 +1,8 @@ +2010-06-27 Andreas Kirschbaum + + * Include details in error messages of "Tile path invalid" map + validator. + 2010-06-25 Andreas Kirschbaum * Implement #3018414 (Improved archetype list). Now monster Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2010-06-27 17:20:01 UTC (rev 8521) +++ trunk/daimonin/ChangeLog 2010-06-27 18:14:53 UTC (rev 8522) @@ -1,3 +1,8 @@ +2010-06-27 Andreas Kirschbaum + + * Include details in error messages of "Tile path invalid" map + validator. + 2010-06-25 Andreas Kirschbaum * Implement #3018432 (Display archetype titles): Include "title" Modified: trunk/model/src/app/net/sf/gridarta/model/map/validation/errors/TilePathsError.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/map/validation/errors/TilePathsError.java 2010-06-27 17:20:01 UTC (rev 8521) +++ trunk/model/src/app/net/sf/gridarta/model/map/validation/errors/TilePathsError.java 2010-06-27 18:14:53 UTC (rev 8522) @@ -20,6 +20,7 @@ package net.sf.gridarta.model.map.validation.errors; 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.map.maparchobject.MapArchObject; import net.sf.gridarta.model.map.mapmodel.MapModel; @@ -37,6 +38,12 @@ private static final long serialVersionUID = 1L; /** + * The direction on which the error occurred. + */ + @NotNull + private final Direction direction; + + /** * The tile path that was wrong. */ @NotNull @@ -45,20 +52,30 @@ /** * Create a MapValidationError. * @param mapModel the map on which the error occurred + * @param direction the direction on which the error occurred * @param tilePath tile path which was wrong */ - public TilePathsError(@NotNull final MapModel<G, A, R> mapModel, @NotNull final String tilePath) { + public TilePathsError(@NotNull final MapModel<G, A, R> mapModel, @NotNull final Direction direction, @NotNull final String tilePath) { super(mapModel); + this.direction = direction; this.tilePath = tilePath; } /** - * Returns the tile path that was wrong. - * @return the tile path that was wrong. + * {@inheritDoc} */ - @NotNull - public String getTilePath() { - return tilePath; + @Override + public String getParameter(final int id) { + switch (id) { + case 0: + return direction.toString(); + + case 1: + return tilePath; + + default: + return super.getParameter(id); + } } } // class TilePathsError Modified: trunk/src/app/net/sf/gridarta/messages.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages.properties 2010-06-27 17:20:01 UTC (rev 8521) +++ trunk/src/app/net/sf/gridarta/messages.properties 2010-06-27 18:14:53 UTC (rev 8522) @@ -1369,7 +1369,7 @@ Validator.TilePaths.default=true Validator.TilePaths.title=Tile path invalid -Validator.TilePaths.msg=<html><h3>{0}</h3><p>This map has invalid tile paths.<br>Go to the map properties dialog and change the map tile paths. +Validator.TilePaths.msg=<html><h3>{0}</h3><p>The tile path ''{5}'' in direction ''{4}'' is invalid.<br>Go to the map properties dialog and change the map tile paths. Validator.UndefinedAnim.title=Undefined animation Validator.UndefinedAnim.msg=<html><h3>{0}</h3><p>The animation "{4}" does not exist.</p><p>Sie could:</p><ul><li>Change the animation attribute</li></ul> Modified: trunk/src/app/net/sf/gridarta/messages_de.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages_de.properties 2010-06-27 17:20:01 UTC (rev 8521) +++ trunk/src/app/net/sf/gridarta/messages_de.properties 2010-06-27 18:14:53 UTC (rev 8522) @@ -1166,7 +1166,7 @@ Validator.SysObjectNotOnLayerZero.msg=<html><h3>{0}</h3><p>Dieses Objekt ist ein System-Objekt.<br>System-Objekte sollten immer in Ebene Null liegen,<br>aber dieses Objekt ist in einer anderen Ebene.</p><p>Sie k\xF6nnen:</p><ul><li>Dieses Problem ignorieren</li><li>Die Ebene des System-Objekt auf Null setzen</li></ul> Validator.TilePaths.title=\xDCng\xFCltiger Kartenverbindungspfad -Validator.TilePaths.msg=<html><h3>{0}</h3><p>Diese Karte besitzt einen ung\xFCltigen Kartenverbindungspfad.<br>\xC4ndern Sie den Kartenverbindungspfad in den Karteneigenschaften. +Validator.TilePaths.msg=<html><h3>{0}</h3><p>Diese Karte besitzt einen ung\xFCltigen Kartenverbindungspfad ''{5}'' in Richtung ''{4}''.<br>\xC4ndern Sie den Kartenverbindungspfad in den Karteneigenschaften. Validator.UndefinedAnim.title=Ung\xFCltige Animation Validator.UndefinedAnim.msg=<html><h3>{0}</h3><p>Die Animation "{4}" existiert nicht.</p><p>Sie k\xF6nnen:</p><ul><li>Das Attribut "animation" \xE4ndern</li></ul> Modified: trunk/src/app/net/sf/gridarta/validation/checks/TilePathsChecker.java =================================================================== --- trunk/src/app/net/sf/gridarta/validation/checks/TilePathsChecker.java 2010-06-27 17:20:01 UTC (rev 8521) +++ trunk/src/app/net/sf/gridarta/validation/checks/TilePathsChecker.java 2010-06-27 18:14:53 UTC (rev 8522) @@ -84,7 +84,7 @@ newFile = mapDir == null ? null : new File(mapDir, path); } if (newFile != null && (!newFile.exists() || newFile.isDirectory())) { - errorCollector.collect(new TilePathsError<G, A, R>(mapModel, path)); + errorCollector.collect(new TilePathsError<G, A, R>(mapModel, directions[direction], path)); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-27 17:20:07
|
Revision: 8521 http://gridarta.svn.sourceforge.net/gridarta/?rev=8521&view=rev Author: akirschbaum Date: 2010-06-27 17:20:01 +0000 (Sun, 27 Jun 2010) Log Message: ----------- Merge redundant function calls. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/validation/checks/TilePathsChecker.java Modified: trunk/src/app/net/sf/gridarta/validation/checks/TilePathsChecker.java =================================================================== --- trunk/src/app/net/sf/gridarta/validation/checks/TilePathsChecker.java 2010-06-27 15:54:48 UTC (rev 8520) +++ trunk/src/app/net/sf/gridarta/validation/checks/TilePathsChecker.java 2010-06-27 17:20:01 UTC (rev 8521) @@ -70,8 +70,10 @@ public void validateMap(@NotNull final MapModel<G, A, R> mapModel, @NotNull final ErrorCollector<G, A, R> errorCollector) { final File mapFile = mapModel.getMapFile(); final String mapDir = mapFile == null ? null : mapFile.getParent(); + final MapArchObject<A> mapArchObject = mapModel.getMapArchObject(); + final Direction[] directions = Direction.values(); for (int direction = 0; direction < tilePaths; direction++) { - final String path = mapModel.getMapArchObject().getTilePath(Direction.values()[direction]); + final String path = mapArchObject.getTilePath(directions[direction]); if (path.length() > 0) { @Nullable final File newFile; if (path.startsWith(File.pathSeparator) || path.startsWith("/")) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-27 15:54:55
|
Revision: 8520 http://gridarta.svn.sourceforge.net/gridarta/?rev=8520&view=rev Author: akirschbaum Date: 2010-06-27 15:54:48 +0000 (Sun, 27 Jun 2010) Log Message: ----------- Add assert statement. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/validation/checks/ExitChecker.java Modified: trunk/src/app/net/sf/gridarta/validation/checks/ExitChecker.java =================================================================== --- trunk/src/app/net/sf/gridarta/validation/checks/ExitChecker.java 2010-06-27 12:49:16 UTC (rev 8519) +++ trunk/src/app/net/sf/gridarta/validation/checks/ExitChecker.java 2010-06-27 15:54:48 UTC (rev 8520) @@ -23,6 +23,7 @@ import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.map.maparchobject.MapArchObject; +import net.sf.gridarta.model.map.mapmodel.MapSquare; import net.sf.gridarta.model.map.validation.ErrorCollector; import net.sf.gridarta.model.map.validation.errors.ExitError; import net.sf.gridarta.model.settings.GlobalSettings; @@ -80,7 +81,9 @@ newFile = new File(globalSettings.getMapsDirectory().getAbsolutePath(), path.substring(1)); } else { // we have a relative path: - final File mapFile = gameObject.getMapSquare().getMapModel().getMapFile(); + final MapSquare<G,A,R> mapSquare = gameObject.getMapSquare(); + assert mapSquare != null; + final File mapFile = mapSquare.getMapModel().getMapFile(); if (mapFile == null) { // unsaved map => do not check return; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-27 12:49:26
|
Revision: 8519 http://gridarta.svn.sourceforge.net/gridarta/?rev=8519&view=rev Author: akirschbaum Date: 2010-06-27 12:49:16 +0000 (Sun, 27 Jun 2010) Log Message: ----------- Clean up new map/pickmap/pickmap folder dialogs. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/newmap/AbstractMapsizeNewMapDialog.java trunk/src/app/net/sf/gridarta/gui/newmap/AbstractNewMapDialog.java trunk/src/app/net/sf/gridarta/gui/newmap/NewMapDialog.java trunk/src/app/net/sf/gridarta/gui/newmap/NewPickmapDialog.java trunk/src/app/net/sf/gridarta/gui/newmap/NewPickmapFolderDialog.java Modified: trunk/src/app/net/sf/gridarta/gui/newmap/AbstractMapsizeNewMapDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/newmap/AbstractMapsizeNewMapDialog.java 2010-06-27 12:12:07 UTC (rev 8518) +++ trunk/src/app/net/sf/gridarta/gui/newmap/AbstractMapsizeNewMapDialog.java 2010-06-27 12:49:16 UTC (rev 8519) @@ -20,8 +20,6 @@ package net.sf.gridarta.gui.newmap; import java.awt.GridBagConstraints; -import javax.swing.AbstractButton; -import javax.swing.JCheckBox; import javax.swing.JPanel; import javax.swing.JTextField; import net.sf.gridarta.model.archetype.Archetype; @@ -54,11 +52,6 @@ private static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta"); /** - * Whether to show the "mapSizeDefault" checkbox. - */ - private final boolean showMapSizeDefault; - - /** * The preference key for storing the map width; may be <code>null</code>. */ @Nullable @@ -71,14 +64,6 @@ private final String heightKey; /** - * Whether to use the default map size. - * @val true override default map size - * @val false use default map size - * @default true - */ - private boolean mapSizeDefault; - - /** * The default width for new maps. */ private final int defaultWidth; @@ -89,12 +74,6 @@ private final int defaultHeight; /** - * Checkbox to set whether the default width / height should be overridden. - */ - @NotNull - private final AbstractButton mapSizeDefaultCheckbox = new JCheckBox(ACTION_BUILDER.createToggle(false, "mapSizeDefault", this)); - - /** * Textfield for the width of the new map. */ @NotNull @@ -108,7 +87,6 @@ /** * Creates a new instance. - * @param showMapSizeDefault Whether to show the "mapSizeDefault" checkbox. * @param widthKey the preference key for storing the map width; may be * <code>null</code> * @param heightKey the preference key for storing the map height; may be @@ -116,54 +94,26 @@ * @param defaultWidth The default width for new maps. * @param defaultHeight The default height for new maps. */ - protected AbstractMapsizeNewMapDialog(final boolean showMapSizeDefault, @Nullable final String widthKey, @Nullable final String heightKey, final int defaultWidth, final int defaultHeight) { - this.showMapSizeDefault = showMapSizeDefault; + protected AbstractMapsizeNewMapDialog(@Nullable final String widthKey, @Nullable final String heightKey, final int defaultWidth, final int defaultHeight) { this.widthKey = widthKey; this.heightKey = heightKey; this.defaultWidth = defaultWidth; this.defaultHeight = defaultHeight; - mapSizeDefault = showMapSizeDefault; addDocumentListener(mapWidthField); addDocumentListener(mapHeightField); } - @Override - protected void init2() { - if (showMapSizeDefault) { - setMapSizeDefault(true); - } - super.init2(); - } - /** * {@inheritDoc} */ @Override - protected void addMapSizeDefaultCheckbox(@NotNull final JPanel panel, @NotNull final GridBagConstraints gbcLabel) { - if (!showMapSizeDefault) { - return; - } - - panel.add(mapSizeDefaultCheckbox, gbcLabel); - } - - /** - * {@inheritDoc} - */ - @Override - protected void addMapWidthField(@NotNull final JPanel panel, @NotNull final GridBagConstraints gbcLabel, @NotNull final GridBagConstraints gbcField) { + protected void addFields(@NotNull final JPanel panel, @NotNull final GridBagConstraints gbcLabel, @NotNull final GridBagConstraints gbcField) { mapWidthField.setText(Integer.toString(widthKey == null ? defaultWidth : preferences.getInt(widthKey, defaultWidth))); mapWidthField.setColumns(3); panel.add(ActionBuilderUtils.newLabel(ACTION_BUILDER, "mapWidth"), gbcLabel); panel.add(mapWidthField, gbcField); mapWidthField.selectAll(); - } - /** - * {@inheritDoc} - */ - @Override - protected void addMapHeightField(@NotNull final JPanel panel, @NotNull final GridBagConstraints gbcLabel, @NotNull final GridBagConstraints gbcField) { mapHeightField.setText(Integer.toString(heightKey == null ? defaultHeight : preferences.getInt(heightKey, defaultHeight))); mapHeightField.setColumns(3); panel.add(ActionBuilderUtils.newLabel(ACTION_BUILDER, "mapHeight"), gbcLabel); @@ -178,68 +128,31 @@ */ @Nullable protected Size2D getMapSize() { - final int width; - final int height; - if (mapSizeDefault) { - width = defaultWidth; - height = defaultHeight; - } else { - width = getMapWidth(); - if (width < 0) { - return null; - } + final int width = getMapWidth(); + if (width < 0) { + return null; + } - height = getMapHeight(); - if (height < 0) { - return null; - } + final int height = getMapHeight(); + if (height < 0) { + return null; + } - if (widthKey != null) { - preferences.putInt(widthKey, width); - } - if (heightKey != null) { - preferences.putInt(heightKey, height); - } + if (widthKey != null) { + preferences.putInt(widthKey, width); } + if (heightKey != null) { + preferences.putInt(heightKey, height); + } return new Size2D(width, height); } /** - * Set whether to override the default map size. - * @return mapSizeDefault <code>true</code> if the user wants to specify her - * own map size, otherwise <code>false</code> - */ - public boolean isMapSizeDefault() { - return mapSizeDefault; - } - - /** - * Set whether to override the default map size. - * @param mapSizeDefault <code>true</code> if the user wants to specify her - * own map size, otherwise <code>false</code> - */ - public void setMapSizeDefault(final boolean mapSizeDefault) { - mapSizeDefaultCheckbox.setSelected(mapSizeDefault); - this.mapSizeDefault = mapSizeDefault; - mapWidthField.setEnabled(!mapSizeDefault); - mapHeightField.setEnabled(!mapSizeDefault); - updateOkButton(); - } - - /** - * {@inheritDoc} - */ - @Override - protected boolean isOkButtonEnabled() { - return super.isOkButtonEnabled() && (mapSizeDefault || (getMapWidth() >= 0 && getMapHeight() >= 0)); - } - - /** * Returns the current map width value. * @return the map width or <code>-1</code> if unset or invalid */ - private int getMapWidth() { + protected int getMapWidth() { final String text = mapWidthField.getText(); final int width = NumberUtils.parseInt(text); return width < 1 ? -1 : width; @@ -250,11 +163,20 @@ * Returns the current map height value. * @return the map height or <code>-1</code> if unset or invalid */ - private int getMapHeight() { + protected int getMapHeight() { final String text = mapHeightField.getText(); final int height = NumberUtils.parseInt(text); return height < 1 ? -1 : height; } + /** + * Enables or disables the map size input fields. + * @param enabled whether to enable the fields + */ + protected void setMapSizeEnabled(final boolean enabled) { + mapWidthField.setEnabled(enabled); + mapHeightField.setEnabled(enabled); + } + } // class AbstractMapsizeNewMapDialog Modified: trunk/src/app/net/sf/gridarta/gui/newmap/AbstractNewMapDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/newmap/AbstractNewMapDialog.java 2010-06-27 12:12:07 UTC (rev 8518) +++ trunk/src/app/net/sf/gridarta/gui/newmap/AbstractNewMapDialog.java 2010-06-27 12:49:16 UTC (rev 8519) @@ -182,21 +182,19 @@ gbcField.gridwidth = GridBagConstraints.REMAINDER; panel.setBorder(new CompoundBorder(new TitledBorder(new EtchedBorder(), ActionBuilderUtils.getString(ACTION_BUILDER, "newMapParameters")), GUIConstants.DIALOG_BORDER)); - addMapSizeDefaultCheckbox(panel, gbcField); - addMapWidthField(panel, gbcLabel, gbcField); - addMapHeightField(panel, gbcLabel, gbcField); - addDifficultyField(panel, gbcLabel, gbcField); + addFields(panel, gbcLabel, gbcField); return panel; } - protected abstract void addMapSizeDefaultCheckbox(@NotNull final JPanel panel, @NotNull final GridBagConstraints gbcLabel); + /** + * Adds additional fields to the dialog. Will be called once when the + * dialog is created. + * @param panel the panel to add the fields to + * @param gbcLabel the grid bag constraints for the label part + * @param gbcField the grid bag constraints for the input field + */ + protected abstract void addFields(@NotNull final JPanel panel, @NotNull final GridBagConstraints gbcLabel, @NotNull final GridBagConstraints gbcField); - protected abstract void addMapWidthField(@NotNull final JPanel panel, @NotNull final GridBagConstraints gbcLabel, @NotNull final GridBagConstraints gbcField); - - protected abstract void addMapHeightField(@NotNull final JPanel panel, @NotNull final GridBagConstraints gbcLabel, @NotNull final GridBagConstraints gbcField); - - protected abstract void addDifficultyField(@NotNull final JPanel panel, @NotNull final GridBagConstraints gbcLabel, @NotNull final GridBagConstraints gbcField); - /** * Action method for okay. */ Modified: trunk/src/app/net/sf/gridarta/gui/newmap/NewMapDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/newmap/NewMapDialog.java 2010-06-27 12:12:07 UTC (rev 8518) +++ trunk/src/app/net/sf/gridarta/gui/newmap/NewMapDialog.java 2010-06-27 12:49:16 UTC (rev 8519) @@ -22,6 +22,8 @@ import java.awt.Component; import java.awt.FlowLayout; import java.awt.GridBagConstraints; +import javax.swing.AbstractButton; +import javax.swing.JCheckBox; import javax.swing.JPanel; import javax.swing.JTextField; import javax.swing.text.JTextComponent; @@ -86,13 +88,36 @@ private final MapArchObjectFactory<A> mapArchObjectFactory; /** + * Whether to show the "mapSizeDefault" checkbox. + */ + private final boolean showMapSizeDefault; + + /** + * Whether to use the default map size. + * @val true override default map size + * @val false use default map size + * @default true + */ + private boolean mapSizeDefault; + + /** * Whether to show the "mapDifficulty" field. */ private final boolean showMapDifficulty; /** + * The default width for new maps. + */ + private final int defaultWidth; + + /** * The default height for new maps. */ + private final int defaultHeight; + + /** + * The default height for new maps. + */ private final int defaultDifficulty; /** @@ -103,6 +128,12 @@ private final JTextComponent mapNameField = new JTextField(16); /** + * Checkbox to set whether the default width / height should be overridden. + */ + @NotNull + private final AbstractButton mapSizeDefaultCheckbox = new JCheckBox(ACTION_BUILDER.createToggle(false, "mapSizeDefault", this)); + + /** * Textfield for the difficulty of the new map. */ @NotNull @@ -120,11 +151,15 @@ * @param defaultDifficulty The default difficulty for new maps. */ public NewMapDialog(@NotNull final MapViewsManager<G, A, R> mapViewsManager, @NotNull final MapArchObjectFactory<A> mapArchObjectFactory, @NotNull final Component parentComponent, final boolean showMapSizeDefault, final boolean showMapDifficulty, final int defaultWidth, final int defaultHeight, final int defaultDifficulty) { - super(showMapSizeDefault, DEFAULT_LEVEL_WIDTH_KEY, DEFAULT_LEVEL_HEIGHT_KEY, defaultWidth, defaultHeight); + super(DEFAULT_LEVEL_WIDTH_KEY, DEFAULT_LEVEL_HEIGHT_KEY, defaultWidth, defaultHeight); this.mapViewsManager = mapViewsManager; this.mapArchObjectFactory = mapArchObjectFactory; + this.showMapSizeDefault = showMapSizeDefault; this.showMapDifficulty = showMapDifficulty; + this.defaultWidth = defaultWidth; + this.defaultHeight = defaultHeight; this.defaultDifficulty = defaultDifficulty; + mapSizeDefault = showMapSizeDefault; init1(parentComponent, ActionBuilderUtils.getString(ACTION_BUILDER, "newMap.title")); init2(); @@ -135,6 +170,14 @@ updateOkButton(); } + @Override + protected void init2() { + if (showMapSizeDefault) { + setMapSizeDefault(true); + } + super.init2(); + } + /** * {@inheritDoc} */ @@ -151,15 +194,17 @@ * {@inheritDoc} */ @Override - protected void addDifficultyField(@NotNull final JPanel panel, @NotNull final GridBagConstraints gbcLabel, @NotNull final GridBagConstraints gbcField) { - if (!showMapDifficulty) { - return; + protected void addFields(@NotNull final JPanel panel, @NotNull final GridBagConstraints gbcLabel, @NotNull final GridBagConstraints gbcField) { + if (showMapSizeDefault) { + panel.add(mapSizeDefaultCheckbox, gbcField); } - - mapDifficultyField.setText(Integer.toString(preferences.getInt(DEFAULT_DIFFICULTY_KEY, defaultDifficulty))); - panel.add(ActionBuilderUtils.newLabel(ACTION_BUILDER, "mapDifficulty"), gbcLabel); - mapDifficultyField.setColumns(3); - panel.add(mapDifficultyField, gbcField); + super.addFields(panel, gbcLabel, gbcField); + if (showMapDifficulty) { + mapDifficultyField.setText(Integer.toString(preferences.getInt(DEFAULT_DIFFICULTY_KEY, defaultDifficulty))); + panel.add(ActionBuilderUtils.newLabel(ACTION_BUILDER, "mapDifficulty"), gbcLabel); + mapDifficultyField.setColumns(3); + panel.add(mapDifficultyField, gbcField); + } } /** @@ -198,7 +243,7 @@ */ @Override protected boolean isOkButtonEnabled() { - return super.isOkButtonEnabled() && getMapName() != null && (!showMapDifficulty || getDifficulty() >= 0); + return super.isOkButtonEnabled() &&(mapSizeDefault || (getMapWidth() >= 0 && getMapHeight() >= 0)) && getMapName() != null && (!showMapDifficulty || getDifficulty() >= 0); } /** @@ -221,4 +266,36 @@ return difficulty >= 1 ? difficulty : -1; } + /** + * Set whether to override the default map size. + * @return mapSizeDefault <code>true</code> if the user wants to specify her + * own map size, otherwise <code>false</code> + */ + public boolean isMapSizeDefault() { + return mapSizeDefault; + } + + /** + * Set whether to override the default map size. + * @param mapSizeDefault <code>true</code> if the user wants to specify her + * own map size, otherwise <code>false</code> + */ + public void setMapSizeDefault(final boolean mapSizeDefault) { + mapSizeDefaultCheckbox.setSelected(mapSizeDefault); + this.mapSizeDefault = mapSizeDefault; + setMapSizeEnabled(!mapSizeDefault); + updateOkButton(); + } + + /** + * Validate the map size fields and return the result. + * @return whether the map size if the fields are valid or else + * <code>null</code> + */ + @Nullable + @Override + protected Size2D getMapSize() { + return mapSizeDefault ? new Size2D(defaultWidth, defaultHeight) : super.getMapSize(); + } + } // class NewMapDialog Modified: trunk/src/app/net/sf/gridarta/gui/newmap/NewPickmapDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/newmap/NewPickmapDialog.java 2010-06-27 12:12:07 UTC (rev 8518) +++ trunk/src/app/net/sf/gridarta/gui/newmap/NewPickmapDialog.java 2010-06-27 12:49:16 UTC (rev 8519) @@ -21,7 +21,6 @@ import java.awt.Component; import java.awt.FlowLayout; -import java.awt.GridBagConstraints; import java.io.IOException; import javax.swing.JPanel; import javax.swing.JTextField; @@ -84,7 +83,7 @@ * @param pickmapChooserControl the pickmap chooser control */ public NewPickmapDialog(@NotNull final ObjectChooser<G, A, R> objectChooser, @NotNull final Component parentComponent, final int defaultWidth, final int defaultHeight, @NotNull final PickmapChooserControl<G, A, R> pickmapChooserControl) { - super(false, null, null, defaultWidth, defaultHeight); + super(null, null, defaultWidth, defaultHeight); this.objectChooser = objectChooser; this.pickmapChooserControl = pickmapChooserControl; init1(parentComponent, ActionBuilderUtils.getString(ACTION_BUILDER, "newPickmap.title")); @@ -109,20 +108,6 @@ * {@inheritDoc} */ @Override - protected void addMapSizeDefaultCheckbox(@NotNull final JPanel panel, @NotNull final GridBagConstraints gbcLabel) { - } - - /** - * {@inheritDoc} - */ - @Override - protected void addDifficultyField(@NotNull final JPanel panel, @NotNull final GridBagConstraints gbcLabel, @NotNull final GridBagConstraints gbcField) { - } - - /** - * {@inheritDoc} - */ - @Override protected boolean createNew() { final Size2D mapSize = getMapSize(); if (mapSize == null) { @@ -154,7 +139,7 @@ */ @Override protected boolean isOkButtonEnabled() { - return super.isOkButtonEnabled() && getPickmapName() != null; + return super.isOkButtonEnabled() && getMapWidth() >= 0 && getMapHeight() >= 0 && getPickmapName() != null; } /** Modified: trunk/src/app/net/sf/gridarta/gui/newmap/NewPickmapFolderDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/newmap/NewPickmapFolderDialog.java 2010-06-27 12:12:07 UTC (rev 8518) +++ trunk/src/app/net/sf/gridarta/gui/newmap/NewPickmapFolderDialog.java 2010-06-27 12:49:16 UTC (rev 8519) @@ -121,38 +121,15 @@ * {@inheritDoc} */ @Override - protected void addMapSizeDefaultCheckbox(@NotNull final JPanel panel, @NotNull final GridBagConstraints gbcLabel) { + protected void addFields(@NotNull final JPanel panel, @NotNull final GridBagConstraints gbcLabel, @NotNull final GridBagConstraints gbcField) { throw new AssertionError(); - } - /** - * {@inheritDoc} - */ - @Override - protected void addMapWidthField(@NotNull final JPanel panel, @NotNull final GridBagConstraints gbcLabel, @NotNull final GridBagConstraints gbcField) { - throw new AssertionError(); } /** * {@inheritDoc} */ @Override - protected void addMapHeightField(@NotNull final JPanel panel, @NotNull final GridBagConstraints gbcLabel, @NotNull final GridBagConstraints gbcField) { - throw new AssertionError(); - } - - /** - * {@inheritDoc} - */ - @Override - protected void addDifficultyField(@NotNull final JPanel panel, @NotNull final GridBagConstraints gbcLabel, @NotNull final GridBagConstraints gbcField) { - throw new AssertionError(); - } - - /** - * {@inheritDoc} - */ - @Override protected boolean createNew() { final String folderName = getFolderName(); if (folderName == null) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-27 12:16:17
|
Revision: 8518 http://gridarta.svn.sourceforge.net/gridarta/?rev=8518&view=rev Author: akirschbaum Date: 2010-06-27 12:12:07 +0000 (Sun, 27 Jun 2010) Log Message: ----------- Remove stray comment. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/newmap/NewMapDialog.java Modified: trunk/src/app/net/sf/gridarta/gui/newmap/NewMapDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/newmap/NewMapDialog.java 2010-06-27 12:10:58 UTC (rev 8517) +++ trunk/src/app/net/sf/gridarta/gui/newmap/NewMapDialog.java 2010-06-27 12:12:07 UTC (rev 8518) @@ -167,7 +167,6 @@ */ @Override protected boolean createNew() { - // Create a new map from scratch final A mapArchObject = mapArchObjectFactory.newMapArchObject(true); final Size2D mapSize = getMapSize(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-27 12:11:05
|
Revision: 8517 http://gridarta.svn.sourceforge.net/gridarta/?rev=8517&view=rev Author: akirschbaum Date: 2010-06-27 12:10:58 +0000 (Sun, 27 Jun 2010) Log Message: ----------- Fix @NotNull violation. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/newmap/NewMapDialogFactory.java Modified: trunk/src/app/net/sf/gridarta/gui/newmap/NewMapDialogFactory.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/newmap/NewMapDialogFactory.java 2010-06-27 09:21:15 UTC (rev 8516) +++ trunk/src/app/net/sf/gridarta/gui/newmap/NewMapDialogFactory.java 2010-06-27 12:10:58 UTC (rev 8517) @@ -90,7 +90,7 @@ * The pickmap chooser control. */ @NotNull - private PickmapChooserControl<G, A, R> pickmapChooserControl = null; + private PickmapChooserControl<G, A, R> pickmapChooserControl; /** * The object chooser instance. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-27 09:21:22
|
Revision: 8516 http://gridarta.svn.sourceforge.net/gridarta/?rev=8516&view=rev Author: akirschbaum Date: 2010-06-27 09:21:15 +0000 (Sun, 27 Jun 2010) Log Message: ----------- Fix return type. Modified Paths: -------------- trunk/model/src/app/net/sf/gridarta/model/exitconnector/ExitMatcher.java Modified: trunk/model/src/app/net/sf/gridarta/model/exitconnector/ExitMatcher.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/exitconnector/ExitMatcher.java 2010-06-27 09:18:41 UTC (rev 8515) +++ trunk/model/src/app/net/sf/gridarta/model/exitconnector/ExitMatcher.java 2010-06-27 09:21:15 UTC (rev 8516) @@ -21,7 +21,6 @@ import java.awt.Point; 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.map.maparchobject.MapArchObject; import net.sf.gridarta.model.map.mapmodel.MapModel; @@ -98,12 +97,12 @@ * found */ @Nullable - public BaseObject<G, A, R, ?> getExit(@NotNull final MapModel<G, A, R> mapModel, @Nullable final Point point) { + public G getExit(@NotNull final MapModel<G, A, R> mapModel, @Nullable final Point point) { if (point == null || !mapModel.getMapArchObject().isPointValid(point)) { return null; } for (final GameObject<G, A, R> part : mapModel.getMapSquare(point)) { - final GameObject<G, A, R> head = part.getHead(); + final G head = part.getHead(); if (isExit(head)) { return head; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-27 09:18:48
|
Revision: 8515 http://gridarta.svn.sourceforge.net/gridarta/?rev=8515&view=rev Author: akirschbaum Date: 2010-06-27 09:18:41 +0000 (Sun, 27 Jun 2010) Log Message: ----------- Merge duplicated code. Modified Paths: -------------- trunk/model/src/app/net/sf/gridarta/model/exitconnector/ExitMatcher.java Modified: trunk/model/src/app/net/sf/gridarta/model/exitconnector/ExitMatcher.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/exitconnector/ExitMatcher.java 2010-06-27 08:10:06 UTC (rev 8514) +++ trunk/model/src/app/net/sf/gridarta/model/exitconnector/ExitMatcher.java 2010-06-27 09:18:41 UTC (rev 8515) @@ -64,7 +64,7 @@ } for (final GameObject<G, A, R> part : mapModel.getMapSquare(point)) { final G head = part.getHead(); - if (exitMatcher.isMatching(head) && head.hasAttribute("slaying")) { + if (isValidExit(head)) { return head; } } @@ -84,7 +84,7 @@ return null; } final GameObject<G, A, R> head = exit.getHead(); - if (!exitMatcher.isMatching(head) || !head.hasAttribute("slaying")) { + if (!isValidExit(head)) { return null; } return head; @@ -104,7 +104,7 @@ } for (final GameObject<G, A, R> part : mapModel.getMapSquare(point)) { final GameObject<G, A, R> head = part.getHead(); - if (exitMatcher.isMatching(head)) { + if (isExit(head)) { return head; } } @@ -123,10 +123,28 @@ return null; } final G head = exit.getHead(); - if (!exitMatcher.isMatching(head)) { + if (!isExit(head)) { return null; } return head; } + /** + * Returns whether a {@link GameObject} is a valid exit. + * @param gameObject the exit game object + * @return whether the game object has "slaying" set + */ + private boolean isValidExit(@NotNull final GameObject<G, A, R> gameObject) { + return isExit(gameObject) && gameObject.hasAttribute("slaying"); + } + + /** + * Returns whether a {@link GameObject} is a valid exit. + * @param gameObject the exit game object + * @return whether the game object has "slaying" set + */ + private boolean isExit(@NotNull final GameObject<G, A, R> gameObject) { + return exitMatcher.isMatching(gameObject); + } + } // class ExitMatcher This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-27 08:10:12
|
Revision: 8514 http://gridarta.svn.sourceforge.net/gridarta/?rev=8514&view=rev Author: akirschbaum Date: 2010-06-27 08:10:06 +0000 (Sun, 27 Jun 2010) Log Message: ----------- Add missing libraries to project file. Modified Paths: -------------- trunk/gridarta.iml Modified: trunk/gridarta.iml =================================================================== --- trunk/gridarta.iml 2010-06-26 14:42:02 UTC (rev 8513) +++ trunk/gridarta.iml 2010-06-27 08:10:06 UTC (rev 8514) @@ -150,6 +150,24 @@ </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!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-extlib-0.1.0.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> </component> </module> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-26 14:42:08
|
Revision: 8513 http://gridarta.svn.sourceforge.net/gridarta/?rev=8513&view=rev Author: akirschbaum Date: 2010-06-26 14:42:02 +0000 (Sat, 26 Jun 2010) Log Message: ----------- Remove PluginParameter.clonePluginParameter(). Modified Paths: -------------- trunk/src/app/net/sf/gridarta/script/Script.java trunk/src/app/net/sf/gridarta/script/parameter/AbstractPluginParameter.java trunk/src/app/net/sf/gridarta/script/parameter/PluginParameter.java Modified: trunk/src/app/net/sf/gridarta/script/Script.java =================================================================== --- trunk/src/app/net/sf/gridarta/script/Script.java 2010-06-26 14:41:36 UTC (rev 8512) +++ trunk/src/app/net/sf/gridarta/script/Script.java 2010-06-26 14:42:02 UTC (rev 8513) @@ -37,6 +37,7 @@ import net.sf.gridarta.script.parameter.StringParameter; import org.apache.log4j.Category; import org.apache.log4j.Logger; +import org.jdom.Element; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -255,7 +256,14 @@ model.script = script; model.modified = modified; for (final PluginParameter<G, A, R> param : parameters) { - model.addParameter(param.clonePluginParameter(pluginParameterFactory)); + final Element paramXml = param.toXML(); + final PluginParameter<G, A, R> clonedParam; + try { + clonedParam = pluginParameterFactory.createParameter(paramXml); + } catch (final NoSuchParameterException ex) { + throw new AssertionError(ex); + } + model.addParameter(clonedParam); } return model; } Modified: trunk/src/app/net/sf/gridarta/script/parameter/AbstractPluginParameter.java =================================================================== --- trunk/src/app/net/sf/gridarta/script/parameter/AbstractPluginParameter.java 2010-06-26 14:41:36 UTC (rev 8512) +++ trunk/src/app/net/sf/gridarta/script/parameter/AbstractPluginParameter.java 2010-06-26 14:42:02 UTC (rev 8513) @@ -140,15 +140,6 @@ } } - @NotNull - public PluginParameter<G, A, R> clonePluginParameter(@NotNull final PluginParameterFactory<G, A, R> pluginParameterFactory) { - try { - return pluginParameterFactory.createParameter(toXML()); - } catch (final NoSuchParameterException ex) { - throw new AssertionError(ex); - } - } - public abstract void visit(@NotNull final PluginParameterVisitor<G, A, R> visitor); } // class PluginParameter Modified: trunk/src/app/net/sf/gridarta/script/parameter/PluginParameter.java =================================================================== --- trunk/src/app/net/sf/gridarta/script/parameter/PluginParameter.java 2010-06-26 14:41:36 UTC (rev 8512) +++ trunk/src/app/net/sf/gridarta/script/parameter/PluginParameter.java 2010-06-26 14:42:02 UTC (rev 8513) @@ -66,9 +66,6 @@ void removeChangeListener(@NotNull ChangeListener listener); - @NotNull - PluginParameter<G, A, R> clonePluginParameter(@NotNull PluginParameterFactory<G, A, R> pluginParameterFactory); - void visit(@NotNull PluginParameterVisitor<G, A, R> visitor); } // class PluginParameter This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-26 14:41:42
|
Revision: 8512 http://gridarta.svn.sourceforge.net/gridarta/?rev=8512&view=rev Author: akirschbaum Date: 2010-06-26 14:41:36 +0000 (Sat, 26 Jun 2010) Log Message: ----------- Fix incorrect @Nullabl annotation. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/script/parameter/PluginParameterFactory.java Modified: trunk/src/app/net/sf/gridarta/script/parameter/PluginParameterFactory.java =================================================================== --- trunk/src/app/net/sf/gridarta/script/parameter/PluginParameterFactory.java 2010-06-26 14:31:40 UTC (rev 8511) +++ trunk/src/app/net/sf/gridarta/script/parameter/PluginParameterFactory.java 2010-06-26 14:41:36 UTC (rev 8512) @@ -27,7 +27,6 @@ import net.sf.gridarta.model.map.maparchobject.MapArchObject; import org.jdom.Element; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; /** * Factory for Plugin Parameters. @@ -50,7 +49,7 @@ this.defaultFilterList = defaultFilterList; } - @Nullable + @NotNull public PluginParameter<G, A, R> createParameter(@NotNull final Element parameterNode) throws NoSuchParameterException { return createParameter(parameterNode.getChildText("type"), parameterNode); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-26 14:31:47
|
Revision: 8511 http://gridarta.svn.sourceforge.net/gridarta/?rev=8511&view=rev Author: akirschbaum Date: 2010-06-26 14:31:40 +0000 (Sat, 26 Jun 2010) Log Message: ----------- Rename function name. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/script/parameter/AbstractPluginParameter.java trunk/src/app/net/sf/gridarta/script/parameter/PluginParameter.java Modified: trunk/src/app/net/sf/gridarta/script/parameter/AbstractPluginParameter.java =================================================================== --- trunk/src/app/net/sf/gridarta/script/parameter/AbstractPluginParameter.java 2010-06-26 13:45:11 UTC (rev 8510) +++ trunk/src/app/net/sf/gridarta/script/parameter/AbstractPluginParameter.java 2010-06-26 14:31:40 UTC (rev 8511) @@ -129,7 +129,7 @@ listeners.add(listener); } - public void removeListener(@NotNull final ChangeListener listener) { + public void removeChangeListener(@NotNull final ChangeListener listener) { listeners.remove(listener); } Modified: trunk/src/app/net/sf/gridarta/script/parameter/PluginParameter.java =================================================================== --- trunk/src/app/net/sf/gridarta/script/parameter/PluginParameter.java 2010-06-26 13:45:11 UTC (rev 8510) +++ trunk/src/app/net/sf/gridarta/script/parameter/PluginParameter.java 2010-06-26 14:31:40 UTC (rev 8511) @@ -64,7 +64,7 @@ void addChangeListener(@NotNull ChangeListener listener); - void removeListener(@NotNull ChangeListener listener); + void removeChangeListener(@NotNull ChangeListener listener); @NotNull PluginParameter<G, A, R> clonePluginParameter(@NotNull PluginParameterFactory<G, A, R> pluginParameterFactory); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |