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...> - 2011-06-19 16:10:18
|
Revision: 8910 http://gridarta.svn.sourceforge.net/gridarta/?rev=8910&view=rev Author: akirschbaum Date: 2011-06-19 16:10:12 +0000 (Sun, 19 Jun 2011) Log Message: ----------- Rewrite code. Modified Paths: -------------- trunk/model/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java Modified: trunk/model/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java 2011-06-18 15:06:54 UTC (rev 8909) +++ trunk/model/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java 2011-06-19 16:10:12 UTC (rev 8910) @@ -848,17 +848,49 @@ return false; } final AbstractBaseObject<G, A, R, T> abstractBaseObject = (AbstractBaseObject<G, A, R, T>) gameObject; - return hasSameContents(abstractBaseObject) && (abstractBaseObject.faceObjName == null ? faceObjName == null : abstractBaseObject.faceObjName.equals(faceObjName)) - // ignore "faceObjSource" - // ignore "normalFace" - // ignore "container" - && abstractBaseObject.getArchetype() == getArchetype() && abstractBaseObject.getArchetype().getArchetypeName().equals(getArchetype().getArchetypeName()) && abstractBaseObject.objName.equals(objName) && abstractBaseObject.gameObjectText.equals(gameObjectText) && (abstractBaseObject.msgText == null ? msgText == null : msgText != null && msgText.toString().equals(abstractBaseObject.msgText.toString())) - // ignore "mapX" - // ignore "mapY" - // ignore "attributeCache" - // ignore "multi" - // ignore "editType" - && (abstractBaseObject.faceName == null ? faceName == null : abstractBaseObject.faceName.equals(faceName)) && (abstractBaseObject.animName == null ? animName == null : abstractBaseObject.animName.equals(animName)) && abstractBaseObject.typeNo == typeNo && abstractBaseObject.direction == direction; + if (!hasSameContents(abstractBaseObject)) { + return false; + } + if (abstractBaseObject.faceObjName == null ? faceObjName != null : !abstractBaseObject.faceObjName.equals(faceObjName)) { + return false; + } + // ignore "faceObjSource" + // ignore "normalFace" + // ignore "container" + if (abstractBaseObject.getArchetype() != getArchetype()) { + return false; + } + if (!abstractBaseObject.getArchetype().getArchetypeName().equals(getArchetype().getArchetypeName())) { + return false; + } + if (!abstractBaseObject.objName.equals(objName)) { + return false; + } + if (!abstractBaseObject.gameObjectText.equals(gameObjectText)) { + return false; + } + if (abstractBaseObject.msgText == null ? msgText != null : msgText == null || !msgText.toString().equals(abstractBaseObject.msgText.toString())) { + return false; + } + // ignore "mapX" + // ignore "mapY" + // ignore "attributeCache" + // ignore "multi" + // ignore "editType" + if (abstractBaseObject.faceName == null ? faceName != null : !abstractBaseObject.faceName.equals(faceName)) { + return false; + } + if (abstractBaseObject.animName == null ? animName != null : !abstractBaseObject.animName.equals(animName)) { + return false; + } + if (abstractBaseObject.typeNo != typeNo) { + return false; + } + //noinspection RedundantIfStatement + if (abstractBaseObject.direction != direction) { + return false; + } + return true; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-06-18 15:07:00
|
Revision: 8909 http://gridarta.svn.sourceforge.net/gridarta/?rev=8909&view=rev Author: akirschbaum Date: 2011-06-18 15:06:54 +0000 (Sat, 18 Jun 2011) Log Message: ----------- Weaken types. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/prefs/AppPreferencesModel.java Modified: trunk/src/app/net/sf/gridarta/gui/prefs/AppPreferencesModel.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/prefs/AppPreferencesModel.java 2011-06-18 15:03:00 UTC (rev 8908) +++ trunk/src/app/net/sf/gridarta/gui/prefs/AppPreferencesModel.java 2011-06-18 15:06:54 UTC (rev 8909) @@ -84,7 +84,7 @@ * Sets the server setting. * @param server the server setting */ - public static void setServer(@NotNull final String server) { + public static void setServer(@NotNull final CharSequence server) { PREFERENCES.put(PREFERENCES_APP_SERVER, PathManager.path(server)); } @@ -92,7 +92,7 @@ * Sets the client setting. * @param client the client setting */ - public static void setClient(@NotNull final String client) { + public static void setClient(@NotNull final CharSequence client) { PREFERENCES.put(PREFERENCES_APP_CLIENT, PathManager.path(client)); } @@ -100,7 +100,7 @@ * Sets the editor setting. * @param editor the editor setting */ - public static void setEditor(@NotNull final String editor) { + public static void setEditor(@NotNull final CharSequence editor) { PREFERENCES.put(PREFERENCES_APP_EDITOR, PathManager.path(editor)); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-06-18 15:03:06
|
Revision: 8908 http://gridarta.svn.sourceforge.net/gridarta/?rev=8908&view=rev Author: akirschbaum Date: 2011-06-18 15:03:00 +0000 (Sat, 18 Jun 2011) Log Message: ----------- Disable warning. Modified Paths: -------------- trunk/gridarta.ipr Modified: trunk/gridarta.ipr =================================================================== --- trunk/gridarta.ipr 2011-06-18 15:01:51 UTC (rev 8907) +++ trunk/gridarta.ipr 2011-06-18 15:03:00 UTC (rev 8908) @@ -355,6 +355,7 @@ </inspection_tool> <inspection_tool class="CharUsedInArithmeticContext" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="CheckDtdRefs" enabled="false" level="ERROR" enabled_by_default="false" /> + <inspection_tool class="CheckEmptyScriptTag" enabled="false" level="WARNING" enabled_by_default="false" /> <inspection_tool class="ClassNamingConvention" enabled="true" level="WARNING" enabled_by_default="true"> <option name="m_regex" value="[A-Z][A-Za-z\d]*" /> <option name="m_minLength" value="3" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-06-18 15:01:57
|
Revision: 8907 http://gridarta.svn.sourceforge.net/gridarta/?rev=8907&view=rev Author: akirschbaum Date: 2011-06-18 15:01:51 +0000 (Sat, 18 Jun 2011) Log Message: ----------- Implement GameObjectContainer.toString(). Modified Paths: -------------- trunk/model/src/app/net/sf/gridarta/model/baseobject/GameObjectContainer.java Modified: trunk/model/src/app/net/sf/gridarta/model/baseobject/GameObjectContainer.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/baseobject/GameObjectContainer.java 2011-06-18 14:56:54 UTC (rev 8906) +++ trunk/model/src/app/net/sf/gridarta/model/baseobject/GameObjectContainer.java 2011-06-18 15:01:51 UTC (rev 8907) @@ -651,6 +651,26 @@ public abstract G asGameObject(); /** + * {@inheritDoc} + */ + @NotNull + @Override + public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("("); + final Iterator<G> it = contents.iterator(); + if (it.hasNext()) { + sb.append(it.next()); + while (it.hasNext()) { + sb.append(","); + sb.append(it.next()); + } + } + sb.append(")"); + return sb.toString(); + } + + /** * An iterator for iterating over a list in reverse order. * @todo move this class to JAPI */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-06-18 14:57:00
|
Revision: 8906 http://gridarta.svn.sourceforge.net/gridarta/?rev=8906&view=rev Author: akirschbaum Date: 2011-06-18 14:56:54 +0000 (Sat, 18 Jun 2011) Log Message: ----------- Simplify XML declarations. Modified Paths: -------------- trunk/crossfire/resource/resource/conf/types.xml trunk/test-mapvalidator/daimonin/arch/dev/editor/conf/TreasureLists.xml Modified: trunk/crossfire/resource/resource/conf/types.xml =================================================================== --- trunk/crossfire/resource/resource/conf/types.xml 2011-06-18 14:54:39 UTC (rev 8905) +++ trunk/crossfire/resource/resource/conf/types.xml 2011-06-18 14:56:54 UTC (rev 8906) @@ -2602,18 +2602,18 @@ recipes. By themselves, they have no special functionality. ]]> </description> <section name="resistance"> - <attribute arch="resist_physical" editor="resist physical %" length="15" type="int"></attribute> - <attribute arch="resist_magic" editor="resist magic %" length="15" type="int"></attribute> - <attribute arch="resist_fire" editor="resist fire %" length="15" type="int"></attribute> - <attribute arch="resist_electricity" editor="resist electricity %" length="15" type="int"></attribute> - <attribute arch="resist_cold" editor="resist cold %" length="15" type="int"></attribute> - <attribute arch="resist_acid" editor="resist acid %" length="15" type="int"></attribute> - <attribute arch="resist_weaponmagic" editor="resist weaponmagic %" length="15" type="int"></attribute> - <attribute arch="resist_ghosthit" editor="resist ghosthit %" length="15" type="int"></attribute> - <attribute arch="resist_poison" editor="resist poison %" length="15" type="int"></attribute> - <attribute arch="resist_death" editor="resist death-attack %" length="15" type="int"></attribute> - <attribute arch="resist_chaos" editor="resist chaos %" length="15" type="int"></attribute> - <attribute arch="resist_holyword" editor="resist holy power %" length="15" type="int"></attribute> + <attribute arch="resist_physical" editor="resist physical %" length="15" type="int"/> + <attribute arch="resist_magic" editor="resist magic %" length="15" type="int"/> + <attribute arch="resist_fire" editor="resist fire %" length="15" type="int"/> + <attribute arch="resist_electricity" editor="resist electricity %" length="15" type="int"/> + <attribute arch="resist_cold" editor="resist cold %" length="15" type="int"/> + <attribute arch="resist_acid" editor="resist acid %" length="15" type="int"/> + <attribute arch="resist_weaponmagic" editor="resist weaponmagic %" length="15" type="int"/> + <attribute arch="resist_ghosthit" editor="resist ghosthit %" length="15" type="int"/> + <attribute arch="resist_poison" editor="resist poison %" length="15" type="int"/> + <attribute arch="resist_death" editor="resist death-attack %" length="15" type="int"/> + <attribute arch="resist_chaos" editor="resist chaos %" length="15" type="int"/> + <attribute arch="resist_holyword" editor="resist holy power %" length="15" type="int"/> </section> </type> @@ -2947,27 +2947,27 @@ </attribute> </section> <section name="resistance"> - <attribute arch="resist_physical" editor="resist physical %" length="15" type="int"></attribute> - <attribute arch="resist_magic" editor="resist magic %" length="15" type="int"></attribute> - <attribute arch="resist_fire" editor="resist fire %" length="15" type="int"></attribute> - <attribute arch="resist_electricity" editor="resist electricity %" length="15" type="int"></attribute> - <attribute arch="resist_cold" editor="resist cold %" length="15" type="int"></attribute> - <attribute arch="resist_confusion" editor="resist confusion %" length="15" type="int"></attribute> - <attribute arch="resist_acid" editor="resist acid %" length="15" type="int"></attribute> - <attribute arch="resist_drain" editor="resist draining %" length="15" type="int"></attribute> - <attribute arch="resist_weaponmagic" editor="resist weaponmagic %" length="15" type="int"></attribute> - <attribute arch="resist_ghosthit" editor="resist ghosthit %" length="15" type="int"></attribute> - <attribute arch="resist_poison" editor="resist poison %" length="15" type="int"></attribute> - <attribute arch="resist_slow" editor="resist slow %" length="15" type="int"></attribute> - <attribute arch="resist_paralyze" editor="resist paralyze %" length="15" type="int"></attribute> - <attribute arch="resist_fear" editor="resist fear %" length="15" type="int"></attribute> - <attribute arch="resist_deplete" editor="resist depletion %" length="15" type="int"></attribute> - <attribute arch="resist_turn_undead" editor="resist turn undead %" length="15" type="int"></attribute> - <attribute arch="resist_death" editor="resist death-attack %" length="15" type="int"></attribute> - <attribute arch="resist_chaos" editor="resist chaos %" length="15" type="int"></attribute> - <attribute arch="resist_blind" editor="resist blinding %" length="15" type="int"></attribute> - <attribute arch="resist_holyword" editor="resist holy power %" length="15" type="int"></attribute> - <attribute arch="resist_godpower" editor="resist godpower %" length="15" type="int"></attribute> + <attribute arch="resist_physical" editor="resist physical %" length="15" type="int"/> + <attribute arch="resist_magic" editor="resist magic %" length="15" type="int"/> + <attribute arch="resist_fire" editor="resist fire %" length="15" type="int"/> + <attribute arch="resist_electricity" editor="resist electricity %" length="15" type="int"/> + <attribute arch="resist_cold" editor="resist cold %" length="15" type="int"/> + <attribute arch="resist_confusion" editor="resist confusion %" length="15" type="int"/> + <attribute arch="resist_acid" editor="resist acid %" length="15" type="int"/> + <attribute arch="resist_drain" editor="resist draining %" length="15" type="int"/> + <attribute arch="resist_weaponmagic" editor="resist weaponmagic %" length="15" type="int"/> + <attribute arch="resist_ghosthit" editor="resist ghosthit %" length="15" type="int"/> + <attribute arch="resist_poison" editor="resist poison %" length="15" type="int"/> + <attribute arch="resist_slow" editor="resist slow %" length="15" type="int"/> + <attribute arch="resist_paralyze" editor="resist paralyze %" length="15" type="int"/> + <attribute arch="resist_fear" editor="resist fear %" length="15" type="int"/> + <attribute arch="resist_deplete" editor="resist depletion %" length="15" type="int"/> + <attribute arch="resist_turn_undead" editor="resist turn undead %" length="15" type="int"/> + <attribute arch="resist_death" editor="resist death-attack %" length="15" type="int"/> + <attribute arch="resist_chaos" editor="resist chaos %" length="15" type="int"/> + <attribute arch="resist_blind" editor="resist blinding %" length="15" type="int"/> + <attribute arch="resist_holyword" editor="resist holy power %" length="15" type="int"/> + <attribute arch="resist_godpower" editor="resist godpower %" length="15" type="int"/> </section> </type> @@ -3453,7 +3453,7 @@ wake the monster up. If the player has stealth, the size of this square is reduced in half plus 1. </attribute> - <attribute arch="attack_movement" editor="attack movement" type="int"></attribute> + <attribute arch="attack_movement" editor="attack movement" type="int"/> <attribute arch="run_away" editor="run at % health" type="int"> This is a percentage value in the range 0-100. When the monster's health points drop below this percentage (relative to @@ -3462,27 +3462,27 @@ </section> <section name="resistance"> - <attribute arch="resist_physical" editor="resist physical %" length="15" type="int"></attribute> - <attribute arch="resist_magic" editor="resist magic %" length="15" type="int"></attribute> - <attribute arch="resist_fire" editor="resist fire %" length="15" type="int"></attribute> - <attribute arch="resist_electricity" editor="resist electricity %" length="15" type="int"></attribute> - <attribute arch="resist_cold" editor="resist cold %" length="15" type="int"></attribute> - <attribute arch="resist_confusion" editor="resist confusion %" length="15" type="int"></attribute> - <attribute arch="resist_acid" editor="resist acid %" length="15" type="int"></attribute> - <attribute arch="resist_drain" editor="resist draining %" length="15" type="int"></attribute> - <attribute arch="resist_weaponmagic" editor="resist weaponmagic %" length="15" type="int"></attribute> - <attribute arch="resist_ghosthit" editor="resist ghosthit %" length="15" type="int"></attribute> - <attribute arch="resist_poison" editor="resist poison %" length="15" type="int"></attribute> - <attribute arch="resist_slow" editor="resist slow %" length="15" type="int"></attribute> - <attribute arch="resist_paralyze" editor="resist paralyze %" length="15" type="int"></attribute> - <attribute arch="resist_fear" editor="resist fear %" length="15" type="int"></attribute> - <attribute arch="resist_deplete" editor="resist depletion %" length="15" type="int"></attribute> - <attribute arch="resist_turn_undead" editor="resist turn undead %" length="15" type="int"></attribute> - <attribute arch="resist_death" editor="resist death-attack %" length="15" type="int"></attribute> - <attribute arch="resist_chaos" editor="resist chaos %" length="15" type="int"></attribute> - <attribute arch="resist_blind" editor="resist blinding %" length="15" type="int"></attribute> - <attribute arch="resist_holyword" editor="resist holy power %" length="15" type="int"></attribute> - <attribute arch="resist_godpower" editor="resist godpower %" length="15" type="int"></attribute> + <attribute arch="resist_physical" editor="resist physical %" length="15" type="int"/> + <attribute arch="resist_magic" editor="resist magic %" length="15" type="int"/> + <attribute arch="resist_fire" editor="resist fire %" length="15" type="int"/> + <attribute arch="resist_electricity" editor="resist electricity %" length="15" type="int"/> + <attribute arch="resist_cold" editor="resist cold %" length="15" type="int"/> + <attribute arch="resist_confusion" editor="resist confusion %" length="15" type="int"/> + <attribute arch="resist_acid" editor="resist acid %" length="15" type="int"/> + <attribute arch="resist_drain" editor="resist draining %" length="15" type="int"/> + <attribute arch="resist_weaponmagic" editor="resist weaponmagic %" length="15" type="int"/> + <attribute arch="resist_ghosthit" editor="resist ghosthit %" length="15" type="int"/> + <attribute arch="resist_poison" editor="resist poison %" length="15" type="int"/> + <attribute arch="resist_slow" editor="resist slow %" length="15" type="int"/> + <attribute arch="resist_paralyze" editor="resist paralyze %" length="15" type="int"/> + <attribute arch="resist_fear" editor="resist fear %" length="15" type="int"/> + <attribute arch="resist_deplete" editor="resist depletion %" length="15" type="int"/> + <attribute arch="resist_turn_undead" editor="resist turn undead %" length="15" type="int"/> + <attribute arch="resist_death" editor="resist death-attack %" length="15" type="int"/> + <attribute arch="resist_chaos" editor="resist chaos %" length="15" type="int"/> + <attribute arch="resist_blind" editor="resist blinding %" length="15" type="int"/> + <attribute arch="resist_holyword" editor="resist holy power %" length="15" type="int"/> + <attribute arch="resist_godpower" editor="resist godpower %" length="15" type="int"/> </section> <attribute arch_begin="msg" arch_end="endmsg" editor="npc message" type="text" marker="crossfire-dialog"> This text field contains the keyword-matching-syntax. The text @@ -4662,8 +4662,8 @@ Skill types are hard-coded in the Crossfire server. It isn't hard to create new skill types, but it requires a bit of server-coding. </attribute> - <attribute arch="level" editor="level" type="int" min="-32768" max="32767" check_min="1" check_max="250"></attribute> - <attribute arch="exp" editor="experience" type="int" min="0"></attribute> + <attribute arch="level" editor="level" type="int" min="-32768" max="32767" check_min="1" check_max="250"/> + <attribute arch="exp" editor="experience" type="int" min="0"/> <attribute arch="perm_exp" editor="permanent experience" type="long"> <Permanent experience> is the experience the player gained permanently. Even if a player dies multiple times or gets drained, @@ -5560,27 +5560,27 @@ class>. </attribute> <section name="resistance"> - <attribute arch="resist_physical" editor="resist physical %" length="15" type="int"></attribute> - <attribute arch="resist_magic" editor="resist magic %" length="15" type="int"></attribute> - <attribute arch="resist_fire" editor="resist fire %" length="15" type="int"></attribute> - <attribute arch="resist_electricity" editor="resist electricity %" length="15" type="int"></attribute> - <attribute arch="resist_cold" editor="resist cold %" length="15" type="int"></attribute> - <attribute arch="resist_confusion" editor="resist confusion %" length="15" type="int"></attribute> - <attribute arch="resist_acid" editor="resist acid %" length="15" type="int"></attribute> - <attribute arch="resist_drain" editor="resist draining %" length="15" type="int"></attribute> - <attribute arch="resist_weaponmagic" editor="resist weaponmagic %" length="15" type="int"></attribute> - <attribute arch="resist_ghosthit" editor="resist ghosthit %" length="15" type="int"></attribute> - <attribute arch="resist_poison" editor="resist poison %" length="15" type="int"></attribute> - <attribute arch="resist_slow" editor="resist slow %" length="15" type="int"></attribute> - <attribute arch="resist_paralyze" editor="resist paralyze %" length="15" type="int"></attribute> - <attribute arch="resist_fear" editor="resist fear %" length="15" type="int"></attribute> - <attribute arch="resist_deplete" editor="resist depletion %" length="15" type="int"></attribute> - <attribute arch="resist_turn_undead" editor="resist turn undead %" length="15" type="int"></attribute> - <attribute arch="resist_death" editor="resist death-attack %" length="15" type="int"></attribute> - <attribute arch="resist_chaos" editor="resist chaos %" length="15" type="int"></attribute> - <attribute arch="resist_blind" editor="resist blinding %" length="15" type="int"></attribute> - <attribute arch="resist_holyword" editor="resist holy power %" length="15" type="int"></attribute> - <attribute arch="resist_godpower" editor="resist godpower %" length="15" type="int"></attribute> + <attribute arch="resist_physical" editor="resist physical %" length="15" type="int"/> + <attribute arch="resist_magic" editor="resist magic %" length="15" type="int"/> + <attribute arch="resist_fire" editor="resist fire %" length="15" type="int"/> + <attribute arch="resist_electricity" editor="resist electricity %" length="15" type="int"/> + <attribute arch="resist_cold" editor="resist cold %" length="15" type="int"/> + <attribute arch="resist_confusion" editor="resist confusion %" length="15" type="int"/> + <attribute arch="resist_acid" editor="resist acid %" length="15" type="int"/> + <attribute arch="resist_drain" editor="resist draining %" length="15" type="int"/> + <attribute arch="resist_weaponmagic" editor="resist weaponmagic %" length="15" type="int"/> + <attribute arch="resist_ghosthit" editor="resist ghosthit %" length="15" type="int"/> + <attribute arch="resist_poison" editor="resist poison %" length="15" type="int"/> + <attribute arch="resist_slow" editor="resist slow %" length="15" type="int"/> + <attribute arch="resist_paralyze" editor="resist paralyze %" length="15" type="int"/> + <attribute arch="resist_fear" editor="resist fear %" length="15" type="int"/> + <attribute arch="resist_deplete" editor="resist depletion %" length="15" type="int"/> + <attribute arch="resist_turn_undead" editor="resist turn undead %" length="15" type="int"/> + <attribute arch="resist_death" editor="resist death-attack %" length="15" type="int"/> + <attribute arch="resist_chaos" editor="resist chaos %" length="15" type="int"/> + <attribute arch="resist_blind" editor="resist blinding %" length="15" type="int"/> + <attribute arch="resist_holyword" editor="resist holy power %" length="15" type="int"/> + <attribute arch="resist_godpower" editor="resist godpower %" length="15" type="int"/> </section> </type> Modified: trunk/test-mapvalidator/daimonin/arch/dev/editor/conf/TreasureLists.xml =================================================================== --- trunk/test-mapvalidator/daimonin/arch/dev/editor/conf/TreasureLists.xml 2011-06-18 14:54:39 UTC (rev 8905) +++ trunk/test-mapvalidator/daimonin/arch/dev/editor/conf/TreasureLists.xml 2011-06-18 14:56:54 UTC (rev 8906) @@ -1,2 +1,2 @@ <?xml version="1.0"?><!DOCTYPE lists SYSTEM "TreasureLists.dtd"> -<lists></lists> +<lists/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-06-18 14:54:46
|
Revision: 8905 http://gridarta.svn.sourceforge.net/gridarta/?rev=8905&view=rev Author: akirschbaum Date: 2011-06-18 14:54:39 +0000 (Sat, 18 Jun 2011) Log Message: ----------- Disable some warnings. Modified Paths: -------------- trunk/gridarta.ipr Modified: trunk/gridarta.ipr =================================================================== --- trunk/gridarta.ipr 2011-06-18 14:53:51 UTC (rev 8904) +++ trunk/gridarta.ipr 2011-06-18 14:54:39 UTC (rev 8905) @@ -354,6 +354,7 @@ <option name="insideTryAllowed" value="false" /> </inspection_tool> <inspection_tool class="CharUsedInArithmeticContext" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="CheckDtdRefs" enabled="false" level="ERROR" enabled_by_default="false" /> <inspection_tool class="ClassNamingConvention" enabled="true" level="WARNING" enabled_by_default="true"> <option name="m_regex" value="[A-Z][A-Za-z\d]*" /> <option name="m_minLength" value="3" /> @@ -715,7 +716,6 @@ <option name="ignorePrivateMethods" value="true" /> </inspection_tool> <inspection_tool class="ReturnOfDateField" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="ReturnThis" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="ReuseOfLocalVariable" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="SafeLock" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="SamePackageImport" enabled="true" level="WARNING" enabled_by_default="true" /> @@ -846,7 +846,7 @@ <inspection_tool class="UnconstructableTestCase" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="UnknownLanguage" enabled="false" level="ERROR" enabled_by_default="false" /> <inspection_tool class="UnnecessarilyQualifiedInnerClassAccess" enabled="true" level="WARNING" enabled_by_default="true"> - <option name="ignoreReferencesToForeignInnerClasses" value="false" /> + <option name="ignoreReferencesToForeignInnerClasses" value="true" /> </inspection_tool> <inspection_tool class="UnnecessarilyQualifiedStaticUsage" enabled="true" level="WARNING" enabled_by_default="true"> <option name="m_ignoreStaticFieldAccesses" value="false" /> @@ -931,6 +931,9 @@ <inspection_tool class="WhileLoopSpinsOnField" enabled="true" level="WARNING" enabled_by_default="true"> <option name="ignoreNonEmtpyLoops" value="false" /> </inspection_tool> + <inspection_tool class="XmlHighlighting" enabled="false" level="ERROR" enabled_by_default="false" /> + <inspection_tool class="XmlUnboundNsPrefix" enabled="false" level="WARNING" enabled_by_default="false" /> + <inspection_tool class="XmlUnusedNamespaceDeclaration" enabled="false" level="WARNING" enabled_by_default="false" /> <inspection_tool class="ZeroLengthArrayInitialization" enabled="true" level="WARNING" enabled_by_default="true" /> </profile> <profile version="1.0" is_locked="false"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-06-18 14:53:57
|
Revision: 8904 http://gridarta.svn.sourceforge.net/gridarta/?rev=8904&view=rev Author: akirschbaum Date: 2011-06-18 14:53:51 +0000 (Sat, 18 Jun 2011) Log Message: ----------- Suppress warnings. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserView.java trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java Modified: trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserView.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserView.java 2011-06-18 14:39:17 UTC (rev 8903) +++ trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserView.java 2011-06-18 14:53:51 UTC (rev 8904) @@ -175,6 +175,7 @@ pickmapChooserModel.addPickmapChooserListener(pickmapChooserModelListener); pickmapPanel.setBorder(BorderFactory.createEmptyBorder(CommonConstants.SPACE_PICKMAP_ARCHETYPE_TOP, 0, 0, 0)); mapFolderTree.addModelListener(mapFolderTreeListener); + //noinspection SynchronizationOnLocalVariableOrMethodParameter synchronized (mapFolderTree) { mapFolderTreeListener.activeMapFolderChanged(mapFolderTree.getActiveMapFolder()); } Modified: trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2011-06-18 14:39:17 UTC (rev 8903) +++ trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2011-06-18 14:53:51 UTC (rev 8904) @@ -665,6 +665,7 @@ */ @ActionMethod public void gc() { + //noinspection CallToSystemGC System.gc(); System.runFinalization(); statusBar.setStatusText("Garbage collection - done."); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-06-18 14:39:24
|
Revision: 8903 http://gridarta.svn.sourceforge.net/gridarta/?rev=8903&view=rev Author: akirschbaum Date: 2011-06-18 14:39:17 +0000 (Sat, 18 Jun 2011) Log Message: ----------- Move module files into module directories. Modified Paths: -------------- trunk/gridarta.ipr Added Paths: ----------- trunk/atrinik/atrinik.iml trunk/crossfire/crossfire.iml trunk/daimonin/daimonin.iml trunk/model/model.iml trunk/preferences/preferences.iml trunk/script/script.iml trunk/textedit/textedit.iml trunk/utils/utils.iml Removed Paths: ------------- trunk/atrinik.iml trunk/crossfire.iml trunk/daimonin.iml trunk/model.iml trunk/preferences.iml trunk/script.iml trunk/textedit.iml trunk/utils.iml Copied: trunk/atrinik/atrinik.iml (from rev 8901, trunk/atrinik.iml) =================================================================== --- trunk/atrinik/atrinik.iml (rev 0) +++ trunk/atrinik/atrinik.iml 2011-06-18 14:39:17 UTC (rev 8903) @@ -0,0 +1,100 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module relativePaths="true" type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" inherit-compiler-output="true"> + <exclude-output /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/resource" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/app" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" /> + <excludeFolder url="file://$MODULE_DIR$/class" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="module" module-name="gridarta" /> + <orderEntry type="module" module-name="model" /> + <orderEntry type="module" module-name="script" /> + <orderEntry type="module" module-name="utils" /> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/annotations.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/bsh-commands-2.0b4.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/japi-lib-swing-action-0.1.0.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/japi-lib-swing-misc-trunk-1398.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/japi-lib-swing-prefs-0.1.0.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/japi-lib-swing-tod-0.1.0.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/japi-lib-util-trunk-1410.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/junit-4.2.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/log4j-1.2.13.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + </component> +</module> + Deleted: trunk/atrinik.iml =================================================================== --- trunk/atrinik.iml 2011-06-18 14:23:40 UTC (rev 8902) +++ trunk/atrinik.iml 2011-06-18 14:39:17 UTC (rev 8903) @@ -1,100 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<module relativePaths="true" type="JAVA_MODULE" version="4"> - <component name="NewModuleRootManager" inherit-compiler-output="true"> - <exclude-output /> - <content url="file://$MODULE_DIR$/atrinik"> - <sourceFolder url="file://$MODULE_DIR$/atrinik/resource" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/atrinik/src/app" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/atrinik/src/test" isTestSource="true" /> - <excludeFolder url="file://$MODULE_DIR$/atrinik/class" /> - </content> - <orderEntry type="inheritedJdk" /> - <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="module" module-name="gridarta" /> - <orderEntry type="module" module-name="model" /> - <orderEntry type="module" module-name="script" /> - <orderEntry type="module" module-name="utils" /> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/annotations.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/bsh-commands-2.0b4.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-action-0.1.0.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-misc-trunk-1398.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-prefs-0.1.0.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-tod-0.1.0.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-util-trunk-1410.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/junit-4.2.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/log4j-1.2.13.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - </component> -</module> - Copied: trunk/crossfire/crossfire.iml (from rev 8901, trunk/crossfire.iml) =================================================================== --- trunk/crossfire/crossfire.iml (rev 0) +++ trunk/crossfire/crossfire.iml 2011-06-18 14:39:17 UTC (rev 8903) @@ -0,0 +1,137 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module relativePaths="true" type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" inherit-compiler-output="true"> + <exclude-output /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src/app" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/resource" isTestSource="false" /> + <excludeFolder url="file://$MODULE_DIR$/class" /> + <excludeFolder url="file://$MODULE_DIR$/classes" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="module" module-name="gridarta" /> + <orderEntry type="module" module-name="model" /> + <orderEntry type="module" module-name="script" /> + <orderEntry type="module" module-name="utils" /> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/annotations.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/bsh-commands-2.0b4.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/bsh-core-2.0b4.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/bsh-util-2.0b4.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/japi-lib-swing-action-0.1.0.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/japi-lib-swing-misc-trunk-1398.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/japi-lib-swing-prefs-0.1.0.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/japi-lib-swing-tod-0.1.0.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/japi-lib-util-trunk-1410.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/java-getopt-1.0.13.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/jdom.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/junit-4.2.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/log4j-1.2.13.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + </component> +</module> + Deleted: trunk/crossfire.iml =================================================================== --- trunk/crossfire.iml 2011-06-18 14:23:40 UTC (rev 8902) +++ trunk/crossfire.iml 2011-06-18 14:39:17 UTC (rev 8903) @@ -1,137 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<module relativePaths="true" type="JAVA_MODULE" version="4"> - <component name="NewModuleRootManager" inherit-compiler-output="true"> - <exclude-output /> - <content url="file://$MODULE_DIR$/crossfire"> - <sourceFolder url="file://$MODULE_DIR$/crossfire/src/app" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/crossfire/src/test" isTestSource="true" /> - <sourceFolder url="file://$MODULE_DIR$/crossfire/resource" isTestSource="false" /> - <excludeFolder url="file://$MODULE_DIR$/crossfire/class" /> - <excludeFolder url="file://$MODULE_DIR$/crossfire/classes" /> - </content> - <orderEntry type="inheritedJdk" /> - <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="module" module-name="gridarta" /> - <orderEntry type="module" module-name="model" /> - <orderEntry type="module" module-name="script" /> - <orderEntry type="module" module-name="utils" /> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/annotations.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/bsh-commands-2.0b4.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/bsh-core-2.0b4.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/bsh-util-2.0b4.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-action-0.1.0.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-misc-trunk-1398.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-prefs-0.1.0.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-tod-0.1.0.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-util-trunk-1410.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/java-getopt-1.0.13.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/jdom.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/junit-4.2.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/log4j-1.2.13.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - </component> -</module> - Copied: trunk/daimonin/daimonin.iml (from rev 8901, trunk/daimonin.iml) =================================================================== --- trunk/daimonin/daimonin.iml (rev 0) +++ trunk/daimonin/daimonin.iml 2011-06-18 14:39:17 UTC (rev 8903) @@ -0,0 +1,100 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module relativePaths="true" type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" inherit-compiler-output="true"> + <exclude-output /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/resource" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/app" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" /> + <excludeFolder url="file://$MODULE_DIR$/class" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="module" module-name="gridarta" /> + <orderEntry type="module" module-name="model" /> + <orderEntry type="module" module-name="script" /> + <orderEntry type="module" module-name="utils" /> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/annotations.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/bsh-commands-2.0b4.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/japi-lib-swing-action-0.1.0.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/japi-lib-swing-misc-trunk-1398.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/japi-lib-swing-prefs-0.1.0.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/japi-lib-swing-tod-0.1.0.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/japi-lib-util-trunk-1410.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/junit-4.2.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/log4j-1.2.13.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + </component> +</module> + Deleted: trunk/daimonin.iml =================================================================== --- trunk/daimonin.iml 2011-06-18 14:23:40 UTC (rev 8902) +++ trunk/daimonin.iml 2011-06-18 14:39:17 UTC (rev 8903) @@ -1,100 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<module relativePaths="true" type="JAVA_MODULE" version="4"> - <component name="NewModuleRootManager" inherit-compiler-output="true"> - <exclude-output /> - <content url="file://$MODULE_DIR$/daimonin"> - <sourceFolder url="file://$MODULE_DIR$/daimonin/resource" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/daimonin/src/app" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/daimonin/src/test" isTestSource="true" /> - <excludeFolder url="file://$MODULE_DIR$/daimonin/class" /> - </content> - <orderEntry type="inheritedJdk" /> - <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="module" module-name="gridarta" /> - <orderEntry type="module" module-name="model" /> - <orderEntry type="module" module-name="script" /> - <orderEntry type="module" module-name="utils" /> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/annotations.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/bsh-commands-2.0b4.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-action-0.1.0.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-misc-trunk-1398.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-prefs-0.1.0.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-tod-0.1.0.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-util-trunk-1410.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/junit-4.2.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/log4j-1.2.13.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - </component> -</module> - Modified: trunk/gridarta.ipr =================================================================== --- trunk/gridarta.ipr 2011-06-18 14:23:40 UTC (rev 8902) +++ trunk/gridarta.ipr 2011-06-18 14:39:17 UTC (rev 8903) @@ -2155,15 +2155,15 @@ </component> <component name="ProjectModuleManager"> <modules> - <module fileurl="file://$PROJECT_DIR$/atrinik.iml" filepath="$PROJECT_DIR$/atrinik.iml" /> - <module fileurl="file://$PROJECT_DIR$/crossfire.iml" filepath="$PROJECT_DIR$/crossfire.iml" /> - <module fileurl="file://$PROJECT_DIR$/daimonin.iml" filepath="$PROJECT_DIR$/daimonin.iml" /> + <module fileurl="file://$PROJECT_DIR$/atrinik/atrinik.iml" filepath="$PROJECT_DIR$/atrinik/atrinik.iml" /> + <module fileurl="file://$PROJECT_DIR$/crossfire/crossfire.iml" filepath="$PROJECT_DIR$/crossfire/crossfire.iml" /> + <module fileurl="file://$PROJECT_DIR$/daimonin/daimonin.iml" filepath="$PROJECT_DIR$/daimonin/daimonin.iml" /> <module fileurl="file://$PROJECT_DIR$/gridarta.iml" filepath="$PROJECT_DIR$/gridarta.iml" /> - <module fileurl="file://$PROJECT_DIR$/model.iml" filepath="$PROJECT_DIR$/model.iml" /> - <module fileurl="file://$PROJECT_DIR$/preferences.iml" filepath="$PROJECT_DIR$/preferences.iml" /> - <module fileurl="file://$PROJECT_DIR$/script.iml" filepath="$PROJECT_DIR$/script.iml" /> - <module fileurl="file://$PROJECT_DIR$/textedit.iml" filepath="$PROJECT_DIR$/textedit.iml" /> - <module fileurl="file://$PROJECT_DIR$/utils.iml" filepath="$PROJECT_DIR$/utils.iml" /> + <module fileurl="file://$PROJECT_DIR$/model/model.iml" filepath="$PROJECT_DIR$/model/model.iml" /> + <module fileurl="file://$PROJECT_DIR$/preferences/preferences.iml" filepath="$PROJECT_DIR$/preferences/preferences.iml" /> + <module fileurl="file://$PROJECT_DIR$/script/script.iml" filepath="$PROJECT_DIR$/script/script.iml" /> + <module fileurl="file://$PROJECT_DIR$/textedit/textedit.iml" filepath="$PROJECT_DIR$/textedit/textedit.iml" /> + <module fileurl="file://$PROJECT_DIR$/utils/utils.iml" filepath="$PROJECT_DIR$/utils/utils.iml" /> </modules> </component> <component name="ProjectResources"> Copied: trunk/model/model.iml (from rev 8901, trunk/model.iml) =================================================================== --- trunk/model/model.iml (rev 0) +++ trunk/model/model.iml 2011-06-18 14:39:17 UTC (rev 8903) @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" inherit-compiler-output="true"> + <exclude-output /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src/app" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="module" module-name="utils" /> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/annotations.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/japi-lib-swing-action-0.1.0.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/japi-lib-swing-misc-trunk-1398.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/japi-lib-util-trunk-1410.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/japi-lib-xml-0.1.0.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/jdom.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/junit-4.2.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/log4j-1.2.13.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + </component> +</module> + Deleted: trunk/model.iml =================================================================== --- trunk/model.iml 2011-06-18 14:23:40 UTC (rev 8902) +++ trunk/model.iml 2011-06-18 14:39:17 UTC (rev 8903) @@ -1,86 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<module type="JAVA_MODULE" version="4"> - <component name="NewModuleRootManager" inherit-compiler-output="true"> - <exclude-output /> - <content url="file://$MODULE_DIR$/model"> - <sourceFolder url="file://$MODULE_DIR$/model/src/app" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/model/src/test" isTestSource="true" /> - </content> - <orderEntry type="inheritedJdk" /> - <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="module" module-name="utils" /> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/annotations.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-action-0.1.0.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-misc-trunk-1398.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-util-trunk-1410.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-xml-0.1.0.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/jdom.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/junit-4.2.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/log4j-1.2.13.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - </component> -</module> - Copied: trunk/preferences/preferences.iml (from rev 8901, trunk/preferences.iml) =================================================================== --- trunk/preferences/preferences.iml (rev 0) +++ trunk/preferences/preferences.iml 2011-06-18 14:39:17 UTC (rev 8903) @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module relativePaths="true" type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" inherit-compiler-output="true"> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src/app" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/annotations.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/japi-lib-swing-action-0.1.0.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/log4j-1.2.13.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + </component> +</module> + Deleted: trunk/preferences.iml =================================================================== --- trunk/preferences.iml 2011-06-18 14:23:40 UTC (rev 8902) +++ trunk/preferences.iml 2011-06-18 14:39:17 UTC (rev 8903) @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<module relativePaths="true" type="JAVA_MODULE" version="4"> - <component name="NewModuleRootManager" inherit-compiler-output="true"> - <content url="file://$MODULE_DIR$/preferences"> - <sourceFolder url="file://$MODULE_DIR$/preferences/src/app" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/preferences/src/test" isTestSource="true" /> - </content> - <orderEntry type="inheritedJdk" /> - <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/annotations.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-action-0.1.0.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/log4j-1.2.13.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - </component> -</module> - Copied: trunk/script/script.iml (from rev 8901, trunk/script.iml) =================================================================== --- trunk/script/script.iml (rev 0) +++ trunk/script/script.iml 2011-06-18 14:39:17 UTC (rev 8903) @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" inherit-compiler-output="true"> + <exclude-output /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src/app" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="module" module-name="model" /> + <orderEntry type="module" module-name="utils" /> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/annotations.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/jdom.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/log4j-1.2.13.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/bsh-core-2.0b4.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/bsh-util-2.0b4.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + </component> +</module> + Deleted: trunk/script.iml =================================================================== --- trunk/script.iml 2011-06-18 14:23:40 UTC (rev 8902) +++ trunk/script.iml 2011-06-18 14:39:17 UTC (rev 8903) @@ -1,60 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<module type="JAVA_MODULE" version="4"> - <component name="NewModuleRootManager" inherit-compiler-output="true"> - <exclude-output /> - <content url="file://$MODULE_DIR$/script"> - <sourceFolder url="file://$MODULE_DIR$/script/src/app" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/script/src/test" isTestSource="true" /> - </content> - <orderEntry type="inheritedJdk" /> - <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="module" module-name="model" /> - <orderEntry type="module" module-name="utils" /> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/annotations.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/jdom.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/log4j-1.2.13.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/bsh-core-2.0b4.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/bsh-util-2.0b4.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - </component> -</module> - Copied: trunk/textedit/textedit.iml (from rev 8901, trunk/textedit.iml) =================================================================== --- trunk/textedit/textedit.iml (rev 0) +++ trunk/textedit/textedit.iml 2011-06-18 14:39:17 UTC (rev 8903) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module relativePaths="true" type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" inherit-compiler-output="true"> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src/app" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="module" module-name="utils" /> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/annotations.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/japi-lib-swing-action-0.1.0.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/log4j-1.2.13.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + </component> +</module> + Deleted: trunk/textedit.iml =================================================================== --- trunk/textedit.iml 2011-06-18 14:23:40 UTC (rev 8902) +++ trunk/textedit.iml 2011-06-18 14:39:17 UTC (rev 8903) @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<module relativePaths="true" type="JAVA_MODULE" version="4"> - <component name="NewModuleRootManager" inherit-compiler-output="true"> - <content url="file://$MODULE_DIR$/textedit"> - <sourceFolder url="file://$MODULE_DIR$/textedit/src/app" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/textedit/src/test" isTestSource="true" /> - </content> - <orderEntry type="inheritedJdk" /> - <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="module" module-name="utils" /> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/annotations.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-action-0.1.0.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/log4j-1.2.13.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - </component> -</module> - Copied: trunk/utils/utils.iml (from rev 8901, trunk/utils.iml) =================================================================== --- trunk/utils/utils.iml (rev 0) +++ trunk/utils/utils.iml 2011-06-18 14:39:17 UTC (rev 8903) @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module relativePaths="true" type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" inherit-compiler-output="true"> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src/app" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/annotations.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/japi-lib-swing-action-0.1.0.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/japi-lib-util-trunk-1410.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/junit-4.2.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/../lib/log4j-1.2.13.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + </component> +</module> + Deleted: trunk/utils.iml =================================================================== --- trunk/utils.iml 2011-06-18 14:23:40 UTC (rev 8902) +++ trunk/utils.iml 2011-06-18 14:39:17 UTC (rev 8903) @@ -1,57 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<module relativePaths="true" type="JAVA_MODULE" version="4"> - <component name="NewModuleRootManager" inherit-compiler-output="true"> - <content url="file://$MODULE_DIR$/utils"> - <sourceFolder url="file://$MODULE_DIR$/utils/src/app" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/utils/src/test" isTestSource="true" /> - </content> - <orderEntry type="inheritedJdk" /> - <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/annotations.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-action-0.1.0.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-util-trunk-1410.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/junit-4.2.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/log4j-1.2.13.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...> - 2011-06-18 14:23:47
|
Revision: 8902 http://gridarta.svn.sourceforge.net/gridarta/?rev=8902&view=rev Author: akirschbaum Date: 2011-06-18 14:23:40 +0000 (Sat, 18 Jun 2011) Log Message: ----------- Update project file. Modified Paths: -------------- trunk/gridarta.ipr Modified: trunk/gridarta.ipr =================================================================== --- trunk/gridarta.ipr 2011-06-18 14:21:48 UTC (rev 8901) +++ trunk/gridarta.ipr 2011-06-18 14:23:40 UTC (rev 8902) @@ -89,6 +89,16 @@ <option name="DOWHILE_BRACE_FORCE" value="3" /> <option name="WHILE_BRACE_FORCE" value="3" /> <option name="FOR_BRACE_FORCE" value="3" /> + <ADDITIONAL_INDENT_OPTIONS fileType="css"> + <option name="INDENT_SIZE" value="4" /> + <option name="CONTINUATION_INDENT_SIZE" value="8" /> + <option name="TAB_SIZE" value="4" /> + <option name="USE_TAB_CHARACTER" value="false" /> + <option name="SMART_TABS" value="false" /> + <option name="LABEL_INDENT_SIZE" value="0" /> + <option name="LABEL_INDENT_ABSOLUTE" value="false" /> + <option name="USE_RELATIVE_INDENTS" value="false" /> + </ADDITIONAL_INDENT_OPTIONS> <ADDITIONAL_INDENT_OPTIONS fileType="groovy"> <option name="INDENT_SIZE" value="2" /> <option name="CONTINUATION_INDENT_SIZE" value="8" /> @@ -325,7 +335,6 @@ <inspection_tool class="BeforeClassOrAfterClassIsPublicStaticVoidNoArg" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="BeforeOrAfterIsPublicVoidNoArg" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="BigDecimalEquals" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="BoxingBoxedValue" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="BusyWait" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="CStyleArrayDeclaration" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="CachedNumberConstructorCall" enabled="true" level="WARNING" enabled_by_default="true" /> @@ -483,7 +492,6 @@ <option name="REPORT_INCONSISTENT_PROPERTIES" value="true" /> <option name="REPORT_DUPLICATED_PROPERTIES" value="true" /> </inspection_tool> - <inspection_tool class="IndexOfReplaceableByContains" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="InjectionNotApplicable" enabled="false" level="ERROR" enabled_by_default="false" /> <inspection_tool class="InnerClassMayBeStatic" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="InnerClassOnInterface" enabled="true" level="WARNING" enabled_by_default="true"> @@ -515,7 +523,9 @@ <inspection_tool class="InstantiationOfUtilityClass" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="IntLiteralMayBeLongLiteral" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="IntegerDivisionInFloatingPointContext" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="IntegerMultiplicationImplicitCastToLong" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="IntegerMultiplicationImplicitCastToLong" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="ignoreNonOverflowingCompileTimeConstants" value="true" /> + </inspection_tool> <inspection_tool class="InterfaceNamingConvention" enabled="true" level="WARNING" enabled_by_default="true"> <option name="m_regex" value="[A-Z][A-Za-z\d]*" /> <option name="m_minLength" value="3" /> @@ -711,9 +721,11 @@ <inspection_tool class="SamePackageImport" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="SerialVersionUIDNotStaticFinal" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="SerializableHasSerialVersionUIDField" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="ignoreAnonymousInnerClasses" value="false" /> <option name="superClassString" value="java.awt.Component" /> </inspection_tool> <inspection_tool class="SerializableInnerClassHasSerialVersionUIDField" enabled="false" level="WARNING" enabled_by_default="false"> + <option name="ignoreAnonymousInnerClasses" value="false" /> <option name="superClassString" value="" /> </inspection_tool> <inspection_tool class="SetReplaceableByEnumSet" enabled="true" level="WARNING" enabled_by_default="true" /> @@ -764,7 +776,6 @@ <option name="m_ignorePrimitives" value="false" /> </inspection_tool> <inspection_tool class="StringBufferReplaceableByString" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="StringBufferReplaceableByStringBuilder" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="StringConcatenationInLoops" enabled="false" level="WARNING" enabled_by_default="false"> <option name="m_ignoreUnlessAssigned" value="false" /> </inspection_tool> @@ -834,7 +845,9 @@ <inspection_tool class="UnconditionalWait" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="UnconstructableTestCase" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="UnknownLanguage" enabled="false" level="ERROR" enabled_by_default="false" /> - <inspection_tool class="UnnecessarilyQualifiedInnerClassAccess" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="UnnecessarilyQualifiedInnerClassAccess" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="ignoreReferencesToForeignInnerClasses" value="false" /> + </inspection_tool> <inspection_tool class="UnnecessarilyQualifiedStaticUsage" enabled="true" level="WARNING" enabled_by_default="true"> <option name="m_ignoreStaticFieldAccesses" value="false" /> <option name="m_ignoreStaticMethodCalls" value="false" /> @@ -853,7 +866,9 @@ <option name="m_ignoreJavadoc" value="true" /> </inspection_tool> <inspection_tool class="UnnecessaryInterfaceModifier" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="UnnecessaryJavaDocLink" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="UnnecessaryJavaDocLink" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="ignoreInlineLinkToSuper" value="false" /> + </inspection_tool> <inspection_tool class="UnnecessaryLocalVariable" enabled="false" level="WARNING" enabled_by_default="false"> <option name="m_ignoreImmediatelyReturnedVariables" value="false" /> <option name="m_ignoreAnnotatedVariables" value="true" /> @@ -1126,8 +1141,12 @@ <inspection_tool class="MethodNameSameAsClassName" enabled="false" level="WARNING" enabled_by_default="false" /> <inspection_tool class="MismatchedArrayReadWrite" enabled="false" level="WARNING" enabled_by_default="false" /> <inspection_tool class="MismatchedCollectionQueryUpdate" enabled="false" level="WARNING" enabled_by_default="false"> - <option name="queries" value="copyInto,drainTo,propertyNames,save,store,write" /> - <option name="updates" value="add,clear,drainTo,insert,load,offer,poll,push,put,remove,replace,retain,set,take" /> + <option name="queryNames"> + <value /> + </option> + <option name="updateNames"> + <value /> + </option> </inspection_tool> <inspection_tool class="NewStringBufferWithCharArgument" enabled="false" level="WARNING" enabled_by_default="false" /> <inspection_tool class="NoExplicitFinalizeCalls" enabled="false" level="WARNING" enabled_by_default="false" /> @@ -1140,6 +1159,7 @@ <option name="REPORT_NOT_ANNOTATED_GETTER" value="true" /> <option name="REPORT_NOT_ANNOTATED_SETTER_PARAMETER" value="true" /> <option name="REPORT_ANNOTATION_NOT_PROPAGATED_TO_OVERRIDERS" value="true" /> + <option name="REPORT_NULLS_PASSED_TO_NON_ANNOTATED_METHOD" value="true" /> </inspection_tool> <inspection_tool class="NumberEquality" enabled="false" level="WARNING" enabled_by_default="false" /> <inspection_tool class="NumericOverflow" enabled="false" level="WARNING" enabled_by_default="false" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-06-18 14:21:57
|
Revision: 8901 http://gridarta.svn.sourceforge.net/gridarta/?rev=8901&view=rev Author: akirschbaum Date: 2011-06-18 14:21:48 +0000 (Sat, 18 Jun 2011) Log Message: ----------- Use Patterns where possible. Modified Paths: -------------- trunk/model/src/app/net/sf/gridarta/model/anim/DefaultAnimationObject.java trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeBuilder.java trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeParser.java trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeAttributeParser.java trunk/model/src/app/net/sf/gridarta/model/archetypetype/AttributeBitmask.java trunk/model/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java trunk/model/src/app/net/sf/gridarta/model/configsource/DefaultConfigSourceFactory.java trunk/model/src/app/net/sf/gridarta/model/gameobject/MultiPositionData.java trunk/model/src/app/net/sf/gridarta/model/io/AbstractGameObjectParser.java trunk/model/src/app/net/sf/gridarta/model/io/PathManager.java trunk/model/src/app/net/sf/gridarta/model/validation/checks/MapCheckerScriptChecker.java trunk/model/src/app/net/sf/gridarta/model/validation/checks/ValidatorFactory.java trunk/model/src/test/net/sf/gridarta/model/autojoin/AutojoinListsHelper.java trunk/model/src/test/net/sf/gridarta/model/index/MapsIndexerTest.java trunk/preferences/src/app/net/sf/gridarta/preferences/Storage.java trunk/script/src/app/net/sf/gridarta/script/ScriptExecutor.java trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapLocation.java trunk/src/app/net/sf/gridarta/gui/map/renderer/ToolTipAppender.java trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFile.java trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolder.java trunk/src/app/net/sf/gridarta/gui/mapmenu/MapMenu.java trunk/src/app/net/sf/gridarta/gui/shortcuts/ShortcutsDialog.java trunk/src/app/net/sf/gridarta/gui/shortcuts/ShortcutsManager.java trunk/src/app/net/sf/gridarta/maincontrol/DefaultMainControl.java trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/tokenmarker/DaimoninAITokenMarker.java trunk/utils/src/app/net/sf/gridarta/utils/StringUtils.java trunk/utils/src/app/net/sf/gridarta/utils/XmlHelper.java trunk/utils/src/test/net/sf/gridarta/utils/TestActionBuilder.java Modified: trunk/model/src/app/net/sf/gridarta/model/anim/DefaultAnimationObject.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/anim/DefaultAnimationObject.java 2011-06-18 10:49:28 UTC (rev 8900) +++ trunk/model/src/app/net/sf/gridarta/model/anim/DefaultAnimationObject.java 2011-06-18 14:21:48 UTC (rev 8901) @@ -111,7 +111,7 @@ } facings = tmpFacings; boolean first = true; - for (final String line : animList.split("\n")) { + for (final String line : PATTERN_END_OF_LINE.split(animList, 0)) { if (first && line.startsWith("facings ")) { first = false; } else { Modified: trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeBuilder.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeBuilder.java 2011-06-18 10:49:28 UTC (rev 8900) +++ trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeBuilder.java 2011-06-18 14:21:48 UTC (rev 8901) @@ -112,7 +112,7 @@ throw new IllegalArgumentException(); } - final String[] tmp = line.split(" +", 2); + final String[] tmp = StringUtils.PATTERN_SPACES.split(line, 2); final String key = tmp[0]; if (tmp.length < 2) { errorViewCollector.addWarning(ErrorViewCategory.ARCHETYPE_INVALID, archetype.getArchetypeName() + ": invalid attribute definition: " + line); @@ -143,7 +143,7 @@ final StringBuilder sb = new StringBuilder(); archetype = null; for (final String attribute : StringUtils.PATTERN_END_OF_LINE.split(result.getObjectText())) { - final String[] tmp = attribute.split(" +", 2); + final String[] tmp = StringUtils.PATTERN_SPACES.split(attribute, 2); if (tmp.length == 2 && !attributes.containsKey(tmp[0])) { sb.append(attribute).append('\n'); } Modified: trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeParser.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeParser.java 2011-06-18 10:49:28 UTC (rev 8900) +++ trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeParser.java 2011-06-18 14:21:48 UTC (rev 8901) @@ -30,6 +30,7 @@ import net.sf.gridarta.model.errorview.ErrorViewCollector; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; +import net.sf.gridarta.utils.StringUtils; import net.sf.japi.swing.action.ActionBuilder; import net.sf.japi.swing.action.ActionBuilderFactory; import org.jetbrains.annotations.NotNull; @@ -210,7 +211,7 @@ panel = panelName; folder = folderName; } else { - final String[] names = editorFolder.split("/", 3); + final String[] names = StringUtils.PATTERN_SLASH.split(editorFolder, 3); panel = names[0]; folder = names.length >= 2 ? names[1] : names[0]; } Modified: trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeAttributeParser.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeAttributeParser.java 2011-06-18 10:49:28 UTC (rev 8900) +++ trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeAttributeParser.java 2011-06-18 14:21:48 UTC (rev 8901) @@ -19,6 +19,7 @@ package net.sf.gridarta.model.archetypetype; +import java.util.regex.Pattern; import net.sf.gridarta.model.errorview.ErrorViewCategory; import net.sf.gridarta.model.errorview.ErrorViewCollector; import org.jetbrains.annotations.NotNull; @@ -34,6 +35,12 @@ public class ArchetypeAttributeParser { /** + * Pattern to match line breaks in attribute text. + */ + @NotNull + private static final Pattern LINE_BREAK = Pattern.compile("\\s*\n\\s*"); + + /** * The name of the "attribute" element. */ @NotNull @@ -261,11 +268,7 @@ @NotNull private static String parseText(@NotNull final Node attributeElement) { final String tmp = attributeElement.getTextContent().trim(); - if (tmp.startsWith("<html>")) { - return tmp.replaceAll("\\s*\n\\s*", " "); - } else { - return tmp.replaceAll("\\s*\n\\s*", "\n"); - } + return LINE_BREAK.matcher(tmp).replaceAll(tmp.startsWith("<html>") ? " " : "\n"); } /** Modified: trunk/model/src/app/net/sf/gridarta/model/archetypetype/AttributeBitmask.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetypetype/AttributeBitmask.java 2011-06-18 10:49:28 UTC (rev 8900) +++ trunk/model/src/app/net/sf/gridarta/model/archetypetype/AttributeBitmask.java 2011-06-18 14:21:48 UTC (rev 8901) @@ -24,8 +24,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.regex.Pattern; import net.sf.gridarta.utils.NumberUtils; +import net.sf.gridarta.utils.StringUtils; import net.sf.gridarta.utils.WrappingStringBuilder; import org.apache.log4j.Category; import org.apache.log4j.Logger; @@ -84,12 +84,6 @@ private final Map<Integer, String> names = new HashMap<Integer, String>(); /** - * A pattern that matches one or more spaces. - */ - @NotNull - private static final Pattern PATTERN_SPACES = Pattern.compile(" +"); - - /** * Constructor of a bitmask from XML element. * @param isNamed whether this attribute's bitmask values are to be encoded * as strings in external representation @@ -208,7 +202,7 @@ } int result = 0; - for (final String word : PATTERN_SPACES.split(encodedValue, 0)) { + for (final String word : StringUtils.PATTERN_SPACES.split(encodedValue, 0)) { final boolean negated; final String name; if (word.startsWith("-")) { Modified: trunk/model/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java 2011-06-18 10:49:28 UTC (rev 8900) +++ trunk/model/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java 2011-06-18 14:21:48 UTC (rev 8901) @@ -1143,8 +1143,8 @@ } else { final int endPos = pos - 1; assert startPos <= endPos; - final String spec = new String(chars, startPos, endPos - startPos); - final String[] tmp = spec.split(":", 2); + final CharSequence spec = new String(chars, startPos, endPos - startPos); + final String[] tmp = StringUtils.PATTERN_COLON.split(spec, 2); if (tmp.length < 2) { if (tmp[0].equals("NAME")) { sb.append(getBestName()); Modified: trunk/model/src/app/net/sf/gridarta/model/configsource/DefaultConfigSourceFactory.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/configsource/DefaultConfigSourceFactory.java 2011-06-18 10:49:28 UTC (rev 8900) +++ trunk/model/src/app/net/sf/gridarta/model/configsource/DefaultConfigSourceFactory.java 2011-06-18 14:21:48 UTC (rev 8901) @@ -22,6 +22,7 @@ import java.util.ArrayList; import java.util.MissingResourceException; import net.sf.gridarta.utils.ActionBuilderUtils; +import net.sf.gridarta.utils.StringUtils; import net.sf.japi.swing.action.ActionBuilder; import net.sf.japi.swing.action.ActionBuilderFactory; import org.jetbrains.annotations.NotNull; @@ -57,7 +58,7 @@ */ public DefaultConfigSourceFactory() { final String configSourceClassNames = ActionBuilderUtils.getString(ACTION_BUILDER, CONFIG_SOURCES_KEY); - for (final String configSourceClassName : configSourceClassNames.split(" ", -1)) { + for (final String configSourceClassName : StringUtils.PATTERN_SPACE.split(configSourceClassNames, -1)) { final Class<?> configSourceClass; try { configSourceClass = Class.forName(configSourceClassName); Modified: trunk/model/src/app/net/sf/gridarta/model/gameobject/MultiPositionData.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/gameobject/MultiPositionData.java 2011-06-18 10:49:28 UTC (rev 8900) +++ trunk/model/src/app/net/sf/gridarta/model/gameobject/MultiPositionData.java 2011-06-18 14:21:48 UTC (rev 8901) @@ -32,6 +32,7 @@ import net.sf.gridarta.model.errorview.ErrorViewCategory; import net.sf.gridarta.model.errorview.ErrorViewCollector; import net.sf.gridarta.utils.IOUtils; +import net.sf.gridarta.utils.StringUtils; import org.apache.log4j.Category; import org.apache.log4j.Logger; import org.jetbrains.annotations.NotNull; @@ -115,7 +116,7 @@ errorViewCollector.addWarning(ErrorViewCategory.ARCHDEF_ENTRY_INVALID, lnr.getLineNumber(), "too many entries"); break; } - final String[] numbers = line.split(" "); + final String[] numbers = StringUtils.PATTERN_SPACE.split(line); if (numbers.length != 2) { errorViewCollector.addError(ErrorViewCategory.ARCHDEF_ENTRY_INVALID, lnr.getLineNumber(), "syntax error"); hasErrors = true; Modified: trunk/model/src/app/net/sf/gridarta/model/io/AbstractGameObjectParser.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/io/AbstractGameObjectParser.java 2011-06-18 10:49:28 UTC (rev 8900) +++ trunk/model/src/app/net/sf/gridarta/model/io/AbstractGameObjectParser.java 2011-06-18 14:21:48 UTC (rev 8901) @@ -26,7 +26,6 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; -import java.util.regex.Pattern; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.archetype.ArchetypeSet; import net.sf.gridarta.model.baseobject.BaseObject; @@ -55,11 +54,6 @@ private static final Category log = Logger.getLogger(AbstractGameObjectParser.class); /** - * Pattern to match spaces. - */ - private static final Pattern PATTERN_SPACES = Pattern.compile(" +"); - - /** * The game object factory for creating new game object instances. */ @NotNull @@ -245,7 +239,7 @@ final CharSequence objText = gameObject.getObjectText(); if (objText.length() != 0) { for (final String aTmp : StringUtils.PATTERN_END_OF_LINE.split(objText, 0)) { - final String[] line = PATTERN_SPACES.split(aTmp, 2); + final String[] line = StringUtils.PATTERN_SPACES.split(aTmp, 2); if (line.length == 2) { fields.put(line[0] + " ", line[1]); } else { Modified: trunk/model/src/app/net/sf/gridarta/model/io/PathManager.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/io/PathManager.java 2011-06-18 10:49:28 UTC (rev 8900) +++ trunk/model/src/app/net/sf/gridarta/model/io/PathManager.java 2011-06-18 14:21:48 UTC (rev 8901) @@ -21,7 +21,9 @@ import java.io.File; import java.io.IOException; +import java.util.regex.Pattern; import net.sf.gridarta.model.settings.GlobalSettings; +import net.sf.gridarta.utils.StringUtils; import org.jetbrains.annotations.NotNull; /** @@ -34,6 +36,19 @@ */ public class PathManager { + /** + * A {@link Pattern} that matches redundant directory parts like "dir/../". + */ + @NotNull + private static final Pattern PATTERN_REDUNDANT = Pattern.compile("[^/]+/\\.\\./"); + + /** + * A {@link Pattern} that matches redundant directory separators. + */ + @NotNull + private static final Pattern PATTERN_SLASHES = Pattern.compile("//*"); + + // NOTE: There are certainly faster algorithms. But these methods are rarely used. /** @@ -134,7 +149,7 @@ String work2; do { work2 = work; - work = work2.replaceAll("[^/]+/\\.\\./", ""); + work = PATTERN_REDUNDANT.matcher(work2).replaceAll(""); } while (!work2.equals(work)); return work; } @@ -216,11 +231,11 @@ * @return path */ @NotNull - public static String path(@NotNull final String str) { - String path = str.replaceAll("\\\\", "/"); + public static String path(@NotNull final CharSequence str) { + String path = StringUtils.PATTERN_BACKSLASH.matcher(str).replaceAll("/"); path = path.endsWith("/") ? path.substring(0, path.length() - 1) : path; path = path.startsWith("file:") ? path.substring("file:".length()) : path; - path = path.replaceAll("//*", "/"); + path = PATTERN_SLASHES.matcher(path).replaceAll("/"); return path; } @@ -230,7 +245,7 @@ * @return the absolute path */ @NotNull - public static String getAbsolutePath(@NotNull final String path) { + public static String getAbsolutePath(@NotNull final CharSequence path) { return relativeToAbsolute(System.getProperty("user.dir") + "/dummy", path(path)); } Modified: trunk/model/src/app/net/sf/gridarta/model/validation/checks/MapCheckerScriptChecker.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/validation/checks/MapCheckerScriptChecker.java 2011-06-18 10:49:28 UTC (rev 8900) +++ trunk/model/src/app/net/sf/gridarta/model/validation/checks/MapCheckerScriptChecker.java 2011-06-18 14:21:48 UTC (rev 8901) @@ -316,7 +316,7 @@ } final String stderrOutput = stderr.getOutput(); if (!stderrOutput.isEmpty()) { - errorCollector.collect(new MapCheckerScriptFailureError<G, A, R>(mapModel, command, stderrOutput.replaceAll("\n", "<br>"))); + errorCollector.collect(new MapCheckerScriptFailureError<G, A, R>(mapModel, command, StringUtils.PATTERN_NEWLINE.matcher(stderrOutput).replaceAll("<br>"))); return false; } return true; Modified: trunk/model/src/app/net/sf/gridarta/model/validation/checks/ValidatorFactory.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/validation/checks/ValidatorFactory.java 2011-06-18 10:49:28 UTC (rev 8900) +++ trunk/model/src/app/net/sf/gridarta/model/validation/checks/ValidatorFactory.java 2011-06-18 14:21:48 UTC (rev 8901) @@ -183,7 +183,7 @@ } else if (classValidator == CustomTypeChecker.class) { final CustomTypeChecker<?, ?, ?> customTypeChecker = (CustomTypeChecker<?, ?, ?>) validator; do { - final String[] tmp = args[pos].split(",", -1); + final String[] tmp = StringUtils.PATTERN_COMMA.split(args[pos], -1); if (tmp.length != 2 && tmp.length != 3) { throw new NoSuchValidatorException("invalid from,to or from,to,env type: " + args[pos]); } @@ -215,7 +215,7 @@ } else if (classValidator == SlayingChecker.class) { final SlayingChecker<?, ?, ?> slayingChecker = (SlayingChecker<?, ?, ?>) validator; do { - final String[] tmp = args[pos].split(",", 2); + final String[] tmp = StringUtils.PATTERN_COMMA.split(args[pos], 2); if (tmp.length != 2) { throw new NoSuchValidatorException("invalid matcher,pattern: " + args[pos]); } @@ -239,8 +239,8 @@ * incorrect */ @NotNull - private static Integer[] createIntegerArray(@NotNull final String arg) throws NoSuchValidatorException { - final String[] tmp = arg.split(",", -1); + private static Integer[] createIntegerArray(@NotNull final CharSequence arg) throws NoSuchValidatorException { + final String[] tmp = StringUtils.PATTERN_COMMA.split(arg, -1); final Integer[] result = new Integer[tmp.length]; for (int i = 0; i < tmp.length; i++) { try { Modified: trunk/model/src/test/net/sf/gridarta/model/autojoin/AutojoinListsHelper.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/autojoin/AutojoinListsHelper.java 2011-06-18 10:49:28 UTC (rev 8900) +++ trunk/model/src/test/net/sf/gridarta/model/autojoin/AutojoinListsHelper.java 2011-06-18 14:21:48 UTC (rev 8901) @@ -21,6 +21,7 @@ import java.util.ArrayList; import java.util.List; +import java.util.regex.Pattern; import net.sf.gridarta.model.archetype.TestArchetype; import net.sf.gridarta.model.gameobject.TestGameObject; import net.sf.gridarta.model.maparchobject.TestMapArchObject; @@ -35,6 +36,12 @@ public class AutojoinListsHelper { /** + * A {@link Pattern} that matches alternative archetypes. + */ + @NotNull + private static final Pattern ALTERNATIVES_PATTERN = Pattern.compile("\\|"); + + /** * The {@link TestMapModelCreator} instance. */ @NotNull @@ -73,7 +80,7 @@ for (final String archetypeNameList : archetypeNames) { final List<TestArchetype> archetypeList = new ArrayList<TestArchetype>(); if (!archetypeNameList.isEmpty()) { - for (final String archetypeName : archetypeNameList.split("\\|", -1)) { + for (final String archetypeName : ALTERNATIVES_PATTERN.split(archetypeNameList, -1)) { archetypeList.add(mapModelCreator.getArchetype(archetypeName)); } } Modified: trunk/model/src/test/net/sf/gridarta/model/index/MapsIndexerTest.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/index/MapsIndexerTest.java 2011-06-18 10:49:28 UTC (rev 8900) +++ trunk/model/src/test/net/sf/gridarta/model/index/MapsIndexerTest.java 2011-06-18 14:21:48 UTC (rev 8901) @@ -32,6 +32,7 @@ import net.sf.gridarta.model.mapmodel.MapModel; import net.sf.gridarta.model.settings.GlobalSettings; import net.sf.gridarta.model.settings.TestGlobalSettings; +import net.sf.gridarta.utils.StringUtils; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.junit.Assert; @@ -99,7 +100,7 @@ @Nullable File directoryToDelete = mapsDirectory; try { for (final String spec : specs) { - final String[] tmp = spec.split(":", 2); + final String[] tmp = StringUtils.PATTERN_COLON.split(spec, 2); if (tmp.length != 2) { throw new IllegalArgumentException(); } Modified: trunk/preferences/src/app/net/sf/gridarta/preferences/Storage.java =================================================================== --- trunk/preferences/src/app/net/sf/gridarta/preferences/Storage.java 2011-06-18 10:49:28 UTC (rev 8900) +++ trunk/preferences/src/app/net/sf/gridarta/preferences/Storage.java 2011-06-18 14:21:48 UTC (rev 8901) @@ -48,6 +48,12 @@ public class Storage { /** + * The pattern that matches a single equal sign ("="). + */ + @NotNull + public static final Pattern PATTERN_EQUAL = Pattern.compile("="); + + /** * The Logger for printing log messages. */ private static final Category log = Logger.getLogger(Storage.class); @@ -313,7 +319,7 @@ continue; } - final String[] tmp = line.split("=", 2); + final String[] tmp = PATTERN_EQUAL.split(line, 2); if (tmp.length != 2) { log.warn(file + ":" + lnr.getLineNumber() + ": syntax error"); continue; Modified: trunk/script/src/app/net/sf/gridarta/script/ScriptExecutor.java =================================================================== --- trunk/script/src/app/net/sf/gridarta/script/ScriptExecutor.java 2011-06-18 10:49:28 UTC (rev 8900) +++ trunk/script/src/app/net/sf/gridarta/script/ScriptExecutor.java 2011-06-18 14:21:48 UTC (rev 8901) @@ -33,6 +33,7 @@ import net.sf.gridarta.model.maparchobject.MapArchObject; import net.sf.gridarta.script.parameter.NoSuchParameterException; import net.sf.gridarta.script.parameter.PluginParameter; +import net.sf.gridarta.utils.StringUtils; import org.jetbrains.annotations.NotNull; /** @@ -78,7 +79,7 @@ final Script<G, A, R> clonedScript = modelTemplate.cloneScript(); for (final String param : params) { - final String[] tmp = param.split("=", 2); + final String[] tmp = StringUtils.PATTERN_EQUAL.split(param, 2); if (tmp.length != 2) { throw new ScriptExecException("syntax error: " + param); } Modified: trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapLocation.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapLocation.java 2011-06-18 10:49:28 UTC (rev 8900) +++ trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapLocation.java 2011-06-18 14:21:48 UTC (rev 8901) @@ -20,7 +20,9 @@ package net.sf.gridarta.gui.map.mapactions; import java.awt.Point; +import java.util.regex.Pattern; import net.sf.gridarta.model.baseobject.BaseObject; +import net.sf.gridarta.utils.StringUtils; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -32,6 +34,12 @@ public class MapLocation { /** + * The {@link Pattern} that matches end of lines in random map parameters. + */ + @NotNull + private static final Pattern PATTERN_END_OF_LINE = Pattern.compile("[\r\n]+"); + + /** * The map path. */ @NotNull @@ -140,9 +148,9 @@ return null; } - final String[] lines = msg.split("[\r\n]+"); + final String[] lines = PATTERN_END_OF_LINE.split(msg); for (final String line : lines) { - final String[] tmp = line.split(" +", 2); + final String[] tmp = StringUtils.PATTERN_SPACES.split(line, 2); if (tmp.length == 2 && tmp[0].equals(parameterName)) { return tmp[1]; } Modified: trunk/src/app/net/sf/gridarta/gui/map/renderer/ToolTipAppender.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/renderer/ToolTipAppender.java 2011-06-18 10:49:28 UTC (rev 8900) +++ trunk/src/app/net/sf/gridarta/gui/map/renderer/ToolTipAppender.java 2011-06-18 14:21:48 UTC (rev 8901) @@ -26,6 +26,7 @@ import net.sf.gridarta.model.io.GameObjectParser; import net.sf.gridarta.model.maparchobject.MapArchObject; import net.sf.gridarta.model.validation.errors.ValidationError; +import net.sf.gridarta.utils.StringUtils; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -107,7 +108,7 @@ @Nullable public String finish() { - return empty ? null : sb.toString().replaceAll("\n", "<br>"); + return empty ? null : StringUtils.PATTERN_NEWLINE.matcher(sb.toString()).replaceAll("<br>"); } /** Modified: trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFile.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFile.java 2011-06-18 10:49:28 UTC (rev 8900) +++ trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFile.java 2011-06-18 14:21:48 UTC (rev 8901) @@ -22,6 +22,7 @@ import java.io.File; import java.io.IOException; import java.util.Collection; +import java.util.regex.Pattern; import net.sf.gridarta.gui.map.mapview.MapView; import net.sf.gridarta.gui.map.mapview.MapViewBasic; import net.sf.gridarta.gui.map.mapview.MapViewsManager; @@ -44,6 +45,12 @@ public class MapFile<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> { /** + * The {@link Pattern} that matches valid pickmap names. + */ + @NotNull + private static final Pattern PATTERN_VALID_PICKMAP_NAME = Pattern.compile("[-a-zA-Z_+ 0-9,]+"); + + /** * The folder this pickmap is part of. */ @NotNull @@ -120,8 +127,8 @@ * @param name the name to check * @return whether the name is valid */ - public static boolean isValidPickmapName(@NotNull final String name) { - return name.matches("[-a-zA-Z_+ 0-9,]+"); + public static boolean isValidPickmapName(@NotNull final CharSequence name) { + return PATTERN_VALID_PICKMAP_NAME.matcher(name).matches(); } /** Modified: trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolder.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolder.java 2011-06-18 10:49:28 UTC (rev 8900) +++ trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolder.java 2011-06-18 14:21:48 UTC (rev 8901) @@ -25,6 +25,7 @@ import java.util.Collections; import java.util.Iterator; import java.util.List; +import java.util.regex.Pattern; import net.sf.gridarta.gui.map.mapview.MapViewsManager; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; @@ -45,6 +46,12 @@ public class MapFolder<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> implements Iterable<MapFile<G, A, R>> { /** + * The {@link Pattern} that matches valid map folder names. + */ + @NotNull + private static final Pattern PATTERN_VALID_MAP_FOLDER_NAME = Pattern.compile("[-a-zA-Z_+ 0-9,]+"); + + /** * The registered event listeners. */ private final EventListenerList2<MapFolderListener<G, A, R>> listeners = new EventListenerList2<MapFolderListener<G, A, R>>(MapFolderListener.class); @@ -96,7 +103,7 @@ public MapFolder(@Nullable final MapFolder<G, A, R> parent, @NotNull final String name, @NotNull final File baseDir, @NotNull final MapViewsManager<G, A, R> mapViewsManager) throws InvalidNameException { this.baseDir = baseDir; this.mapViewsManager = mapViewsManager; - if (parent == null ? name.length() > 0 : !name.matches("[-a-zA-Z_+ 0-9,]+")) { + if (parent == null ? name.length() > 0 : !PATTERN_VALID_MAP_FOLDER_NAME.matcher(name).matches()) { throw new InvalidNameException(name); } Modified: trunk/src/app/net/sf/gridarta/gui/mapmenu/MapMenu.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapmenu/MapMenu.java 2011-06-18 10:49:28 UTC (rev 8900) +++ trunk/src/app/net/sf/gridarta/gui/mapmenu/MapMenu.java 2011-06-18 14:21:48 UTC (rev 8901) @@ -30,6 +30,7 @@ import javax.swing.tree.MutableTreeNode; import javax.swing.tree.TreeNode; import javax.swing.tree.TreePath; +import net.sf.gridarta.utils.StringUtils; import org.apache.log4j.Category; import org.apache.log4j.Logger; import org.jetbrains.annotations.NotNull; @@ -210,7 +211,7 @@ */ @NotNull public TreePath addMapMenuEntry(@NotNull final String directory, @NotNull final DefaultMutableTreeNode treeNode) { - final String[] paths = directory.split("/"); + final String[] paths = StringUtils.PATTERN_SLASH.split(directory); DefaultMutableTreeNode dir2 = root; for (final String path : paths) { if (!path.isEmpty()) { Modified: trunk/src/app/net/sf/gridarta/gui/shortcuts/ShortcutsDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/shortcuts/ShortcutsDialog.java 2011-06-18 10:49:28 UTC (rev 8900) +++ trunk/src/app/net/sf/gridarta/gui/shortcuts/ShortcutsDialog.java 2011-06-18 14:21:48 UTC (rev 8901) @@ -55,6 +55,7 @@ import net.sf.gridarta.gui.utils.GUIConstants; import net.sf.gridarta.utils.ActionBuilderUtils; import net.sf.gridarta.utils.ActionUtils; +import net.sf.gridarta.utils.StringUtils; import net.sf.japi.swing.action.ActionBuilder; import net.sf.japi.swing.action.ActionBuilderFactory; import net.sf.japi.swing.action.ActionMethod; @@ -103,7 +104,7 @@ * The {@link Pattern} to split a category into sub-categories. */ @NotNull - private static final Pattern PATTERN_SUB_CATEGORIES = Pattern.compile("/"); + private static final Pattern PATTERN_SUB_CATEGORIES = StringUtils.PATTERN_SLASH; /** * The {@link JButton} for ok. Modified: trunk/src/app/net/sf/gridarta/gui/shortcuts/ShortcutsManager.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/shortcuts/ShortcutsManager.java 2011-06-18 10:49:28 UTC (rev 8900) +++ trunk/src/app/net/sf/gridarta/gui/shortcuts/ShortcutsManager.java 2011-06-18 14:21:48 UTC (rev 8901) @@ -37,6 +37,7 @@ import net.sf.gridarta.MainControl; import net.sf.gridarta.utils.ActionBuilderUtils; import net.sf.gridarta.utils.ActionUtils; +import net.sf.gridarta.utils.StringUtils; import net.sf.japi.swing.action.ActionBuilder; import net.sf.japi.swing.action.DummyAction; import org.jetbrains.annotations.NotNull; @@ -99,7 +100,7 @@ public ShortcutsManager(@NotNull final ActionBuilder actionBuilder) { this.actionBuilder = actionBuilder; - ignoreActions.addAll(Arrays.asList(ActionBuilderUtils.getString(actionBuilder, "shortcutsIgnoreActions").split(" +"))); + ignoreActions.addAll(Arrays.asList(StringUtils.PATTERN_SPACES.split(ActionBuilderUtils.getString(actionBuilder, "shortcutsIgnoreActions"), 0))); for (final Action action : this) { final Object acceleratorKey = action.getValue(Action.ACCELERATOR_KEY); Modified: trunk/src/app/net/sf/gridarta/maincontrol/DefaultMainControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/DefaultMainControl.java 2011-06-18 10:49:28 UTC (rev 8900) +++ trunk/src/app/net/sf/gridarta/maincontrol/DefaultMainControl.java 2011-06-18 14:21:48 UTC (rev 8901) @@ -27,7 +27,6 @@ import java.util.Collections; import java.util.Map; import java.util.MissingResourceException; -import java.util.regex.Pattern; import javax.swing.ImageIcon; import javax.swing.filechooser.FileFilter; import javax.xml.parsers.DocumentBuilder; @@ -107,6 +106,7 @@ import net.sf.gridarta.utils.CommonConstants; import net.sf.gridarta.utils.GuiFileFilters; import net.sf.gridarta.utils.IOUtils; +import net.sf.gridarta.utils.StringUtils; import net.sf.gridarta.utils.SystemIcons; import net.sf.gridarta.utils.XmlHelper; import net.sf.japi.swing.action.ActionBuilder; @@ -294,10 +294,9 @@ } configSource.read(globalSettings, resources, errorView); for (final R archetype : archetypeSet.getArchetypes()) { - final Pattern pattern = Pattern.compile("/"); final CharSequence editorFolder = archetype.getEditorFolder(); if (editorFolder != null && !editorFolder.equals(GameObject.EDITOR_FOLDER_INTERN)) { - final String[] tmp = pattern.split(editorFolder, 2); + final String[] tmp = StringUtils.PATTERN_SLASH.split(editorFolder, 2); if (tmp.length == 2) { final String panelName = tmp[0]; final String folderName = tmp[1]; Modified: trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/tokenmarker/DaimoninAITokenMarker.java =================================================================== --- trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/tokenmarker/DaimoninAITokenMarker.java 2011-06-18 10:49:28 UTC (rev 8900) +++ trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/tokenmarker/DaimoninAITokenMarker.java 2011-06-18 14:21:48 UTC (rev 8901) @@ -27,6 +27,7 @@ import java.util.regex.Pattern; import javax.swing.text.Segment; import net.sf.gridarta.textedit.textarea.Token; +import net.sf.gridarta.utils.StringUtils; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -128,7 +129,7 @@ while (it.hasNext()) { final int paramLength = it.next(); - final String[] tmp = new String(array, offset2, paramLength).split("=", 2); + final String[] tmp = StringUtils.PATTERN_EQUAL.split(new String(array, offset2, paramLength), 2); if (tmp.length == 2) { final String param = tmp[0]; final CharSequence arg = tmp[1]; Modified: trunk/utils/src/app/net/sf/gridarta/utils/StringUtils.java =================================================================== --- trunk/utils/src/app/net/sf/gridarta/utils/StringUtils.java 2011-06-18 10:49:28 UTC (rev 8900) +++ trunk/utils/src/app/net/sf/gridarta/utils/StringUtils.java 2011-06-18 14:21:48 UTC (rev 8901) @@ -54,6 +54,54 @@ public static final Pattern PATTERN_END_OF_LINE = Pattern.compile("\\s*\n"); /** + * The pattern that matches a single space. + */ + @NotNull + public static final Pattern PATTERN_SPACE = Pattern.compile(" "); + + /** + * The pattern that matches a non-empty sequence of spaces. + */ + @NotNull + public static final Pattern PATTERN_SPACES = Pattern.compile(" +"); + + /** + * The pattern that matches a single slash ("/"). + */ + @NotNull + public static final Pattern PATTERN_SLASH = Pattern.compile("/"); + + /** + * The pattern that matches a single backslash ("\"). + */ + @NotNull + public static final Pattern PATTERN_BACKSLASH = Pattern.compile("\\\\"); + + /** + * The pattern that matches a single colon (":"). + */ + @NotNull + public static final Pattern PATTERN_COLON = Pattern.compile(":"); + + /** + * The pattern that matches a single comma (","). + */ + @NotNull + public static final Pattern PATTERN_COMMA = Pattern.compile(","); + + /** + * The pattern that matches a single equal sign ("="). + */ + @NotNull + public static final Pattern PATTERN_EQUAL = Pattern.compile("="); + + /** + * The pattern that matches a single newline ("\n"). + */ + @NotNull + public static final Pattern PATTERN_NEWLINE = Pattern.compile("\n"); + + /** * Private constructor to prevent instantiation. */ private StringUtils() { Modified: trunk/utils/src/app/net/sf/gridarta/utils/XmlHelper.java =================================================================== --- trunk/utils/src/app/net/sf/gridarta/utils/XmlHelper.java 2011-06-18 10:49:28 UTC (rev 8900) +++ trunk/utils/src/app/net/sf/gridarta/utils/XmlHelper.java 2011-06-18 14:21:48 UTC (rev 8901) @@ -24,11 +24,13 @@ import java.io.IOException; import java.io.InputStream; import java.net.URL; +import java.util.regex.Pattern; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathFactory; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.xml.sax.EntityResolver; import org.xml.sax.InputSource; @@ -41,6 +43,12 @@ public class XmlHelper { /** + * The {@link Pattern} for matching the directory part of a system ID. + */ + @NotNull + private static final Pattern PATTERN_DIRECTORY_PART = Pattern.compile(".*/"); + + /** * DocumentBuilder. */ private final DocumentBuilder documentBuilder; @@ -102,7 +110,7 @@ } InputSource inputSource = null; - final URL url = IOUtils.getResource(new File("system/dtd"), systemId.replaceAll(".*/", "")); + final URL url = IOUtils.getResource(new File("system/dtd"), PATTERN_DIRECTORY_PART.matcher(systemId).replaceAll("")); final InputStream inputStream = url.openStream(); try { final BufferedInputStream bufferedInputStream = new BufferedInputStream(inputStream); Modified: trunk/utils/src/test/net/sf/gridarta/utils/TestActionBuilder.java =================================================================== --- trunk/utils/src/test/net/sf/gridarta/utils/TestActionBuilder.java 2011-06-18 10:49:28 UTC (rev 8900) +++ trunk/utils/src/test/net/sf/gridarta/utils/TestActionBuilder.java 2011-06-18 14:21:48 UTC (rev 8901) @@ -24,6 +24,7 @@ import java.util.HashMap; import java.util.Map; import java.util.ResourceBundle; +import java.util.regex.Pattern; import net.sf.japi.swing.action.ActionBuilder; import net.sf.japi.swing.action.ActionBuilderFactory; import net.sf.japi.util.IteratorEnumeration; @@ -38,6 +39,12 @@ public class TestActionBuilder { /** + * The {@link Pattern} for matching validator keys for default values. + */ + @NotNull + private static final Pattern PATTERN_DEFAULT_KEY = Pattern.compile("Validator\\..*\\.default"); + + /** * Private constructor to prevent instantiation. */ private TestActionBuilder() { @@ -66,7 +73,7 @@ } final Object object; - if (key.matches("Validator\\..*\\.default")) { + if (PATTERN_DEFAULT_KEY.matcher(key).matches()) { object = "true"; } else { return null; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-06-18 10:49:35
|
Revision: 8900 http://gridarta.svn.sourceforge.net/gridarta/?rev=8900&view=rev Author: akirschbaum Date: 2011-06-18 10:49:28 +0000 (Sat, 18 Jun 2011) Log Message: ----------- Weaken types. Modified Paths: -------------- trunk/model/src/app/net/sf/gridarta/model/baseobject/RecursiveGameObjectIterator.java trunk/model/src/app/net/sf/gridarta/model/index/AbstractIndex.java trunk/model/src/app/net/sf/gridarta/model/validation/errors/ValidationError.java Modified: trunk/model/src/app/net/sf/gridarta/model/baseobject/RecursiveGameObjectIterator.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/baseobject/RecursiveGameObjectIterator.java 2011-06-18 09:46:17 UTC (rev 8899) +++ trunk/model/src/app/net/sf/gridarta/model/baseobject/RecursiveGameObjectIterator.java 2011-06-18 10:49:28 UTC (rev 8900) @@ -46,7 +46,7 @@ * Create a recursive GameObject Iterator. * @param container GameObjectContainer to start with */ - RecursiveGameObjectIterator(final GameObjectContainer<G, A, R> container) { + RecursiveGameObjectIterator(final Iterable<G> container) { current = container.iterator(); } Modified: trunk/model/src/app/net/sf/gridarta/model/index/AbstractIndex.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/index/AbstractIndex.java 2011-06-18 09:46:17 UTC (rev 8899) +++ trunk/model/src/app/net/sf/gridarta/model/index/AbstractIndex.java 2011-06-18 10:49:28 UTC (rev 8900) @@ -30,7 +30,6 @@ import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; -import java.util.Set; import net.sf.gridarta.utils.EventListenerList2; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -74,7 +73,7 @@ * @serial */ @NotNull - private final Set<V> pending = new HashSet<V>(); + private final Collection<V> pending = new HashSet<V>(); /** * Whether the state ({@link #timestamps} or {@link #names}) was modified Modified: trunk/model/src/app/net/sf/gridarta/model/validation/errors/ValidationError.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/validation/errors/ValidationError.java 2011-06-18 09:46:17 UTC (rev 8899) +++ trunk/model/src/app/net/sf/gridarta/model/validation/errors/ValidationError.java 2011-06-18 10:49:28 UTC (rev 8900) @@ -169,6 +169,7 @@ * @return the game objects */ @NotNull + @SuppressWarnings("TypeMayBeWeakened") public List<G> getGameObjects() { return Collections.unmodifiableList(gameObjects); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-06-18 09:46:28
|
Revision: 8899 http://gridarta.svn.sourceforge.net/gridarta/?rev=8899&view=rev Author: akirschbaum Date: 2011-06-18 09:46:17 +0000 (Sat, 18 Jun 2011) Log Message: ----------- Simplify annotation declarations. Modified Paths: -------------- trunk/atrinik/src/test/net/sf/gridarta/var/atrinik/model/archetype/ArchetypeParserTest.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/maparchobject/MapArchObject.java trunk/crossfire/src/test/net/sf/gridarta/var/crossfire/model/archetype/ArchetypeParserTest.java trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetype.java trunk/model/src/app/net/sf/gridarta/model/archetypechooser/ArchetypeChooserModel.java trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeAttributeParser.java trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeType.java trunk/model/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java trunk/model/src/app/net/sf/gridarta/model/baseobject/GameObjectContainer.java trunk/model/src/app/net/sf/gridarta/model/exitconnector/ExitMatcher.java trunk/model/src/app/net/sf/gridarta/model/face/CollectedFaceProvider.java trunk/model/src/app/net/sf/gridarta/model/filter/FilterParser.java trunk/model/src/app/net/sf/gridarta/model/gameobject/AbstractGameObject.java trunk/model/src/app/net/sf/gridarta/model/gameobject/DefaultIsoGameObject.java trunk/model/src/app/net/sf/gridarta/model/index/AbstractIndex.java trunk/model/src/app/net/sf/gridarta/model/maparchobject/AbstractMapArchObject.java trunk/model/src/app/net/sf/gridarta/model/mapmodel/MapSquare.java trunk/model/src/app/net/sf/gridarta/model/match/Operation.java trunk/model/src/app/net/sf/gridarta/model/treasurelist/TreasureTreeNode.java trunk/model/src/app/net/sf/gridarta/model/undo/UndoState.java trunk/model/src/app/net/sf/gridarta/model/validation/checks/ValidatorFactory.java trunk/model/src/test/net/sf/gridarta/model/archetype/ArchetypeParserTest.java trunk/model/src/test/net/sf/gridarta/model/mapmodel/DefaultMapModelTest.java trunk/script/src/app/net/sf/gridarta/script/ScriptModelParser.java trunk/src/app/net/sf/gridarta/gui/archetypechooser/ArchetypeChooserView.java trunk/src/app/net/sf/gridarta/gui/archetypechooser/ArchetypePanel.java trunk/src/app/net/sf/gridarta/gui/connectionview/CellRenderer.java trunk/src/app/net/sf/gridarta/gui/connectionview/Connection.java trunk/src/app/net/sf/gridarta/gui/connectionview/View.java trunk/src/app/net/sf/gridarta/gui/filter/MenuItemCreator.java trunk/src/app/net/sf/gridarta/gui/findarchetypes/TableModel.java trunk/src/app/net/sf/gridarta/gui/map/MapPreviewAccessory.java trunk/src/app/net/sf/gridarta/gui/map/event/MouseOpAdapter.java trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewManager.java trunk/src/app/net/sf/gridarta/gui/map/tools/AbstractTool.java trunk/src/app/net/sf/gridarta/gui/map/tools/ToolSelector.java trunk/src/app/net/sf/gridarta/gui/mapdesktop/MapDesktop.java trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTree.java trunk/src/app/net/sf/gridarta/gui/prefs/NetPreferences.java trunk/src/app/net/sf/gridarta/gui/script/ScriptManager.java trunk/src/app/net/sf/gridarta/gui/script/parameter/ArchParameterView.java trunk/src/app/net/sf/gridarta/gui/selectedsquare/CellRenderer.java trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareView.java trunk/src/app/net/sf/gridarta/gui/shortcuts/KeyStrokeDialog.java trunk/src/app/net/sf/gridarta/gui/shortcuts/KeyStrokeField.java trunk/src/app/net/sf/gridarta/gui/utils/DirectionLayout.java trunk/src/app/net/sf/gridarta/gui/utils/GList.java trunk/src/app/net/sf/gridarta/updater/Updater.java trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/JEditTextArea.java trunk/utils/src/app/net/sf/gridarta/utils/CopyReader.java trunk/utils/src/app/net/sf/gridarta/utils/EventListenerList2.java trunk/utils/src/app/net/sf/gridarta/utils/HideFileFilterProxy.java trunk/utils/src/app/net/sf/gridarta/utils/SystemIcons.java trunk/utils/src/test/net/sf/gridarta/utils/Size2DTest.java trunk/utils/src/test/net/sf/gridarta/utils/WrappingStringBuilderTest.java Modified: trunk/atrinik/src/test/net/sf/gridarta/var/atrinik/model/archetype/ArchetypeParserTest.java =================================================================== --- trunk/atrinik/src/test/net/sf/gridarta/var/atrinik/model/archetype/ArchetypeParserTest.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/atrinik/src/test/net/sf/gridarta/var/atrinik/model/archetype/ArchetypeParserTest.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -164,7 +164,7 @@ */ @NotNull @Override - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") protected ArchetypeSet getArchetypeSet() { if (archetypeSet == null) { throw new IllegalStateException(); Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/maparchobject/MapArchObject.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/maparchobject/MapArchObject.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/maparchobject/MapArchObject.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -567,7 +567,7 @@ /** * {@inheritDoc} */ - @SuppressWarnings({ "FloatingPointEquality" }) + @SuppressWarnings("FloatingPointEquality") @Override public boolean equals(@Nullable final Object obj) { if (obj == this) { Modified: trunk/crossfire/src/test/net/sf/gridarta/var/crossfire/model/archetype/ArchetypeParserTest.java =================================================================== --- trunk/crossfire/src/test/net/sf/gridarta/var/crossfire/model/archetype/ArchetypeParserTest.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/crossfire/src/test/net/sf/gridarta/var/crossfire/model/archetype/ArchetypeParserTest.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -120,7 +120,7 @@ */ @NotNull @Override - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") protected ArchetypeSet getArchetypeSet() { if (archetypeSet == null) { throw new IllegalStateException(); Modified: trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetype.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetype.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetype.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -184,7 +184,7 @@ */ @NotNull @Override - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings("unchecked") public R clone() { //noinspection OverriddenMethodCallDuringObjectConstruction final AbstractArchetype<G, A, R> clone = (AbstractArchetype<G, A, R>) super.clone(); Modified: trunk/model/src/app/net/sf/gridarta/model/archetypechooser/ArchetypeChooserModel.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetypechooser/ArchetypeChooserModel.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/model/src/app/net/sf/gridarta/model/archetypechooser/ArchetypeChooserModel.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -165,7 +165,7 @@ * Sets the selected {@link ArchetypeChooserPanel}. * @param selectedPanel the selected panel */ - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public void setSelectedPanel(@NotNull final ArchetypeChooserPanel<G, A, R> selectedPanel) { if (!panels.contains(selectedPanel)) { throw new IllegalArgumentException("selected panel " + selectedPanel.getName() + " is not part of the model"); Modified: trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeAttributeParser.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeAttributeParser.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeAttributeParser.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -164,7 +164,7 @@ * @throws MissingAttributeException if the element cannot be parsed */ @Nullable - @SuppressWarnings({ "FeatureEnvy" }) + @SuppressWarnings("FeatureEnvy") public ArchetypeAttribute load(@NotNull final Element attributeElement, @NotNull final ErrorViewCollector errorViewCollector, @NotNull final ArchetypeTypeSet archetypeTypeSet, @NotNull final String typeName, @NotNull final String sectionName) throws MissingAttributeException { final String description = parseText(attributeElement); final int inputLength = getAttributeIntValue(attributeElement, XML_ATTRIBUTE_LENGTH, 0, typeName, errorViewCollector); Modified: trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeType.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeType.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeType.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -154,7 +154,7 @@ * @return the description */ @NotNull - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public String getDescription() { final String result = description; return result == null ? "" : result.trim(); @@ -165,7 +165,7 @@ * @return the usage notes */ @NotNull - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public String getUse() { final String result = use; return result == null ? "" : result.trim(); Modified: trunk/model/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/model/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -214,7 +214,7 @@ * Sets the face name. * @param faceName the new face name */ - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") private void setFaceName(@NotNull final String faceName) { final String effectiveFaceName = getEffectiveFaceName(faceName); //Strings are interned @@ -694,7 +694,7 @@ */ @Override @NotNull - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings("unchecked") public T clone() { //noinspection OverriddenMethodCallDuringObjectConstruction final AbstractBaseObject<G, A, R, T> clone = (AbstractBaseObject<G, A, R, T>) super.clone(); @@ -923,7 +923,7 @@ * Sets object animation <code>animation <var>animName</var></code>. * @param animName object animation <code>animation <var>animName</var></code> */ - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") private void setAnimName(@NotNull final String animName) { final String newAnimName = animName.length() > 0 ? animName.intern() : null; // Using == on these Strings is okay, they are both interned. @@ -970,7 +970,7 @@ /** * {@inheritDoc} */ - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") @Override public void setMulti(@NotNull final MultiArchData<G, A, R, T> multi) { this.multi = multi; Modified: trunk/model/src/app/net/sf/gridarta/model/baseobject/GameObjectContainer.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/baseobject/GameObjectContainer.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/model/src/app/net/sf/gridarta/model/baseobject/GameObjectContainer.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -44,7 +44,7 @@ * @todo In case of MapSquares, this class is most likely bogus regarding * multi-part objects. This needs to be fixed. */ -@SuppressWarnings({ "ClassReferencesSubclass" }) +@SuppressWarnings("ClassReferencesSubclass") public abstract class GameObjectContainer<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> implements Cloneable, Iterable<G>, Serializable { /** @@ -592,7 +592,7 @@ */ @NotNull @Override - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings("unchecked") protected Object clone() { try { final GameObjectContainer<G, A, R> clone = (GameObjectContainer<G, A, R>) super.clone(); @@ -689,7 +689,7 @@ * {@inheritDoc} */ // previous can throw NoSuchElementException but InspectionGadgets doesn't know about that. - @SuppressWarnings({ "IteratorNextCanNotThrowNoSuchElementException" }) + @SuppressWarnings("IteratorNextCanNotThrowNoSuchElementException") @NotNull @Override public T next() { Modified: trunk/model/src/app/net/sf/gridarta/model/exitconnector/ExitMatcher.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/exitconnector/ExitMatcher.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/model/src/app/net/sf/gridarta/model/exitconnector/ExitMatcher.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -97,7 +97,7 @@ * found */ @Nullable - @SuppressWarnings({ "TypeMayBeWeakened" }) + @SuppressWarnings("TypeMayBeWeakened") public G getExit(@NotNull final MapModel<G, A, R> mapModel, @Nullable final Point point) { if (point == null || !mapModel.getMapArchObject().isPointValid(point)) { return null; Modified: trunk/model/src/app/net/sf/gridarta/model/face/CollectedFaceProvider.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/face/CollectedFaceProvider.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/model/src/app/net/sf/gridarta/model/face/CollectedFaceProvider.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -38,7 +38,7 @@ * @todo Move parsing of the face files to this class, so the faces can be * easily reloaded while the application is running. */ -@SuppressWarnings({ "IOResourceOpenedButNotSafelyClosed" }) +@SuppressWarnings("IOResourceOpenedButNotSafelyClosed") public class CollectedFaceProvider extends AbstractFaceProvider { /** Modified: trunk/model/src/app/net/sf/gridarta/model/filter/FilterParser.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/filter/FilterParser.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/model/src/app/net/sf/gridarta/model/filter/FilterParser.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -107,7 +107,7 @@ filterConfig.setEnabled(enabled); filterConfig.setInverted(Boolean.valueOf(value.getChildTextTrim("inverted"))); //Element does not use type parameters - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings("unchecked") final Iterable<Element> it = (Iterable<Element>) value.getChildren("subfilter"); for (final Element filterElement : it) { final String name = filterElement.getChildTextTrim("name"); @@ -132,7 +132,7 @@ final boolean enabled = Boolean.valueOf(value.getChildTextTrim("enabled")); filterConfig.setEnabled(enabled); //Element does not use type parameters - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings("unchecked") final Iterable<Element> properties = (Iterable<Element>) value.getChildren("property"); for (final Element property : properties) { final String pName = property.getChildTextTrim("name"); Modified: trunk/model/src/app/net/sf/gridarta/model/gameobject/AbstractGameObject.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/gameobject/AbstractGameObject.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/model/src/app/net/sf/gridarta/model/gameobject/AbstractGameObject.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -136,7 +136,7 @@ */ @NotNull @Override - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings("unchecked") public G clone() { //noinspection OverriddenMethodCallDuringObjectConstruction final AbstractGameObject<G, A, R> clone = (AbstractGameObject<G, A, R>) super.clone(); Modified: trunk/model/src/app/net/sf/gridarta/model/gameobject/DefaultIsoGameObject.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/gameobject/DefaultIsoGameObject.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/model/src/app/net/sf/gridarta/model/gameobject/DefaultIsoGameObject.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -138,7 +138,7 @@ */ @NotNull @Override - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings("unchecked") public G clone() { //noinspection OverriddenMethodCallDuringObjectConstruction final DefaultIsoGameObject<G, A, R> clone = (DefaultIsoGameObject<G, A, R>) super.clone(); Modified: trunk/model/src/app/net/sf/gridarta/model/index/AbstractIndex.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/index/AbstractIndex.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/model/src/app/net/sf/gridarta/model/index/AbstractIndex.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -325,7 +325,7 @@ * @noinspection unchecked */ @Override - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings("unchecked") public void load(@NotNull final ObjectInputStream objectInputStream) throws IOException { synchronized (sync) { final Map<V, Long> tmpTimestamps; Modified: trunk/model/src/app/net/sf/gridarta/model/maparchobject/AbstractMapArchObject.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/maparchobject/AbstractMapArchObject.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/model/src/app/net/sf/gridarta/model/maparchobject/AbstractMapArchObject.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -658,7 +658,7 @@ */ @NotNull @Override - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings("unchecked") public A clone() { final AbstractMapArchObject<A> clone; try { Modified: trunk/model/src/app/net/sf/gridarta/model/mapmodel/MapSquare.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/mapmodel/MapSquare.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/model/src/app/net/sf/gridarta/model/mapmodel/MapSquare.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -126,7 +126,7 @@ */ @NotNull @Override - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings("unchecked") protected MapSquare<G, A, R> clone() { final MapSquare<G, A, R> clone = (MapSquare<G, A, R>) super.clone(); return clone; Modified: trunk/model/src/app/net/sf/gridarta/model/match/Operation.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/match/Operation.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/model/src/app/net/sf/gridarta/model/match/Operation.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -23,7 +23,7 @@ * Operator. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ -@SuppressWarnings({ "EnumeratedConstantNamingConvention" }) +@SuppressWarnings("EnumeratedConstantNamingConvention") public enum Operation { eq, Modified: trunk/model/src/app/net/sf/gridarta/model/treasurelist/TreasureTreeNode.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/treasurelist/TreasureTreeNode.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/model/src/app/net/sf/gridarta/model/treasurelist/TreasureTreeNode.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -133,7 +133,7 @@ @Override public Enumeration<TreasureTreeNode> children() { //DefaultMutableTreeNode does not use type parameters - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings("unchecked") final Enumeration<TreasureTreeNode> tmp = (Enumeration<TreasureTreeNode>) super.children(); return tmp; } Modified: trunk/model/src/app/net/sf/gridarta/model/undo/UndoState.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/undo/UndoState.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/model/src/app/net/sf/gridarta/model/undo/UndoState.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -79,7 +79,7 @@ * @throws IllegalStateException if changed map squares have been recorded * before */ - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public void setSavedSquares(@NotNull final SavedSquares<G, A, R> savedSquares) { if (this.savedSquares != null) { throw new IllegalStateException(); @@ -94,7 +94,7 @@ * @throws IllegalStateException if no saved squares have been recorded */ @NotNull - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public SavedSquares<G, A, R> getSavedSquares() { if (savedSquares == null) { throw new IllegalStateException(); Modified: trunk/model/src/app/net/sf/gridarta/model/validation/checks/ValidatorFactory.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/validation/checks/ValidatorFactory.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/model/src/app/net/sf/gridarta/model/validation/checks/ValidatorFactory.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -125,7 +125,7 @@ throw new NoSuchValidatorException("class " + args[0] + " has more than one public constructor"); } //Class.getConstructors() did return the wrong type - @SuppressWarnings({ "unchecked" }) final Constructor<? extends Validator<G, A, R>> constructor = (Constructor<? extends Validator<G, A, R>>) constructors[0]; + @SuppressWarnings("unchecked") final Constructor<? extends Validator<G, A, R>> constructor = (Constructor<? extends Validator<G, A, R>>) constructors[0]; final Class<?>[] constructorParameterTypes = constructor.getParameterTypes(); final Object[] constructorArguments = new Object[constructorParameterTypes.length]; int pos = 1; Modified: trunk/model/src/test/net/sf/gridarta/model/archetype/ArchetypeParserTest.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/archetype/ArchetypeParserTest.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/model/src/test/net/sf/gridarta/model/archetype/ArchetypeParserTest.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -205,7 +205,7 @@ */ @NotNull @Override - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") protected ArchetypeSet<TestGameObject, TestMapArchObject, TestArchetype> getArchetypeSet() { final ArchetypeSet<TestGameObject, TestMapArchObject, TestArchetype> result = archetypeSet; if (result == null) { Modified: trunk/model/src/test/net/sf/gridarta/model/mapmodel/DefaultMapModelTest.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/mapmodel/DefaultMapModelTest.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/model/src/test/net/sf/gridarta/model/mapmodel/DefaultMapModelTest.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -45,7 +45,7 @@ * Test for {@link DefaultMapModel}. * @author Andreas Kirschbaum */ -@SuppressWarnings({ "FeatureEnvy" }) +@SuppressWarnings("FeatureEnvy") // This is a test. It has feature envy by definition. public class DefaultMapModelTest { Modified: trunk/script/src/app/net/sf/gridarta/script/ScriptModelParser.java =================================================================== --- trunk/script/src/app/net/sf/gridarta/script/ScriptModelParser.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/script/src/app/net/sf/gridarta/script/ScriptModelParser.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -95,7 +95,7 @@ isScript = true; } else { //Element does not use type parameters - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings("unchecked") final Iterable<Element> modes = mode.getChildren(); for (final Element modeChild : modes) { final boolean value = Boolean.valueOf(modeChild.getTextTrim()); @@ -113,7 +113,7 @@ scriptModel.setFilter(isFilter); scriptModel.setScript(isScript); //Element does not use type parameters - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings("unchecked") final Collection<Element> parameters = node.getChildren("parameter"); if (parameters != null && !parameters.isEmpty()) { for (final Element parameter : parameters) { Modified: trunk/src/app/net/sf/gridarta/gui/archetypechooser/ArchetypeChooserView.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/archetypechooser/ArchetypeChooserView.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/src/app/net/sf/gridarta/gui/archetypechooser/ArchetypeChooserView.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -278,7 +278,7 @@ @NotNull private ArchetypePanel<G, A, R> getArchetypePanel(final int index) { //JTabbedPane does not use type parameters - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings("unchecked") final ArchetypePanel<G, A, R> archetypePanel = (ArchetypePanel<G, A, R>) tabDesktop.getComponentAt(index); return archetypePanel; } Modified: trunk/src/app/net/sf/gridarta/gui/archetypechooser/ArchetypePanel.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/archetypechooser/ArchetypePanel.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/src/app/net/sf/gridarta/gui/archetypechooser/ArchetypePanel.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -277,7 +277,7 @@ @Nullable private ArchetypeChooserFolder<G, A, R> getSelectedFolder() { //JComboBox does not use type parameters - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings("unchecked") final ArchetypeChooserFolder<G, A, R> selectedFolder = (ArchetypeChooserFolder<G, A, R>) folders.getSelectedItem(); return selectedFolder; } Modified: trunk/src/app/net/sf/gridarta/gui/connectionview/CellRenderer.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/connectionview/CellRenderer.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/src/app/net/sf/gridarta/gui/connectionview/CellRenderer.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -64,7 +64,7 @@ super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); //DefaultListCellRenderer does not use type parameters - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings("unchecked") final Connection<K> connection = (Connection<K>) value; sbForFormat.setLength(0); Modified: trunk/src/app/net/sf/gridarta/gui/connectionview/Connection.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/connectionview/Connection.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/src/app/net/sf/gridarta/gui/connectionview/Connection.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -61,7 +61,7 @@ * @return the key */ @NotNull - @SuppressWarnings({ "TypeMayBeWeakened" }) + @SuppressWarnings("TypeMayBeWeakened") public K getKey() { return key; } Modified: trunk/src/app/net/sf/gridarta/gui/connectionview/View.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/connectionview/View.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/src/app/net/sf/gridarta/gui/connectionview/View.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -211,7 +211,7 @@ final Collection<Connection<K>> result = new ArrayList<Connection<K>>(); for (final Object selection : connectionList.getSelectedValues()) { //JList does not use type parameters - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings("unchecked") final Connection<K> connection = (Connection<K>) selection; result.add(connection); } Modified: trunk/src/app/net/sf/gridarta/gui/filter/MenuItemCreator.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/filter/MenuItemCreator.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/src/app/net/sf/gridarta/gui/filter/MenuItemCreator.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -84,7 +84,7 @@ * @return the menu item */ @NotNull - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public JMenuItem getMenuItem() { assert menuItem != null; return menuItem; Modified: trunk/src/app/net/sf/gridarta/gui/findarchetypes/TableModel.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/findarchetypes/TableModel.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/src/app/net/sf/gridarta/gui/findarchetypes/TableModel.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -134,7 +134,7 @@ * @return the row content */ @NotNull - @SuppressWarnings({ "TypeMayBeWeakened" }) + @SuppressWarnings("TypeMayBeWeakened") public R get(final int index) { return archetypes.get(sorting[index]); } Modified: trunk/src/app/net/sf/gridarta/gui/map/MapPreviewAccessory.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/MapPreviewAccessory.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/src/app/net/sf/gridarta/gui/map/MapPreviewAccessory.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -174,7 +174,7 @@ * Updates the text and icon of {@link #preview}. * @param image the icon to set or <code>null</code> */ - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") private void setPreview(@Nullable final Image image) { preview.setIcon(image == null ? null : new ImageIcon(image)); preview.setText(null); Modified: trunk/src/app/net/sf/gridarta/gui/map/event/MouseOpAdapter.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/event/MouseOpAdapter.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/src/app/net/sf/gridarta/gui/map/event/MouseOpAdapter.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -27,7 +27,7 @@ * Event Listener Adapter for {@link net.sf.gridarta.gui.map.event.MouseOpListener}. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ -@SuppressWarnings({ "NoopMethodInAbstractClass" }) +@SuppressWarnings("NoopMethodInAbstractClass") public abstract class MouseOpAdapter<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> implements MouseOpListener<G, A, R> { /** Modified: trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewManager.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewManager.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewManager.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -61,7 +61,7 @@ * Sets the active map view. The map view will be moved to the front. * @param mapView the map view to activate */ - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public void setActiveMapView(@NotNull final MapView<G, A, R> mapView) { assert mapViewsList.contains(mapView); mapViewsList.remove(mapView); Modified: trunk/src/app/net/sf/gridarta/gui/map/tools/AbstractTool.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/tools/AbstractTool.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/src/app/net/sf/gridarta/gui/map/tools/AbstractTool.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -28,7 +28,7 @@ * Base class for tools. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ -@SuppressWarnings({ "AbstractClassWithOnlyOneDirectInheritor" }) +@SuppressWarnings("AbstractClassWithOnlyOneDirectInheritor") public abstract class AbstractTool<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends MouseOpAdapter<G, A, R> implements Tool<G, A, R> { /** Modified: trunk/src/app/net/sf/gridarta/gui/map/tools/ToolSelector.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/tools/ToolSelector.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/src/app/net/sf/gridarta/gui/map/tools/ToolSelector.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -151,7 +151,7 @@ * Adds a tool to this tool selector. * @param tool the tool to add */ - @SuppressWarnings({ "MethodOverloadsMethodOfSuperclass" }) + @SuppressWarnings("MethodOverloadsMethodOfSuperclass") public void add(@NotNull final Tool<G, A, R> tool) { add(tool, false); } Modified: trunk/src/app/net/sf/gridarta/gui/mapdesktop/MapDesktop.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapdesktop/MapDesktop.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/src/app/net/sf/gridarta/gui/mapdesktop/MapDesktop.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -181,7 +181,7 @@ @Override public void internalFrameActivated(@NotNull final InternalFrameEvent e) { //InternalFrameEvent does not use type parameters - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings("unchecked") final MapView<G, A, R> mapView = (MapView<G, A, R>) e.getSource(); mapViewFocusGainedNotify(mapView); } @@ -196,7 +196,7 @@ @Override public void internalFrameClosing(@NotNull final InternalFrameEvent e) { //InternalFrameEvent does not use type parameters - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings("unchecked") final MapView<G, A, R> mapView = (MapView<G, A, R>) e.getInternalFrame(); mapViewsManager.closeMapView(mapView); } @@ -217,7 +217,7 @@ @Override public void internalFrameIconified(@NotNull final InternalFrameEvent e) { //InternalFrameEvent does not use type parameters - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings("unchecked") final MapView<G, A, R> mapView = (MapView<G, A, R>) e.getSource(); mapViewFocusLostNotify(mapView); } Modified: trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTree.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTree.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTree.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -159,7 +159,7 @@ * @param mapFolder the active map folder or <code>null</code> if no folder * should be active */ - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public synchronized void setActiveMapFolder(@NotNull final MapFolder<G, A, R> mapFolder) { if (activeMapFolder == mapFolder) { return; Modified: trunk/src/app/net/sf/gridarta/gui/prefs/NetPreferences.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/prefs/NetPreferences.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/src/app/net/sf/gridarta/gui/prefs/NetPreferences.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -160,7 +160,7 @@ @Override public void apply() { //JComboBox does not use type parameters - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings("unchecked") final Enum<Proxy.Type> typeEnum = (Enum<Proxy.Type>) proxyType.getSelectedItem(); PREFERENCES.put(NET_PREFERENCES_KEY_TYPE, typeEnum.name()); PREFERENCES.put(NET_PREFERENCES_KEY_HOST, proxyHost.getText()); Modified: trunk/src/app/net/sf/gridarta/gui/script/ScriptManager.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/script/ScriptManager.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/src/app/net/sf/gridarta/gui/script/ScriptManager.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -160,7 +160,7 @@ public void valueChanged(final ListSelectionEvent e) { if (!e.getValueIsAdjusting()) { //JList does not use type parameters - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings("unchecked") final Script<G, A, R> script = (Script<G, A, R>) scripts.getSelectedValue(); showScript(script); } @@ -190,7 +190,7 @@ @Override public void actionPerformed(final ActionEvent e) { //JList does not use type parameters - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings("unchecked") final Script<G, A, R> script = (Script<G, A, R>) scripts.getSelectedValue(); if (script == null) { return; Modified: trunk/src/app/net/sf/gridarta/gui/script/parameter/ArchParameterView.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/script/parameter/ArchParameterView.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/src/app/net/sf/gridarta/gui/script/parameter/ArchParameterView.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -59,7 +59,7 @@ public void itemStateChanged(final ItemEvent e) { if (e.getStateChange() == ItemEvent.SELECTED) { //JComboBox does not use type parameters - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings("unchecked") final Archetype<G, A, R> archetype = (Archetype<G, A, R>) value.getSelectedItem(); parameter.setValue(archetype); } Modified: trunk/src/app/net/sf/gridarta/gui/selectedsquare/CellRenderer.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/selectedsquare/CellRenderer.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/src/app/net/sf/gridarta/gui/selectedsquare/CellRenderer.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -77,7 +77,7 @@ super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); //DefaultListCellRenderer does not use type parameters - @SuppressWarnings({ "unchecked" }) GameObject<G, A, R> arch = (GameObject<G, A, R>) value; + @SuppressWarnings("unchecked") GameObject<G, A, R> arch = (GameObject<G, A, R>) value; // arch == null should not happen, but it *can* happen when the active // window gets changed by user and java is still blitting here Modified: trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareView.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareView.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareView.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -498,7 +498,7 @@ * @return the game object, or <code>null</code> if the index is invalid */ @Nullable - @SuppressWarnings({ "TypeMayBeWeakened" }) + @SuppressWarnings("TypeMayBeWeakened") G getListGameObject(final int index) { final int actualIndex = getValidIndex(index); if (actualIndex >= model.getSize()) { @@ -506,7 +506,7 @@ } //DefaultListModel does not use type parameters - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings("unchecked") final G gameObject = (G) model.getElementAt(actualIndex); return gameObject; } @@ -549,7 +549,7 @@ list.setSelectedIndex(actualIndex); } //JList does not use type parameters - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings("unchecked") final G gameObject = (G) list.getSelectedValue(); selectedSquareModel.setSelectedGameObject(gameObject, actualIndex); } Modified: trunk/src/app/net/sf/gridarta/gui/shortcuts/KeyStrokeDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/shortcuts/KeyStrokeDialog.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/src/app/net/sf/gridarta/gui/shortcuts/KeyStrokeDialog.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -259,7 +259,7 @@ * @return the key stroke or <code>null</code> */ @Nullable - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public KeyStroke getKeyStroke() { return keyStroke.getKeyStroke(); } Modified: trunk/src/app/net/sf/gridarta/gui/shortcuts/KeyStrokeField.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/shortcuts/KeyStrokeField.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/src/app/net/sf/gridarta/gui/shortcuts/KeyStrokeField.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -123,7 +123,7 @@ * Updates the current key stroke. * @param keyStroke the new key stroke */ - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") private void setKeyStroke(@NotNull final KeyStroke keyStroke) { if (this.keyStroke == keyStroke) { return; Modified: trunk/src/app/net/sf/gridarta/gui/utils/DirectionLayout.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/DirectionLayout.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/src/app/net/sf/gridarta/gui/utils/DirectionLayout.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -176,7 +176,7 @@ /** * {@inheritDoc} */ - @SuppressWarnings({ "ChainOfInstanceofChecks" }) + @SuppressWarnings("ChainOfInstanceofChecks") @Override public void addLayoutComponent(@NotNull final Component comp, @Nullable final Object constraints) { if (constraints == null) { @@ -239,7 +239,7 @@ * {@inheritDoc} */ @Override - @SuppressWarnings({ "ObjectEquality" }) + @SuppressWarnings("ObjectEquality") public void removeLayoutComponent(@NotNull final Component comp) { synchronized (comp.getTreeLock()) { if (cC == comp) { Modified: trunk/src/app/net/sf/gridarta/gui/utils/GList.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/GList.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/src/app/net/sf/gridarta/gui/utils/GList.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -79,7 +79,7 @@ } //JList does not use type parameters - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings("unchecked") final T element = (T) getModel().getElementAt(index); if (toolTipProvider == null) { @@ -94,7 +94,7 @@ @Override public T getSelectedValue() { //JList does not use type parameters - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings("unchecked") final T selectedValue = (T) super.getSelectedValue(); return selectedValue; } Modified: trunk/src/app/net/sf/gridarta/updater/Updater.java =================================================================== --- trunk/src/app/net/sf/gridarta/updater/Updater.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/src/app/net/sf/gridarta/updater/Updater.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -323,7 +323,7 @@ * @return <code>true</code> if this version is newer than * <var>other</var>, otherwise <code>false</code> */ - @SuppressWarnings({ "ObjectEquality" }) + @SuppressWarnings("ObjectEquality") boolean isNewerThan(@NotNull final VersionInfo other) { return this != UNAVAILABLE && (other == UNAVAILABLE || timestamp.compareTo(other.timestamp) > 0); } Modified: trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/JEditTextArea.java =================================================================== --- trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/JEditTextArea.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/JEditTextArea.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -727,7 +727,7 @@ * Returns the document this text area is editing. */ @NotNull - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public SyntaxDocument getDocument() { if (document == null) { throw new IllegalStateException(); Modified: trunk/utils/src/app/net/sf/gridarta/utils/CopyReader.java =================================================================== --- trunk/utils/src/app/net/sf/gridarta/utils/CopyReader.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/utils/src/app/net/sf/gridarta/utils/CopyReader.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -123,7 +123,7 @@ * recorded. * @param failure the failure reason */ - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") private void setFailure(@NotNull final String failure) { synchronized (sync) { stopped = true; Modified: trunk/utils/src/app/net/sf/gridarta/utils/EventListenerList2.java =================================================================== --- trunk/utils/src/app/net/sf/gridarta/utils/EventListenerList2.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/utils/src/app/net/sf/gridarta/utils/EventListenerList2.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -53,7 +53,7 @@ */ //Assume the constructor call has passed the right type; can't use Class<T> //here since class literals do not work for parametrized types. - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings("unchecked") public EventListenerList2(@NotNull final Class<? extends EventListener> t) { this.t = (Class<T>) t; } Modified: trunk/utils/src/app/net/sf/gridarta/utils/HideFileFilterProxy.java =================================================================== --- trunk/utils/src/app/net/sf/gridarta/utils/HideFileFilterProxy.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/utils/src/app/net/sf/gridarta/utils/HideFileFilterProxy.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -76,7 +76,7 @@ * {@inheritDoc} First checks whether the file should be hidden, if not, * checks the other FileFilter. */ - @SuppressWarnings({ "ParameterNameDiffersFromOverriddenParameter" }) + @SuppressWarnings("ParameterNameDiffersFromOverriddenParameter") @Override public boolean accept(@NotNull final File pathName) { if (pathName.getName().startsWith(".")) { Modified: trunk/utils/src/app/net/sf/gridarta/utils/SystemIcons.java =================================================================== --- trunk/utils/src/app/net/sf/gridarta/utils/SystemIcons.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/utils/src/app/net/sf/gridarta/utils/SystemIcons.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -193,7 +193,7 @@ } @NotNull - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public ImageIcon getMapCursorIcon() { if (mapCursorIcon == null) { mapCursorIcon = guiUtils.getResourceIcon(SQUARE_CURSOR); @@ -202,7 +202,7 @@ } @NotNull - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public Icon getEmptySquareIcon() { if (emptySquareIcon == null) { emptySquareIcon = guiUtils.getResourceIcon(SQUARE_EMPTY); @@ -211,7 +211,7 @@ } @NotNull - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public ImageIcon getUnknownSquareIcon() { if (unknownSquareIcon == null) { unknownSquareIcon = guiUtils.getResourceIcon(SQUARE_UNKNOWN); @@ -220,7 +220,7 @@ } @NotNull - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public ImageIcon getWarningSquareIcon() { if (warningSquareIcon == null) { final ImageFilter alphaFilter = AlphaImageFilterInstance.ALPHA_FILTER; @@ -235,7 +235,7 @@ } @NotNull - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public ImageIcon getNoFaceSquareIcon() { if (noFaceSquareIcon == null) { noFaceSquareIcon = guiUtils.getResourceIcon(SQUARE_NO_FACE); @@ -244,7 +244,7 @@ } @NotNull - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public ImageIcon getNoArchSquareIcon() { if (noArchSquareIcon == null) { noArchSquareIcon = guiUtils.getResourceIcon(SQUARE_NO_ARCH); @@ -253,7 +253,7 @@ } @NotNull - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public ImageIcon getMapSelectedIcon() { if (mapSelIcon == null) { mapSelIcon = guiUtils.getResourceIcon(SQUARE_SELECTED_SQUARE); @@ -262,7 +262,7 @@ } @NotNull - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public ImageIcon getMapSelectedIconNorth() { if (mapSelIconNorth == null) { mapSelIconNorth = guiUtils.getResourceIcon(SQUARE_SELECTED_SQUARE_NORTH); @@ -271,7 +271,7 @@ } @NotNull - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public ImageIcon getMapSelectedIconEast() { if (mapSelIconEast == null) { mapSelIconEast = guiUtils.getResourceIcon(SQUARE_SELECTED_SQUARE_EAST); @@ -280,7 +280,7 @@ } @NotNull - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public ImageIcon getMapSelectedIconSouth() { if (mapSelIconSouth == null) { mapSelIconSouth = guiUtils.getResourceIcon(SQUARE_SELECTED_SQUARE_SOUTH); @@ -289,7 +289,7 @@ } @NotNull - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public ImageIcon getMapSelectedIconWest() { if (mapSelIconWest == null) { mapSelIconWest = guiUtils.getResourceIcon(SQUARE_SELECTED_SQUARE_WEST); @@ -298,7 +298,7 @@ } @NotNull - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public ImageIcon getMapPreSelectedIcon() { if (mapPreSelIcon == null) { mapPreSelIcon = guiUtils.getResourceIcon(SQUARE_PRE_SELECTED_SQUARE); @@ -311,7 +311,7 @@ * @return the image */ @NotNull - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public Image getDefaultIcon() { if (defaultIcon == null) { final ImageIcon icon = guiUtils.getResourceIcon(DEFAULT_ICON); @@ -326,7 +326,7 @@ * @return the image */ @NotNull - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public Image getDefaultPreview() { if (defaultPreview == null) { final ImageIcon icon = guiUtils.getResourceIcon(DEFAULT_PREVIEW); @@ -337,7 +337,7 @@ } @NotNull - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public Icon getTreasureListIcon() { if (treasureListIcon == null) { treasureListIcon = guiUtils.getResourceIcon(TREASURE_LIST); @@ -346,7 +346,7 @@ } @NotNull - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public Icon getTreasureOneListIcon() { if (treasureOneListIcon == null) { treasureOneListIcon = guiUtils.getResourceIcon(TREASUREONE_LIST); @@ -355,7 +355,7 @@ } @NotNull - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public Icon getTreasureYesIcon() { if (treasureYesIcon == null) { treasureYesIcon = guiUtils.getResourceIcon(TREASURE_YES); @@ -364,7 +364,7 @@ } @NotNull - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public Icon getTreasureNoIcon() { if (treasureNoIcon == null) { treasureNoIcon = guiUtils.getResourceIcon(TREASURE_NO); @@ -373,7 +373,7 @@ } @NotNull - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public ImageIcon getCloseTabSmallIcon() { if (closeTabSmallIcon == null) { closeTabSmallIcon = guiUtils.getResourceIcon(CLOSE_TAB_SMALL_ICON); @@ -382,7 +382,7 @@ } @NotNull - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public Icon getAutoRunSmallIcon() { if (autoRunSmallIcon == null) { autoRunSmallIcon = guiUtils.getResourceIcon(AUTO_RUN_SMALL_ICON); @@ -391,7 +391,7 @@ } @NotNull - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public Icon getFilterSmallIcon() { if (filterSmallIcon == null) { filterSmallIcon = guiUtils.getResourceIcon(FILTER_SMALL_ICON); @@ -400,7 +400,7 @@ } @NotNull - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public Icon getRunPluginSmallIcon() { if (runPluginSmallIcon == null) { runPluginSmallIcon = guiUtils.getResourceIcon(RUN_PLUGIN_SMALL_ICON); @@ -413,7 +413,7 @@ * @return the icon or <code>null</code> if none is available */ @Nullable - @SuppressWarnings({ "NullableProblems" }) + @SuppressWarnings("NullableProblems") public ImageIcon getAppIcon() { if (appIcon == null) { appIcon = guiUtils.getResourceIcon(APP_ICON); Modified: trunk/utils/src/test/net/sf/gridarta/utils/Size2DTest.java =================================================================== --- trunk/utils/src/test/net/sf/gridarta/utils/Size2DTest.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/utils/src/test/net/sf/gridarta/utils/Size2DTest.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -26,7 +26,7 @@ * Test for {@link Size2D}. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ -@SuppressWarnings({ "FeatureEnvy" }) +@SuppressWarnings("FeatureEnvy") // This is a test. It has feature envy by definition. public class Size2DTest { Modified: trunk/utils/src/test/net/sf/gridarta/utils/WrappingStringBuilderTest.java =================================================================== --- trunk/utils/src/test/net/sf/gridarta/utils/WrappingStringBuilderTest.java 2011-06-13 20:39:59 UTC (rev 8898) +++ trunk/utils/src/test/net/sf/gridarta/utils/WrappingStringBuilderTest.java 2011-06-18 09:46:17 UTC (rev 8899) @@ -26,7 +26,7 @@ * Test for {@link WrappingStringBuilder}. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ -@SuppressWarnings({ "FeatureEnvy" }) +@SuppressWarnings("FeatureEnvy") public class WrappingStringBuilderTest { /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-06-13 20:40:06
|
Revision: 8898 http://gridarta.svn.sourceforge.net/gridarta/?rev=8898&view=rev Author: akirschbaum Date: 2011-06-13 20:39:59 +0000 (Mon, 13 Jun 2011) Log Message: ----------- Accelerate smoothing renderer. [Crossfire] Modified Paths: -------------- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/SmoothingRenderer.java Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/SmoothingRenderer.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/SmoothingRenderer.java 2011-06-11 08:50:45 UTC (rev 8897) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/SmoothingRenderer.java 2011-06-13 20:39:59 UTC (rev 8898) @@ -131,13 +131,13 @@ for (final net.sf.gridarta.model.gameobject.GameObject<GameObject, MapArchObject, Archetype> node : mapModel.getMapSquare(where)) { if (node.getAttributeInt("invisible", true) == 0) { currentLayer++; - } - if (currentLayer == layer) { - foundLayer = true; - if (node.getAttributeInt("smoothlevel", true) > 0) { - layerNode[deltaX + 1][deltaY + 1] = node; + if (currentLayer == layer) { + foundLayer = true; + if (node.getAttributeInt("smoothlevel", true) > 0) { + layerNode[deltaX + 1][deltaY + 1] = node; + } + break; } - break; } } } @@ -172,7 +172,6 @@ * for the lowest one (we draw from bottom to top!). */ final boolean[] partDone = { false, false, false, false, false, false, false, false, }; - final Point src = new Point(); while (true) { int lowest = -1; for (int i = 0; i < 8; i++) { @@ -185,6 +184,7 @@ /*here we know 'what' to smooth*/ break; } + final NamedObject smoothFace = sFaces[lowest]; /* we need to calculate the weight for border and weight for corners. * then we 'mark done' the corresponding squares */ @@ -192,7 +192,7 @@ int weight = 0; int weightC = 15; for (int i = 0; i < 8; i++) { /*check all nearby squares*/ - if (sLevels[i] == sLevels[lowest] && sFaces[i] == sFaces[lowest]) { + if (sLevels[i] == sLevels[lowest] && sFaces[i] == smoothFace) { partDone[i] = true; weight += bWeights[i]; weightC &= ~bcExclude[i]; @@ -200,12 +200,10 @@ /*must remove the weight of a corner if not in smoothing*/ weightC &= ~cWeights[i]; } - } - if (sFaces[lowest] == null) { + if (smoothFace == null) { continue; /*Can't smooth black*/ } - final NamedObject smoothFace = sFaces[lowest]; /* now, it's quite easy. We must draw using a 32x32 part of * the picture smooth face. * This part is located using the 2 weights calculated: @@ -213,14 +211,10 @@ */ final ImageIcon img = faceObjectProviders.getDisplayIcon(smoothFace); if (weight > 0) { - src.x = IGUIConstants.SQUARE_WIDTH * weight; - src.y = 0; - drawImage(graphics, x, y, borderOffsetX, borderOffsetY, src, img); + drawImage(graphics, x, y, borderOffsetX, borderOffsetY, IGUIConstants.SQUARE_WIDTH * weight, 0, img); } if (weightC > 0) { - src.x = IGUIConstants.SQUARE_WIDTH * weightC; - src.y = IGUIConstants.SQUARE_HEIGHT; - drawImage(graphics, x, y, borderOffsetX, borderOffsetY, src, img); + drawImage(graphics, x, y, borderOffsetX, borderOffsetY, IGUIConstants.SQUARE_WIDTH * weightC, IGUIConstants.SQUARE_HEIGHT, img); } } /*while there's some smooth to do*/ @@ -232,8 +226,8 @@ } } - private void drawImage(@NotNull final Graphics graphics, final int x, final int y, final int borderOffsetX, final int borderOffsetY, @NotNull final Point src, @NotNull final ImageIcon img) { - graphics.drawImage(img.getImage(), borderOffsetX + x * IGUIConstants.SQUARE_WIDTH, borderOffsetY + y * IGUIConstants.SQUARE_HEIGHT, borderOffsetX + x * IGUIConstants.SQUARE_WIDTH + IGUIConstants.SQUARE_WIDTH, borderOffsetY + y * IGUIConstants.SQUARE_HEIGHT + IGUIConstants.SQUARE_HEIGHT, src.x, src.y, src.x + IGUIConstants.SQUARE_WIDTH, src.y + IGUIConstants.SQUARE_HEIGHT, null); + private void drawImage(@NotNull final Graphics graphics, final int x, final int y, final int borderOffsetX, final int borderOffsetY, final int srcX, final int srcY, @NotNull final ImageIcon img) { + graphics.drawImage(img.getImage(), borderOffsetX + x * IGUIConstants.SQUARE_WIDTH, borderOffsetY + y * IGUIConstants.SQUARE_HEIGHT, borderOffsetX + x * IGUIConstants.SQUARE_WIDTH + IGUIConstants.SQUARE_WIDTH, borderOffsetY + y * IGUIConstants.SQUARE_HEIGHT + IGUIConstants.SQUARE_HEIGHT, srcX, srcY, srcX + IGUIConstants.SQUARE_WIDTH, srcY + IGUIConstants.SQUARE_HEIGHT, null); } } // class SmoothingRenderer This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-06-11 08:50:51
|
Revision: 8897 http://gridarta.svn.sourceforge.net/gridarta/?rev=8897&view=rev Author: akirschbaum Date: 2011-06-11 08:50:45 +0000 (Sat, 11 Jun 2011) Log Message: ----------- Skip test in headless mode. Modified Paths: -------------- trunk/src/test/net/sf/gridarta/actions/UndoActionsTest.java Modified: trunk/src/test/net/sf/gridarta/actions/UndoActionsTest.java =================================================================== --- trunk/src/test/net/sf/gridarta/actions/UndoActionsTest.java 2011-06-10 20:04:42 UTC (rev 8896) +++ trunk/src/test/net/sf/gridarta/actions/UndoActionsTest.java 2011-06-11 08:50:45 UTC (rev 8897) @@ -19,6 +19,7 @@ package net.sf.gridarta.actions; +import java.awt.GraphicsEnvironment; import java.awt.Point; import net.sf.gridarta.gui.undo.UndoControl; import net.sf.gridarta.model.archetype.DuplicateArchetypeException; @@ -55,6 +56,10 @@ */ @Test public void testInsert1() throws CannotInsertGameObjectException, DuplicateArchetypeException, IllegalAutojoinListException { + if (GraphicsEnvironment.isHeadless()) { + return; + } + final TestMapControlCreator mapControlCreator = new TestMapControlCreator(); final TestMapModelCreator mapModelCreator = mapControlCreator.getMapModelCreator(); final AutojoinListsHelper autojoinListsHelper = mapControlCreator.newAutojoinListsHelper(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-06-10 20:04:49
|
Revision: 8896 http://gridarta.svn.sourceforge.net/gridarta/?rev=8896&view=rev Author: akirschbaum Date: 2011-06-10 20:04:42 +0000 (Fri, 10 Jun 2011) Log Message: ----------- Add XML file parse errors to error dialog box. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/crossfire/ChangeLog trunk/daimonin/ChangeLog trunk/src/app/net/sf/gridarta/maincontrol/DefaultMainControl.java Added Paths: ----------- trunk/model/src/app/net/sf/gridarta/model/errorview/ErrorViewCollectorErrorHandler.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2011-06-10 19:50:50 UTC (rev 8895) +++ trunk/atrinik/ChangeLog 2011-06-10 20:04:42 UTC (rev 8896) @@ -1,5 +1,7 @@ 2011-06-10 Andreas Kirschbaum + * Add XML file parse errors to error dialog box. + * Fix collection sometimes creating broken atrinik.0 file. 2011-05-22 Andreas Kirschbaum Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2011-06-10 19:50:50 UTC (rev 8895) +++ trunk/crossfire/ChangeLog 2011-06-10 20:04:42 UTC (rev 8896) @@ -1,5 +1,7 @@ 2011-06-10 Andreas Kirschbaum + * Add XML file parse errors to error dialog box. + * Fix collection sometimes creating broken crossfire.0 file. 2011-05-22 Andreas Kirschbaum Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2011-06-10 19:50:50 UTC (rev 8895) +++ trunk/daimonin/ChangeLog 2011-06-10 20:04:42 UTC (rev 8896) @@ -1,5 +1,7 @@ 2011-06-10 Andreas Kirschbaum + * Add XML file parse errors to error dialog box. + * Fix collection sometimes creating broken daimonin.0 file. 2011-05-22 Andreas Kirschbaum Added: trunk/model/src/app/net/sf/gridarta/model/errorview/ErrorViewCollectorErrorHandler.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/errorview/ErrorViewCollectorErrorHandler.java (rev 0) +++ trunk/model/src/app/net/sf/gridarta/model/errorview/ErrorViewCollectorErrorHandler.java 2011-06-10 20:04:42 UTC (rev 8896) @@ -0,0 +1,83 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.model.errorview; + +import org.jetbrains.annotations.NotNull; +import org.xml.sax.ErrorHandler; +import org.xml.sax.SAXException; +import org.xml.sax.SAXParseException; + +/** + * An {@link ErrorHandler} that adds all reported problems to an {@link + * ErrorViewCollector} instance. + * @author Andreas Kirschbaum + */ +public class ErrorViewCollectorErrorHandler implements ErrorHandler { + + /** + * The {@link ErrorViewCollector} instance for adding messages. + */ + @NotNull + private final ErrorViewCollector errorViewCollector; + + /** + * The {@link ErrorViewCategory} to use when adding messages to {@link + * #errorViewCollector}. + */ + @NotNull + private final ErrorViewCategory errorViewCategory; + + /** + * Creates a new instance. + * @param errorViewCollector the error view collector instance for adding + * messages + * @param errorViewCategory the error view category to use when adding + * messages to <code>errorViewCollector</code> + */ + public ErrorViewCollectorErrorHandler(@NotNull final ErrorViewCollector errorViewCollector, @NotNull final ErrorViewCategory errorViewCategory) { + this.errorViewCollector = errorViewCollector; + this.errorViewCategory = errorViewCategory; + } + + /** + * {@inheritDoc} + */ + @Override + public void warning(final SAXParseException exception) throws SAXException { + errorViewCollector.addWarning(errorViewCategory, exception.getMessage()); + } + + /** + * {@inheritDoc} + */ + @Override + public void error(final SAXParseException exception) throws SAXException { + errorViewCollector.addError(errorViewCategory, exception.getMessage()); + } + + /** + * {@inheritDoc} + */ + @Override + public void fatalError(final SAXParseException exception) throws SAXException { + errorViewCollector.addError(errorViewCategory, exception.getMessage()); + } + +} // class ErrorViewCollectorErrorHandler Property changes on: trunk/model/src/app/net/sf/gridarta/model/errorview/ErrorViewCollectorErrorHandler.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Modified: trunk/src/app/net/sf/gridarta/maincontrol/DefaultMainControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/DefaultMainControl.java 2011-06-10 19:50:50 UTC (rev 8895) +++ trunk/src/app/net/sf/gridarta/maincontrol/DefaultMainControl.java 2011-06-10 20:04:42 UTC (rev 8896) @@ -30,6 +30,7 @@ import java.util.regex.Pattern; import javax.swing.ImageIcon; import javax.swing.filechooser.FileFilter; +import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.ParserConfigurationException; import net.sf.gridarta.gui.archetypetype.ArchetypeTypeChecks; import net.sf.gridarta.gui.filter.FilterControl; @@ -57,6 +58,7 @@ import net.sf.gridarta.model.errorview.ErrorView; import net.sf.gridarta.model.errorview.ErrorViewCategory; import net.sf.gridarta.model.errorview.ErrorViewCollector; +import net.sf.gridarta.model.errorview.ErrorViewCollectorErrorHandler; import net.sf.gridarta.model.face.FaceObjectProviders; import net.sf.gridarta.model.face.FaceObjects; import net.sf.gridarta.model.gameobject.GameObject; @@ -188,12 +190,18 @@ throw new MissingResourceException("Cannot create XML parser: " + ex.getMessage(), null, null); } final AttributeRangeChecker<G, A, R> attributeRangeChecker = new AttributeRangeChecker<G, A, R>(validatorPreferences); - final GameObjectMatchersParser gameObjectMatchersParser = new GameObjectMatchersParser(xmlHelper.getDocumentBuilder(), xmlHelper.getXPath()); + final DocumentBuilder documentBuilder = xmlHelper.getDocumentBuilder(); try { final URL url = IOUtils.getResource(globalSettings.getConfigurationDirectory(), "GameObjectMatchers.xml"); final ErrorViewCollector gameObjectMatchersErrorViewCollector = new ErrorViewCollector(errorView, url); try { - gameObjectMatchersParser.readGameObjectMatchers(url, gameObjectMatchers, gameObjectMatchersErrorViewCollector); + documentBuilder.setErrorHandler(new ErrorViewCollectorErrorHandler(gameObjectMatchersErrorViewCollector, ErrorViewCategory.GAMEOBJECTMATCHERS_FILE_INVALID)); + try { + final GameObjectMatchersParser gameObjectMatchersParser = new GameObjectMatchersParser(documentBuilder, xmlHelper.getXPath()); + gameObjectMatchersParser.readGameObjectMatchers(url, gameObjectMatchers, gameObjectMatchersErrorViewCollector); + } finally { + documentBuilder.setErrorHandler(null); + } } catch (final IOException ex) { gameObjectMatchersErrorViewCollector.addWarning(ErrorViewCategory.GAMEOBJECTMATCHERS_FILE_INVALID, ex.getMessage()); } @@ -225,8 +233,13 @@ try { final InputStream inputStream = url.openStream(); try { - final Document specialTreasureListsDocument = xmlHelper.getDocumentBuilder().parse(new InputSource(inputStream)); - specialTreasureLists = TreasureListsParser.parseTreasureLists(specialTreasureListsDocument); + documentBuilder.setErrorHandler(new ErrorViewCollectorErrorHandler(treasureListsErrorViewCollector, ErrorViewCategory.TREASURES_FILE_INVALID)); + try { + final Document specialTreasureListsDocument = documentBuilder.parse(new InputSource(inputStream)); + specialTreasureLists = TreasureListsParser.parseTreasureLists(specialTreasureListsDocument); + } finally { + documentBuilder.setErrorHandler(null); + } } finally { inputStream.close(); } @@ -246,12 +259,17 @@ final ArchetypeAttributeFactory archetypeAttributeFactory = new DefaultArchetypeAttributeFactory(); final ArchetypeAttributeParser archetypeAttributeParser = new ArchetypeAttributeParser(archetypeAttributeFactory); final ArchetypeTypeParser archetypeTypeParser = new ArchetypeTypeParser(archetypeAttributeParser); - final ArchetypeTypeSetParser archetypeTypeSetParser = new ArchetypeTypeSetParser(xmlHelper.getDocumentBuilder(), archetypeTypeSet, archetypeTypeParser); ArchetypeTypeList eventTypeSet = null; try { final URL url = IOUtils.getResource(globalSettings.getConfigurationDirectory(), CommonConstants.TYPEDEF_FILE); final ErrorViewCollector typesErrorViewCollector = new ErrorViewCollector(errorView, url); - archetypeTypeSetParser.loadTypesFromXML(typesErrorViewCollector, new InputSource(url.toString())); + documentBuilder.setErrorHandler(new ErrorViewCollectorErrorHandler(typesErrorViewCollector, ErrorViewCategory.GAMEOBJECTMATCHERS_FILE_INVALID)); + try { + final ArchetypeTypeSetParser archetypeTypeSetParser = new ArchetypeTypeSetParser(documentBuilder, archetypeTypeSet, archetypeTypeParser); + archetypeTypeSetParser.loadTypesFromXML(typesErrorViewCollector, new InputSource(url.toString())); + } finally { + documentBuilder.setErrorHandler(null); + } final ArchetypeTypeList eventTypeSetTmp = archetypeTypeSet.getList("event"); if (eventTypeSetTmp == null) { typesErrorViewCollector.addWarning(ErrorViewCategory.TYPES_ENTRY_INVALID, "list 'list_event' does not exist"); @@ -298,7 +316,12 @@ try { final URL url = IOUtils.getResource(globalSettings.getConfigurationDirectory(), spellFile); final ErrorViewCollector errorViewCollector = new ErrorViewCollector(errorView, url); - XMLSpellLoader.load(errorViewCollector, url, xmlHelper.getDocumentBuilder(), numberSpells); + documentBuilder.setErrorHandler(new ErrorViewCollectorErrorHandler(errorViewCollector, ErrorViewCategory.SPELLS_FILE_INVALID)); + try { + XMLSpellLoader.load(errorViewCollector, url, xmlHelper.getDocumentBuilder(), numberSpells); + } finally { + documentBuilder.setErrorHandler(null); + } } catch (final FileNotFoundException ex) { errorView.addWarning(ErrorViewCategory.SPELLS_FILE_INVALID, spellFile + ": " + ex.getMessage()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-06-10 19:50:57
|
Revision: 8895 http://gridarta.svn.sourceforge.net/gridarta/?rev=8895&view=rev Author: akirschbaum Date: 2011-06-10 19:50:50 +0000 (Fri, 10 Jun 2011) Log Message: ----------- Move ErrorViewCollector creation from XMLSpellLoader to DefaultMainControl. Modified Paths: -------------- trunk/model/src/app/net/sf/gridarta/model/spells/XMLSpellLoader.java trunk/src/app/net/sf/gridarta/maincontrol/DefaultMainControl.java Modified: trunk/model/src/app/net/sf/gridarta/model/spells/XMLSpellLoader.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/spells/XMLSpellLoader.java 2011-06-10 19:24:21 UTC (rev 8894) +++ trunk/model/src/app/net/sf/gridarta/model/spells/XMLSpellLoader.java 2011-06-10 19:50:50 UTC (rev 8895) @@ -19,16 +19,12 @@ package net.sf.gridarta.model.spells; -import java.io.File; -import java.io.FileNotFoundException; import java.io.IOException; import java.net.URL; import java.util.Iterator; import javax.xml.parsers.DocumentBuilder; -import net.sf.gridarta.model.errorview.ErrorView; import net.sf.gridarta.model.errorview.ErrorViewCategory; import net.sf.gridarta.model.errorview.ErrorViewCollector; -import net.sf.gridarta.utils.IOUtils; import net.sf.japi.xml.NodeListIterator; import org.apache.log4j.Category; import org.apache.log4j.Logger; @@ -58,57 +54,50 @@ /** * Load an XML spell definitions file. - * @param errorView the error view for reporting errors - * @param baseDir the base directory of <code>filename</code> - * @param filename the file name of the spell definitions file + * @param errorViewCollector the error view collector for reporting errors + * @param url the URL of the spell definitions file * @param documentBuilder the Document Builder to use for parsing * @param spells the <code>Spells</code> instance to add the spells to */ - public static void load(@NotNull final ErrorView errorView, @NotNull final File baseDir, @NotNull final String filename, @NotNull final DocumentBuilder documentBuilder, @NotNull final Spells<NumberSpell> spells) { + public static void load(@NotNull final ErrorViewCollector errorViewCollector, @NotNull final URL url, @NotNull final DocumentBuilder documentBuilder, @NotNull final Spells<NumberSpell> spells) { try { - final URL url = IOUtils.getResource(baseDir, filename); - final ErrorViewCollector errorViewCollector = new ErrorViewCollector(errorView, url); - try { - final Document doc = documentBuilder.parse(new InputSource(url.toString())); + final Document doc = documentBuilder.parse(new InputSource(url.toString())); - // retrieve the spell data from the xml - final Element root = doc.getDocumentElement(); - if (root == null || !"spells".equalsIgnoreCase(root.getNodeName())) { - errorViewCollector.addWarning(ErrorViewCategory.SPELLS_ENTRY_INVALID, "root element 'spells' is missing"); - } else { - // initialize array with appropriate size - int numSpells = 0; - final Iterator<Element> it = new NodeListIterator<Element>(root, "spell"); - while (it.hasNext()) { - final Element spellElem = it.next(); - if (spellElem.getAttribute("id") == null) { - errorViewCollector.addWarning(ErrorViewCategory.SPELLS_ENTRY_INVALID, "found 'spell' element without 'id'"); - } else if (spellElem.getAttribute("name") == null) { - errorViewCollector.addWarning(ErrorViewCategory.SPELLS_ENTRY_INVALID, "found 'spell' element without 'name'"); - } else { - try { - // parse spell number and -name - spells.add(new NumberSpell(spellElem.getAttribute("name").trim(), Integer.parseInt(spellElem.getAttribute("id")))); - numSpells++; - } catch (final NumberFormatException ignored) { - errorViewCollector.addWarning(ErrorViewCategory.SPELLS_ENTRY_INVALID, "parsing error: spell id '" + spellElem.getAttribute("id") + "' is not an integer."); - } + // retrieve the spell data from the xml + final Element root = doc.getDocumentElement(); + if (root == null || !"spells".equalsIgnoreCase(root.getNodeName())) { + errorViewCollector.addWarning(ErrorViewCategory.SPELLS_ENTRY_INVALID, "root element 'spells' is missing"); + } else { + // initialize array with appropriate size + int numSpells = 0; + final Iterator<Element> it = new NodeListIterator<Element>(root, "spell"); + while (it.hasNext()) { + final Element spellElem = it.next(); + if (spellElem.getAttribute("id") == null) { + errorViewCollector.addWarning(ErrorViewCategory.SPELLS_ENTRY_INVALID, "found 'spell' element without 'id'"); + } else if (spellElem.getAttribute("name") == null) { + errorViewCollector.addWarning(ErrorViewCategory.SPELLS_ENTRY_INVALID, "found 'spell' element without 'name'"); + } else { + try { + // parse spell number and -name + spells.add(new NumberSpell(spellElem.getAttribute("name").trim(), Integer.parseInt(spellElem.getAttribute("id")))); + numSpells++; + } catch (final NumberFormatException ignored) { + errorViewCollector.addWarning(ErrorViewCategory.SPELLS_ENTRY_INVALID, "parsing error: spell id '" + spellElem.getAttribute("id") + "' is not an integer."); } } + } - // loading successful - log.info("Loaded " + numSpells + " defined spells from '" + url + "'"); - if (numSpells == 0) { - errorViewCollector.addWarning(ErrorViewCategory.SPELLS_FILE_INVALID, "no content"); - } + // loading successful + log.info("Loaded " + numSpells + " defined spells from '" + url + "'"); + if (numSpells == 0) { + errorViewCollector.addWarning(ErrorViewCategory.SPELLS_FILE_INVALID, "no content"); } - } catch (final SAXException ex) { - errorViewCollector.addWarning(ErrorViewCategory.SPELLS_FILE_INVALID, "parsing error:" + ex.getMessage()); - } catch (final IOException ex) { - errorViewCollector.addWarning(ErrorViewCategory.SPELLS_FILE_INVALID, ex.getMessage()); } - } catch (final FileNotFoundException ex) { - errorView.addWarning(ErrorViewCategory.SPELLS_FILE_INVALID, filename + ": " + ex.getMessage()); + } catch (final SAXException ex) { + errorViewCollector.addWarning(ErrorViewCategory.SPELLS_FILE_INVALID, "parsing error:" + ex.getMessage()); + } catch (final IOException ex) { + errorViewCollector.addWarning(ErrorViewCategory.SPELLS_FILE_INVALID, ex.getMessage()); } } Modified: trunk/src/app/net/sf/gridarta/maincontrol/DefaultMainControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/DefaultMainControl.java 2011-06-10 19:24:21 UTC (rev 8894) +++ trunk/src/app/net/sf/gridarta/maincontrol/DefaultMainControl.java 2011-06-10 19:50:50 UTC (rev 8895) @@ -295,7 +295,13 @@ gameObjectSpells.sort(); } if (spellFile != null) { - XMLSpellLoader.load(errorView, globalSettings.getConfigurationDirectory(), spellFile, xmlHelper.getDocumentBuilder(), numberSpells); + try { + final URL url = IOUtils.getResource(globalSettings.getConfigurationDirectory(), spellFile); + final ErrorViewCollector errorViewCollector = new ErrorViewCollector(errorView, url); + XMLSpellLoader.load(errorViewCollector, url, xmlHelper.getDocumentBuilder(), numberSpells); + } catch (final FileNotFoundException ex) { + errorView.addWarning(ErrorViewCategory.SPELLS_FILE_INVALID, spellFile + ": " + ex.getMessage()); + } numberSpells.sort(); } final File scriptsFile = new File(globalSettings.getMapsDirectory(), scriptsDir); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-06-10 19:24:28
|
Revision: 8894 http://gridarta.svn.sourceforge.net/gridarta/?rev=8894&view=rev Author: akirschbaum Date: 2011-06-10 19:24:21 +0000 (Fri, 10 Jun 2011) Log Message: ----------- Fix collection sometimes creating broken atrinik/crossfire/daimonin.0 file. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/crossfire/ChangeLog trunk/daimonin/ChangeLog trunk/model/src/app/net/sf/gridarta/model/face/DefaultFaceObjects.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2011-06-10 19:23:03 UTC (rev 8893) +++ trunk/atrinik/ChangeLog 2011-06-10 19:24:21 UTC (rev 8894) @@ -1,3 +1,7 @@ +2011-06-10 Andreas Kirschbaum + + * Fix collection sometimes creating broken atrinik.0 file. + 2011-05-22 Andreas Kirschbaum * Fix crash in --singlepng command-line option. Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2011-06-10 19:23:03 UTC (rev 8893) +++ trunk/crossfire/ChangeLog 2011-06-10 19:24:21 UTC (rev 8894) @@ -1,3 +1,7 @@ +2011-06-10 Andreas Kirschbaum + + * Fix collection sometimes creating broken crossfire.0 file. + 2011-05-22 Andreas Kirschbaum * Fix crash in --singlepng command-line option. Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2011-06-10 19:23:03 UTC (rev 8893) +++ trunk/daimonin/ChangeLog 2011-06-10 19:24:21 UTC (rev 8894) @@ -1,3 +1,7 @@ +2011-06-10 Andreas Kirschbaum + + * Fix collection sometimes creating broken daimonin.0 file. + 2011-05-22 Andreas Kirschbaum * Fix crash in --singlepng command-line option. Modified: trunk/model/src/app/net/sf/gridarta/model/face/DefaultFaceObjects.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/face/DefaultFaceObjects.java 2011-06-10 19:23:03 UTC (rev 8893) +++ trunk/model/src/app/net/sf/gridarta/model/face/DefaultFaceObjects.java 2011-06-10 19:24:21 UTC (rev 8894) @@ -30,10 +30,11 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStreamWriter; -import java.io.PrintStream; import java.io.Reader; import java.net.URL; +import java.nio.ByteBuffer; import java.nio.channels.FileChannel; +import java.nio.charset.Charset; import java.util.regex.Matcher; import java.util.regex.Pattern; import net.sf.gridarta.model.archetype.Archetype; @@ -121,40 +122,40 @@ try { final FileChannel outChannel = fos.getChannel(); try { - final PrintStream binFile = new PrintStream(fos); - try { - final int numOfFaceObjects = size(); - progress.setLabel(ActionBuilderUtils.getString(ACTION_BUILDER, "archCollectImages"), numOfFaceObjects); - int i = 0; - for (final FaceObject faceObject : this) { - final String face = faceObject.getFaceName(); - final String path = archFaceProvider.getFilename(face); + final int numOfFaceObjects = size(); + progress.setLabel(ActionBuilderUtils.getString(ACTION_BUILDER, "archCollectImages"), numOfFaceObjects); + final ByteBuffer byteBuffer = ByteBuffer.allocate(1024); + final Charset charset = Charset.forName("ISO-8859-1"); + int i = 0; + for (final FaceObject faceObject : this) { + final String face = faceObject.getFaceName(); + final String path = archFaceProvider.getFilename(face); + try { + final FileInputStream fin = new FileInputStream(path); try { - final FileInputStream fin = new FileInputStream(path); - try { - final FileChannel inChannel = fin.getChannel(); - final long imageSize = inChannel.size(); - binFile.format("IMAGE %d %d %s\n", i, imageSize, face); - inChannel.transferTo(0L, imageSize, outChannel); - } finally { - fin.close(); - } - } catch (final FileNotFoundException ignored) { - ACTION_BUILDER.showMessageDialog(progress.getParentComponent(), "archCollectErrorFileNotFound", path); - return; - } catch (final IOException e) { - ACTION_BUILDER.showMessageDialog(progress.getParentComponent(), "archCollectErrorIOException", path, e); - return; + final FileChannel inChannel = fin.getChannel(); + final long imageSize = inChannel.size(); + byteBuffer.clear(); + byteBuffer.put(("IMAGE " + i + " " + imageSize + " " + face + "\n").getBytes(charset)); + byteBuffer.flip(); + outChannel.write(byteBuffer); + inChannel.transferTo(0L, imageSize, outChannel); + } finally { + fin.close(); } + } catch (final FileNotFoundException ignored) { + ACTION_BUILDER.showMessageDialog(progress.getParentComponent(), "archCollectErrorFileNotFound", path); + return; + } catch (final IOException e) { + ACTION_BUILDER.showMessageDialog(progress.getParentComponent(), "archCollectErrorIOException", path, e); + return; + } - if (i++ % 100 == 0) { - progress.setValue(i); - } + if (i++ % 100 == 0) { + progress.setValue(i); } - progress.setValue(size()); // finished - } finally { - binFile.close(); } + progress.setValue(size()); // finished } finally { outChannel.close(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-06-10 19:23:09
|
Revision: 8893 http://gridarta.svn.sourceforge.net/gridarta/?rev=8893&view=rev Author: akirschbaum Date: 2011-06-10 19:23:03 +0000 (Fri, 10 Jun 2011) Log Message: ----------- Fix incorrect @NotNull annotation. Modified Paths: -------------- trunk/model/src/app/net/sf/gridarta/model/mapmodel/InsertionModeSet.java Modified: trunk/model/src/app/net/sf/gridarta/model/mapmodel/InsertionModeSet.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/mapmodel/InsertionModeSet.java 2011-05-22 17:34:23 UTC (rev 8892) +++ trunk/model/src/app/net/sf/gridarta/model/mapmodel/InsertionModeSet.java 2011-06-10 19:23:03 UTC (rev 8893) @@ -72,7 +72,7 @@ * @param belowFloorGameObjectMatcher the game object matcher for selecting * below floor game objects */ - public InsertionModeSet(@NotNull final InsertionMode<G, A, R> topmostInsertionMode, @Nullable final GameObjectMatcher floorGameObjectMatcher, @NotNull final GameObjectMatcher wallGameObjectMatcher, @NotNull final GameObjectMatcher belowFloorGameObjectMatcher) { + public InsertionModeSet(@NotNull final InsertionMode<G, A, R> topmostInsertionMode, @Nullable final GameObjectMatcher floorGameObjectMatcher, @Nullable final GameObjectMatcher wallGameObjectMatcher, @Nullable final GameObjectMatcher belowFloorGameObjectMatcher) { this.topmostInsertionMode = topmostInsertionMode; autoInsertionMode = new AutoInsertionMode<G, A, R>(floorGameObjectMatcher, wallGameObjectMatcher, belowFloorGameObjectMatcher); aboveFloorInsertionMode = new AboveFloorInsertionMode<G, A, R>(floorGameObjectMatcher); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-05-22 17:34:30
|
Revision: 8892 http://gridarta.svn.sourceforge.net/gridarta/?rev=8892&view=rev Author: akirschbaum Date: 2011-05-22 17:34:23 +0000 (Sun, 22 May 2011) Log Message: ----------- Fix crash in --singlepng command-line option. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/crossfire/ChangeLog trunk/daimonin/ChangeLog trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java trunk/src/app/net/sf/gridarta/maincontrol/ImageCreatorFactory.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2011-05-22 17:31:35 UTC (rev 8891) +++ trunk/atrinik/ChangeLog 2011-05-22 17:34:23 UTC (rev 8892) @@ -1,3 +1,7 @@ +2011-05-22 Andreas Kirschbaum + + * Fix crash in --singlepng command-line option. + 2011-03-29 Andreas Kirschbaum * Retain "z" attribute value of bottom-most game object when Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2011-05-22 17:31:35 UTC (rev 8891) +++ trunk/crossfire/ChangeLog 2011-05-22 17:34:23 UTC (rev 8892) @@ -1,3 +1,7 @@ +2011-05-22 Andreas Kirschbaum + + * Fix crash in --singlepng command-line option. + 2011-03-22 Andreas Kirschbaum * Allow map paths starting with /random/. Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2011-05-22 17:31:35 UTC (rev 8891) +++ trunk/daimonin/ChangeLog 2011-05-22 17:34:23 UTC (rev 8892) @@ -1,3 +1,7 @@ +2011-05-22 Andreas Kirschbaum + + * Fix crash in --singlepng command-line option. + 2011-03-22 Andreas Kirschbaum * Allow map paths starting with /random/. Modified: trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java 2011-05-22 17:31:35 UTC (rev 8891) +++ trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java 2011-05-22 17:34:23 UTC (rev 8892) @@ -296,7 +296,7 @@ break; case BATCH_PNG: - returnCode = new BatchPngCommand(args2, new ImageCreatorFactory<G, A, R>(systemIcons).newImageCreator(editorFactory)).execute(); + returnCode = new BatchPngCommand(args2, new ImageCreatorFactory<G, A, R>(systemIcons).newImageCreator(editorFactory, faceObjectProviders, animationObjects, archetypeSet)).execute(); break; case SINGLE_PNG: @@ -304,7 +304,7 @@ throw new SyntaxErrorException("input output"); } - returnCode = new SinglePngCommand(new File(args2.get(0)), new File(args2.get(1)), new ImageCreatorFactory<G, A, R>(systemIcons).newImageCreator(editorFactory)).execute(); + returnCode = new SinglePngCommand(new File(args2.get(0)), new File(args2.get(1)), new ImageCreatorFactory<G, A, R>(systemIcons).newImageCreator(editorFactory, faceObjectProviders, animationObjects, archetypeSet)).execute(); break; case COLLECT_ARCHES: Modified: trunk/src/app/net/sf/gridarta/maincontrol/ImageCreatorFactory.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/ImageCreatorFactory.java 2011-05-22 17:31:35 UTC (rev 8891) +++ trunk/src/app/net/sf/gridarta/maincontrol/ImageCreatorFactory.java 2011-05-22 17:34:23 UTC (rev 8892) @@ -27,16 +27,13 @@ import net.sf.gridarta.gui.map.renderer.RendererFactory; import net.sf.gridarta.model.anim.AnimationObjects; import net.sf.gridarta.model.archetype.Archetype; -import net.sf.gridarta.model.archetype.ArchetypeFactory; import net.sf.gridarta.model.archetype.ArchetypeSet; import net.sf.gridarta.model.archetypechooser.ArchetypeChooserModel; import net.sf.gridarta.model.archetypetype.ArchetypeTypeSet; import net.sf.gridarta.model.autojoin.AutojoinLists; import net.sf.gridarta.model.configsource.ConfigSourceFactory; import net.sf.gridarta.model.configsource.DefaultConfigSourceFactory; -import net.sf.gridarta.model.face.ArchFaceProvider; import net.sf.gridarta.model.face.FaceObjectProviders; -import net.sf.gridarta.model.face.FaceObjects; import net.sf.gridarta.model.filter.NamedFilter; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.gameobject.GameObjectFactory; @@ -86,23 +83,20 @@ /** * Creates a new {@link ImageCreator} instance. * @param editorFactory the editor factory to use + * @param faceObjectProviders the face object providers to use + * @param animationObjects the animation objects to use + * @param archetypeSet the archetype set to use * @return the new instance */ @NotNull - public ImageCreator<G, A, R> newImageCreator(@NotNull final EditorFactory<G, A, R> editorFactory) { + public ImageCreator<G, A, R> newImageCreator(@NotNull final EditorFactory<G, A, R> editorFactory, @NotNull final FaceObjectProviders faceObjectProviders, @NotNull final AnimationObjects<G, A, R> animationObjects, @NotNull final ArchetypeSet<G, A, R> archetypeSet) { final ConfigSourceFactory configSourceFactory = new DefaultConfigSourceFactory(); final GlobalSettings globalSettings = editorFactory.newGlobalSettings(configSourceFactory); final MapArchObjectFactory<A> mapArchObjectFactory = editorFactory.newMapArchObjectFactory(globalSettings); final MapArchObjectParserFactory<A> mapArchObjectParserFactory = editorFactory.newMapArchObjectParserFactory(); - final ArchFaceProvider archFaceProvider = new ArchFaceProvider(); - final FaceObjects<G, A, R> faceObjects = editorFactory.createFaceObjects(archFaceProvider); - final FaceObjectProviders faceObjectProviders = new FaceObjectProviders(0, faceObjects, systemIcons); - final AnimationObjects<G, A, R> animationObjects = editorFactory.newAnimationObjects(); final ArchetypeTypeSet archetypeTypeSet = new ArchetypeTypeSet(); final GameObjectFactory<G, A, R> gameObjectFactory = editorFactory.newGameObjectFactory(faceObjectProviders, animationObjects, archetypeTypeSet); final GameObjectMatchers gameObjectMatchers = new GameObjectMatchers(); - final ArchetypeFactory<G, A, R> archetypeFactory = editorFactory.newArchetypeFactory(faceObjectProviders, animationObjects); - final ArchetypeSet<G, A, R> archetypeSet = editorFactory.newArchetypeSet(globalSettings, archetypeFactory, faceObjectProviders); final GameObjectParserFactory<G, A, R> gameObjectParserFactory = editorFactory.newGameObjectParserFactory(gameObjectFactory, archetypeSet); final GameObjectParser<G, A, R> gameObjectParser = gameObjectParserFactory.newGameObjectParser(); final MapViewSettings mapViewSettings = new DefaultMapViewSettings(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-05-22 17:31:41
|
Revision: 8891 http://gridarta.svn.sourceforge.net/gridarta/?rev=8891&view=rev Author: akirschbaum Date: 2011-05-22 17:31:35 +0000 (Sun, 22 May 2011) Log Message: ----------- Add missing @NotNull annotation. Modified Paths: -------------- trunk/model/src/app/net/sf/gridarta/model/data/AbstractNamedObjects.java Modified: trunk/model/src/app/net/sf/gridarta/model/data/AbstractNamedObjects.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/data/AbstractNamedObjects.java 2011-04-07 20:18:30 UTC (rev 8890) +++ trunk/model/src/app/net/sf/gridarta/model/data/AbstractNamedObjects.java 2011-05-22 17:31:35 UTC (rev 8891) @@ -90,7 +90,7 @@ * @param object AbstractNamedObject to store * @throws IllegalNamedObjectException if the named object cannot be added */ - protected void put(final E object) throws IllegalNamedObjectException { + protected void put(@NotNull final E object) throws IllegalNamedObjectException { objectMap.put(object.getName(), object); treeRoot.append(object); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-04-07 20:18:36
|
Revision: 8890 http://gridarta.svn.sourceforge.net/gridarta/?rev=8890&view=rev Author: akirschbaum Date: 2011-04-07 20:18:30 +0000 (Thu, 07 Apr 2011) Log Message: ----------- Add public modifier. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareView.java Modified: trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareView.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareView.java 2011-03-29 20:01:53 UTC (rev 8889) +++ trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareView.java 2011-04-07 20:18:30 UTC (rev 8890) @@ -449,7 +449,7 @@ * @param e the mouse event containing the position to check * @return the selected list index */ - int getListIndex(@NotNull final MouseEvent e) { + public int getListIndex(@NotNull final MouseEvent e) { final int lastIndex = getModelSize() - 1; if (lastIndex < 0) { return 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-03-29 20:01:59
|
Revision: 8889 http://gridarta.svn.sourceforge.net/gridarta/?rev=8889&view=rev Author: akirschbaum Date: 2011-03-29 20:01:53 +0000 (Tue, 29 Mar 2011) Log Message: ----------- Reduce size of new map dialog. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/newmap/AbstractNewMapDialog.java Modified: trunk/src/app/net/sf/gridarta/gui/newmap/AbstractNewMapDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/newmap/AbstractNewMapDialog.java 2011-03-29 19:37:39 UTC (rev 8888) +++ trunk/src/app/net/sf/gridarta/gui/newmap/AbstractNewMapDialog.java 2011-03-29 20:01:53 UTC (rev 8889) @@ -26,7 +26,6 @@ import java.awt.event.FocusEvent; import java.awt.event.FocusListener; import java.util.prefs.Preferences; -import javax.swing.Box; import javax.swing.BoxLayout; import javax.swing.JButton; import javax.swing.JDialog; @@ -160,13 +159,10 @@ panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); panel.setBorder(GUIConstants.DIALOG_BORDER); panel.add(createMapNamePanel()); - panel.add(Box.createVerticalStrut(5)); - panel.add(Box.createVerticalStrut(5)); final Component parametersPanel = createMapParametersPanel(); if (parametersPanel != null) { panel.add(parametersPanel); } - panel.add(Box.createVerticalStrut(5)); return panel; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-03-29 19:37:45
|
Revision: 8888 http://gridarta.svn.sourceforge.net/gridarta/?rev=8888&view=rev Author: akirschbaum Date: 2011-03-29 19:37:39 +0000 (Tue, 29 Mar 2011) Log Message: ----------- Retain "z" attribute value of bottom-most game object when adding/deleting/moving game objects in a square. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/gameobject/GameObject.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2011-03-29 19:34:18 UTC (rev 8887) +++ trunk/atrinik/ChangeLog 2011-03-29 19:37:39 UTC (rev 8888) @@ -1,3 +1,8 @@ +2011-03-29 Andreas Kirschbaum + + * Retain "z" attribute value of bottom-most game object when + adding/deleting/moving game objects in a square. + 2011-03-25 Andreas Kirschbaum * Prepend "python.exe" to map-checker.py on Windows machines. Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/gameobject/GameObject.java =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/gameobject/GameObject.java 2011-03-29 19:34:18 UTC (rev 8887) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/gameobject/GameObject.java 2011-03-29 19:37:39 UTC (rev 8888) @@ -42,6 +42,12 @@ public class GameObject extends DefaultIsoGameObject<GameObject, MapArchObject, Archetype> { /** + * The name of the "z" attribute. + */ + @NotNull + public static final String Z_ATTRIBUTE = "z"; + + /** * The serial version UID. */ private static final long serialVersionUID = 1L; @@ -95,6 +101,9 @@ */ @Override public void propagateElevation(@NotNull final BaseObject<?, ?, ?, ?> gameObject) { + final int elevation = gameObject.getAttributeInt(Z_ATTRIBUTE, false); + setAttributeInt(Z_ATTRIBUTE, elevation); + gameObject.removeAttribute(Z_ATTRIBUTE); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-03-29 19:34:24
|
Revision: 8887 http://gridarta.svn.sourceforge.net/gridarta/?rev=8887&view=rev Author: akirschbaum Date: 2011-03-29 19:34:18 +0000 (Tue, 29 Mar 2011) Log Message: ----------- Fix synchronization issues. Modified Paths: -------------- trunk/model/src/app/net/sf/gridarta/model/index/AbstractIndex.java Modified: trunk/model/src/app/net/sf/gridarta/model/index/AbstractIndex.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/index/AbstractIndex.java 2011-03-29 19:33:22 UTC (rev 8886) +++ trunk/model/src/app/net/sf/gridarta/model/index/AbstractIndex.java 2011-03-29 19:34:18 UTC (rev 8887) @@ -313,9 +313,11 @@ */ @Override public void save(@NotNull final ObjectOutputStream objectOutputStream) throws IOException { - objectOutputStream.writeObject(timestamps); - objectOutputStream.writeObject(names); - modified = false; + synchronized (sync) { + objectOutputStream.writeObject(timestamps); + objectOutputStream.writeObject(names); + modified = false; + } } /** @@ -325,24 +327,26 @@ @Override @SuppressWarnings({ "unchecked" }) public void load(@NotNull final ObjectInputStream objectInputStream) throws IOException { - final Map<V, Long> tmpTimestamps; - final Map<V, String> tmpNames; - try { - tmpTimestamps = (Map<V, Long>) objectInputStream.readObject(); - tmpNames = (Map<V, String>) objectInputStream.readObject(); - } catch (final ClassNotFoundException ex) { - throw new IOException(ex.getMessage(), ex); - } - if (transaction) { - throw new IOException("cannot restore state within active transaction"); - } + synchronized (sync) { + final Map<V, Long> tmpTimestamps; + final Map<V, String> tmpNames; + try { + tmpTimestamps = (Map<V, Long>) objectInputStream.readObject(); + tmpNames = (Map<V, String>) objectInputStream.readObject(); + } catch (final ClassNotFoundException ex) { + throw new IOException(ex.getMessage(), ex); + } + if (transaction) { + throw new IOException("cannot restore state within active transaction"); + } - // drop excess elements from tmpNames to force a consistent state - tmpNames.keySet().retainAll(tmpTimestamps.keySet()); + // drop excess elements from tmpNames to force a consistent state + tmpNames.keySet().retainAll(tmpTimestamps.keySet()); - clear(); - timestamps.putAll(tmpTimestamps); - names.putAll(tmpNames); + clear(); + timestamps.putAll(tmpTimestamps); + names.putAll(tmpNames); + } } /** @@ -350,11 +354,13 @@ */ @Override public void clear() { - timestamps.clear(); - names.clear(); - pending.clear(); - transactionDelete.clear(); - modified = false; + synchronized (sync) { + timestamps.clear(); + names.clear(); + pending.clear(); + transactionDelete.clear(); + modified = false; + } } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-03-29 19:33:29
|
Revision: 8886 http://gridarta.svn.sourceforge.net/gridarta/?rev=8886&view=rev Author: akirschbaum Date: 2011-03-29 19:33:22 +0000 (Tue, 29 Mar 2011) Log Message: ----------- Disable warning. Modified Paths: -------------- trunk/gridarta.ipr Modified: trunk/gridarta.ipr =================================================================== --- trunk/gridarta.ipr 2011-03-27 00:15:31 UTC (rev 8885) +++ trunk/gridarta.ipr 2011-03-29 19:33:22 UTC (rev 8886) @@ -795,10 +795,6 @@ </inspection_tool> <inspection_tool class="TestMethodInProductCode" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="TestMethodIsPublicVoidNoArg" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="TestMethodWithoutAssertion" enabled="true" level="WARNING" enabled_by_default="true"> - <option name="assertionMethods" value="org.junit.Assert,assert.*|fail.*,junit.framework.Assert,assert.*|fail.*,org.mockito.Mockito,verify.*" /> - <option name="assertKeywordIsAssertion" value="false" /> - </inspection_tool> <inspection_tool class="TextLabelInSwitchStatement" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="ThisEscapedInConstructor" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="ThreadDeathRethrown" enabled="true" level="WARNING" enabled_by_default="true" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |