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-03-27 00:15:42
|
Revision: 8885 http://gridarta.svn.sourceforge.net/gridarta/?rev=8885&view=rev Author: akirschbaum Date: 2011-03-27 00:15:31 +0000 (Sun, 27 Mar 2011) Log Message: ----------- Fix typos. Modified Paths: -------------- trunk/atrinik/README.txt trunk/atrinik/resource/resource/HelpFiles/faq.html trunk/atrinik/resource/resource/HelpFiles/guide.html trunk/atrinik/resource/resource/HelpFiles/pyfaq.html trunk/atrinik/resource/resource/HelpFiles/pyguide.html trunk/atrinik/resource/resource/HelpFiles/treasure_multi.html trunk/atrinik/resource/resource/HelpFiles/tut_DScript.html trunk/atrinik/resource/resource/HelpFiles/tut_copypaste.html trunk/atrinik/resource/resource/HelpFiles/tut_frames.html trunk/atrinik/resource/resource/HelpFiles/tut_intro.html trunk/atrinik/resource/resource/HelpFiles/tut_loading.html trunk/atrinik/resource/resource/HelpFiles/tut_map.html trunk/atrinik/resource/resource/HelpFiles/tut_objects.html trunk/atrinik/resource/resource/HelpFiles/tut_scriptev.html trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/tod.properties trunk/build.xml trunk/crossfire/ChangeLog trunk/crossfire/Developer_README.txt trunk/crossfire/INSTALL.txt trunk/crossfire/resource/resource/HelpFiles/guide.html trunk/crossfire/resource/resource/HelpFiles/map_basic.html trunk/crossfire/resource/resource/HelpFiles/map_otcs.html trunk/crossfire/resource/resource/HelpFiles/map_start.html trunk/crossfire/resource/resource/HelpFiles/treasure_multi.html trunk/crossfire/resource/resource/HelpFiles/treasure_one.html trunk/crossfire/resource/resource/HelpFiles/tut_copypaste.html trunk/crossfire/resource/resource/HelpFiles/tut_loading.html trunk/crossfire/resource/resource/HelpFiles/tut_objects.html trunk/crossfire/resource/resource/conf/autojoin.txt trunk/crossfire/resource/resource/conf/types.xml trunk/daimonin/ChangeLog trunk/daimonin/README.txt trunk/daimonin/resource/resource/HelpFiles/faq.html trunk/daimonin/resource/resource/HelpFiles/guide.html trunk/daimonin/resource/resource/HelpFiles/pyfaq.html trunk/daimonin/resource/resource/HelpFiles/pyguide.html trunk/daimonin/resource/resource/HelpFiles/treasure_multi.html trunk/daimonin/resource/resource/HelpFiles/tut_DScript.html trunk/daimonin/resource/resource/HelpFiles/tut_copypaste.html trunk/daimonin/resource/resource/HelpFiles/tut_frames.html trunk/daimonin/resource/resource/HelpFiles/tut_intro.html trunk/daimonin/resource/resource/HelpFiles/tut_loading.html trunk/daimonin/resource/resource/HelpFiles/tut_map.html trunk/daimonin/resource/resource/HelpFiles/tut_objects.html trunk/daimonin/resource/resource/HelpFiles/tut_scriptev.html trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/IGUIConstants.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/tod.properties trunk/gridarta.ipr trunk/model/src/app/net/sf/gridarta/model/floodfill/FloodFill.java trunk/model/src/app/net/sf/gridarta/model/maparchobject/MapArchObject.java trunk/model/src/app/net/sf/gridarta/model/mapmodel/DefaultMapModel.java trunk/model/src/app/net/sf/gridarta/model/mapmodel/MapModel.java trunk/model/src/app/net/sf/gridarta/model/match/SetEnabledAction.java trunk/src/app/net/sf/gridarta/actions/MapSizeMismatchException.java trunk/src/app/net/sf/gridarta/gui/connectionview/View.java trunk/src/app/net/sf/gridarta/gui/exitconnector/ExitConnectorController.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java trunk/src/app/net/sf/gridarta/gui/map/mapview/DefaultMapViewFactory.java trunk/src/app/net/sf/gridarta/gui/map/tools/action.properties trunk/src/app/net/sf/gridarta/gui/utils/GSplitPane.java trunk/src/app/net/sf/gridarta/messages.properties trunk/src/app/overview.html trunk/src/doc/dev/codeStyle.xhtml trunk/src/doc/dtd/xhtml-base-1.mod trunk/src/doc/dtd/xhtml-events-1.mod trunk/src/doc/dtd/xhtml-image-1.mod trunk/src/doc/dtd/xhtml-legacy-1.mod trunk/src/doc/dtd/xhtml-qname-1.mod trunk/src/doc/dtd/xhtml-ruby-1.mod trunk/src/doc/dtd/xhtml-struct-1.mod trunk/src/doc/dtd/xhtml11-flat.dtd trunk/src/doc/dtd/xhtml11-model-1.mod trunk/src/doc/dtd/xhtml11_xinclude10-model-1.mod trunk/src/doc/news/2006-05-27_1.xhtml trunk/test-mapvalidator/crossfire/maps/TilePaths trunk/test-mapvalidator/crossfire/maps/TilePaths.expected trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/DefaultInputHandler.java trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/JEditTextArea.java trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/SyntaxStyle.java trunk/utils/src/app/net/sf/gridarta/utils/XmlHelper.java Modified: trunk/atrinik/README.txt =================================================================== --- trunk/atrinik/README.txt 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/atrinik/README.txt 2011-03-27 00:15:31 UTC (rev 8885) @@ -85,7 +85,7 @@ Example user.properties file: user.ctags=yes debug=yes -user.ftp.host=www.myhost.com +user.ftp.host=www.example.com user.ftp.user=cheristheus1234 user.ftp.pass=12345678 user.ftp.dir=daimonin Modified: trunk/atrinik/resource/resource/HelpFiles/faq.html =================================================================== --- trunk/atrinik/resource/resource/HelpFiles/faq.html 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/atrinik/resource/resource/HelpFiles/faq.html 2011-03-27 00:15:31 UTC (rev 8885) @@ -67,8 +67,8 @@ "png.jar".</P> </UL> -<P><B>Whenever I start the JavaEditor, I get a bunch of errormessages concerning - some missing font. What does that mean?</B></P> +<P><B>Whenever I start the JavaEditor, I get a bunch of error messages + concerning some missing font. What does that mean?</B></P> <P>That appears to happen with several Linux distributions. The messages might be annoying, but it's completely harmless. Simply ignore it. If using Java Modified: trunk/atrinik/resource/resource/HelpFiles/guide.html =================================================================== --- trunk/atrinik/resource/resource/HelpFiles/guide.html 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/atrinik/resource/resource/HelpFiles/guide.html 2011-03-27 00:15:31 UTC (rev 8885) @@ -73,17 +73,17 @@ (That doesn't mean all puzzles have to be short and small, just "solvable".) Players could look at your maps via editor at any time. Don't force them doing this. Support the "honorable" players. - <LI>If you plan to create a big mapset, <B>include maps of all difficulty + <LI>If you plan to create a big map set, <B>include maps of all difficulty levels.</B> It's absolutely okay and reasonable to have areas where a certain difficulty level dominates. Just try not to overdo it. </UL> -<H2 align=center>Guidlines for creating Artifacts:</H2> +<H2 align=center>Guidelines for creating Artifacts:</H2> <UL> <LI><B>Don't rely on artifacts to make your maps interesting for players.</B> <LI>When you create a new artifact (weapon, armor, etc), <B>always keep an - eye on playbalance.</B> Powerful items must NOT be reachable without + eye on play balance.</B> Powerful items must NOT be reachable without hard fighting AND questing. Look at other maps. Try to adopt the average taste of "difficulty". Make sure the artifact is always hard to get, not only for the first time. A hidden location, for instance, does not Modified: trunk/atrinik/resource/resource/HelpFiles/pyfaq.html =================================================================== --- trunk/atrinik/resource/resource/HelpFiles/pyfaq.html 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/atrinik/resource/resource/HelpFiles/pyfaq.html 2011-03-27 00:15:31 UTC (rev 8885) @@ -31,7 +31,7 @@ <P> </P> -<P align="center">Comming Soon!</P> +<P align="center">Coming Soon!</P> </BODY> </HTML> Modified: trunk/atrinik/resource/resource/HelpFiles/pyguide.html =================================================================== --- trunk/atrinik/resource/resource/HelpFiles/pyguide.html 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/atrinik/resource/resource/HelpFiles/pyguide.html 2011-03-27 00:15:31 UTC (rev 8885) @@ -31,7 +31,7 @@ <H2 align=center> </H2> -<H2 align=center>comming soon!</H2> +<H2 align=center>coming soon!</H2> </BODY> </HTML> Modified: trunk/atrinik/resource/resource/HelpFiles/treasure_multi.html =================================================================== --- trunk/atrinik/resource/resource/HelpFiles/treasure_multi.html 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/atrinik/resource/resource/HelpFiles/treasure_multi.html 2011-03-27 00:15:31 UTC (rev 8885) @@ -55,7 +55,7 @@ generated, automatically arrows are generated too. <br> There is a 5% chance for the sword to be generated. If that fails, the - shortsword has a 10% chance to be generated. If that fails again, there is a + short sword has a 10% chance to be generated. If that fails again, there is a 15% chance for the dagger. <br> </P> Modified: trunk/atrinik/resource/resource/HelpFiles/tut_DScript.html =================================================================== --- trunk/atrinik/resource/resource/HelpFiles/tut_DScript.html 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/atrinik/resource/resource/HelpFiles/tut_DScript.html 2011-03-27 00:15:31 UTC (rev 8885) @@ -354,7 +354,7 @@ <br> map.GetFirstObjectOnSquare(x,y) <br> - Gets the bottom object on the tile. Use obj.above to browse objs + Gets the bottom object on the tile. Use obj.above to browse objects <br> Parameter types: <br> @@ -1036,7 +1036,7 @@ <br> Abilities are can be cast in magic-blocking areas, and do not <br> - use magicattack. + use magic attack. <br> Parameter types: <br> @@ -1232,7 +1232,7 @@ <br> object.CreatePlayerForce(force_name, time) <br> - Creates and insters a player force named force_name in object. + Creates and inserts a player force named force_name in object. <br> The values of a player force will effect the player. <br> @@ -1348,9 +1348,9 @@ <br> ------------------------------------------------------------ <br> - object.CreateObjectInside(archname, identified, value) + object.CreateObjectInside(archetype_name, identified, value) <br> - Creates an object from archname and inserts into object. + Creates an object from archetype_name and inserts into object. <br> identified is either Daimonin.IDENTIFIED or Daimonin.UNIDENTIFIED <br> @@ -1360,7 +1360,7 @@ <br> Parameter types: <br> - string archname + string archetype_name <br> integer identified <br> @@ -1683,11 +1683,11 @@ <br> ------------------------------------------------------------ <br> - object.SendCustomCommand(customcommand) + object.SendCustomCommand(custom_command) <br> Parameter types: <br> - string customcommand + string custom_command <br> Possible return types: <br> Modified: trunk/atrinik/resource/resource/HelpFiles/tut_copypaste.html =================================================================== --- trunk/atrinik/resource/resource/HelpFiles/tut_copypaste.html 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/atrinik/resource/resource/HelpFiles/tut_copypaste.html 2011-03-27 00:15:31 UTC (rev 8885) @@ -81,7 +81,7 @@ <ol> <LI> Select *one* empty square and hit fill: All empty squares adjacent to - the selected one will get floodfilled. + the selected one will get flood filled. <LI> Select an area or a non-empty square: The currently selected default arch will be inserted on top of (or below) every square within the selected area. Modified: trunk/atrinik/resource/resource/HelpFiles/tut_frames.html =================================================================== --- trunk/atrinik/resource/resource/HelpFiles/tut_frames.html 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/atrinik/resource/resource/HelpFiles/tut_frames.html 2011-03-27 00:15:31 UTC (rev 8885) @@ -39,7 +39,7 @@ Contains shortcuts for certain commands. </P> -<P><B>Default-Archpanel:</B> +<P><B>Default-Archetype panel:</B> <br> This panel contains all the available default arches. You can select from @@ -50,8 +50,8 @@ <br> This small window contains some basic info about the selected arch from the - default-archpanel. Personally I prefer to squeeze this to zero height, in - order to have more space for the default-archpanel itself. + default-archetype panel. Personally I prefer to squeeze this to zero height, + in order to have more space for the default-archetype panel itself. </P> <P><B>Map View:</B> @@ -61,7 +61,7 @@ insert and delete objects. </P> -<P><B>Map-Archpanel:</B> +<P><B>Map-Archetype panel:</B> <br> This panel contains a list of all objects on the currently active @@ -79,7 +79,7 @@ Don't forget to click "Apply" to apply the new settings. </P> -<P><B>Archtext Window:</B> +<P><B>Archetype Text Window:</B> <br> This window contains the arch-attributes of the currently selected object. Modified: trunk/atrinik/resource/resource/HelpFiles/tut_intro.html =================================================================== --- trunk/atrinik/resource/resource/HelpFiles/tut_intro.html 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/atrinik/resource/resource/HelpFiles/tut_intro.html 2011-03-27 00:15:31 UTC (rev 8885) @@ -31,7 +31,7 @@ <P> </P> -<P align="center"> comming soon!</P> +<P align="center"> coming soon!</P> </BODY> </HTML> Modified: trunk/atrinik/resource/resource/HelpFiles/tut_loading.html =================================================================== --- trunk/atrinik/resource/resource/HelpFiles/tut_loading.html 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/atrinik/resource/resource/HelpFiles/tut_loading.html 2011-03-27 00:15:31 UTC (rev 8885) @@ -45,7 +45,7 @@ of the download sites from http://daimonin.real-time.com/. <br> Once you've got the arch folder, you must <B>set the path</B> to this - folder. Select the menu "File->Options...", uncheck the box "Load + folder. Select the menu "File->Options...", un-check the box "Load Arches from Collection", then enter the path in the arch-entry. When you're at it, you can also customize the default map-path. <br> @@ -56,17 +56,17 @@ </ol> <P>You might ask yourself now: "Why should I spend my time downloading the arch package only to find out it takes three times longer to load?". Well, at - some point during mapmaking you will probably want to modify an arch, create - new arches or new images. And for that task, you need to have the individual - arch files in extracted form. However, don't worry too much about the - loading time. You can collect the arches after modifying/adding what you + some point during map making you will probably want to modify an arch, + create new arches or new images. And for that task, you need to have the + individual arch files in extracted form. However, don't worry too much about + the loading time. You can collect the arches after modifying/adding what you want (see menu: "Resources->Collect CF Arches"). This will create new collected archives so you can both have your changes and load in short time.</P> <P>Concerning maps: You don't necessarily need to have the Daimonin maps. You can just head off creating your own maps. Though, most likely you will - notice that Daimonin mapmaking isn't all that easy, and you'll want to have + notice that Daimonin map making isn't all that easy, and you'll want to have working examples to look at. Besides, you will want to link your maps into the existing Daimonin world and probably you'll want to test them too. For all of that you need the Daimonin map package.</P> Modified: trunk/atrinik/resource/resource/HelpFiles/tut_map.html =================================================================== --- trunk/atrinik/resource/resource/HelpFiles/tut_map.html 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/atrinik/resource/resource/HelpFiles/tut_map.html 2011-03-27 00:15:31 UTC (rev 8885) @@ -45,24 +45,25 @@ <P> To <B>select</B> an object, left click on it. You can do so either on the - map window or in the map-archpanel window to the right. If you want to + map window or in the map-archetype panel window to the right. If you want to select a group of squares on the map (e.g. for copy/paste actions), left click and drag. You will notice a rectangular area getting highlighted as you drag.</P> <P> To <B>insert</B> a new object, you must first select one of the arches from - the default-archpanel to the left. Right click to insert the selected arch - into the map. You can also right-click into the map-archpanel in order to - insert the object at a specific place in a pile of objects. You can drag the - mouse on the map view in order to insert the same arch on many squares.</P> + the default-archetype panel to the left. Right click to insert the selected + archetype into the map. You can also right-click into the map-archetype + panel in order to insert the object at a specific place in a pile of + objects. You can drag the mouse on the map view in order to insert the same + arch on many squares.</P> <P> To <B>delete</B> an object, simply middle click on it. You can drag the mouse to delete multiple objects. Deleting specific objects out of a stack - is possible by middle-clicking in the map-archpanel. + is possible by middle-clicking in the map-archetype panel. <br> - (If your mouse has no middle-button you can simulate it by pressing <Strg>+<any + (If your mouse has no middle-button you can simulate it by pressing <Ctrl>+<any mouse button>.) </P> Modified: trunk/atrinik/resource/resource/HelpFiles/tut_objects.html =================================================================== --- trunk/atrinik/resource/resource/HelpFiles/tut_objects.html 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/atrinik/resource/resource/HelpFiles/tut_objects.html 2011-03-27 00:15:31 UTC (rev 8885) @@ -42,29 +42,30 @@ <br> <br> - Select the object you want to modify, then doubleclick on it in the - <A HREF="tut_frames.html">Map-Archpanel Window</A> (on the right side). - You could alternatively select it and press the "Attributes" button on - the <A HREF="tut_frames.html">Object Attribute Window</A>. A popup - window will appear, containing all object attributes in a graphical user - interface. + Select the object you want to modify, then double click on it in the + <A HREF="tut_frames.html">Map-Archetype panel Window</A> (on the right + side). You could alternatively select it and press the "Attributes" + button on the <A HREF="tut_frames.html">Object Attribute Window</A>. A + popup window will appear, containing all object attributes in a + graphical user interface. <br> Keep in mind that the syntax definitions for this entire thing are written in well-readable XML. So if you notice that some attribute is wrong, or missing, I strongly recommend you trying to edit the definitions file: "types.xml". - <LI><b>Modify the archtext directly</b> + <LI><b>Modify the archetype text directly</b> <br> <br> Select the object you want, then modify the attributes directly in the - <A HREF="tut_frames.html">Archtext Window</A> (in the bottom-right + <A HREF="tut_frames.html">Archetype Text Window</A> (in the bottom-right corner). <br> But beware! You need to know exactly what you are doing there. If you do typos or set wrong values, you won't receive a warning. Modifying the - archtext directly is advisable for more experienced map makers only. + archetype text directly is advisable for more experienced map makers + only. </ol> </BODY> Modified: trunk/atrinik/resource/resource/HelpFiles/tut_scriptev.html =================================================================== --- trunk/atrinik/resource/resource/HelpFiles/tut_scriptev.html 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/atrinik/resource/resource/HelpFiles/tut_scriptev.html 2011-03-27 00:15:31 UTC (rev 8885) @@ -185,10 +185,10 @@ <br> - local events are managed using the event_... tags. The event_..._plugin tag should be Python. the event_... specifies the name of the Python script - to run. This path is relative to the crossfire map subdirectory. + to run. This path is relative to the crossfire map sub-directory. </p> <p>- global events are all registered by CFPython. If you want to react to one - of them, you need to create script files in a python/ subdirectory of your + of them, you need to create script files in a python/ sub-directory of your crossfire map directory. Those files should be called: <br> python_shout.py : for the shout global event; Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/tod.properties =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/tod.properties 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/tod.properties 2011-03-27 00:15:31 UTC (rev 8885) @@ -33,8 +33,8 @@ tod.text.9=<html>You can select all squares of a map at once.<p>Menu: <code>Edit -> Select All</code><br>Keyboard: <kbd>Ctrl-A</kbd>. tod.text.10=<html>You can random paint by selecting a pickmap and painting.<p>Try this:<br>Select the "plants1" pickmap,<br>then paint with the right mouse button. tod.text.11=<html>All tiled maps of Atrinik are of size 24\xD724?<p>Your maps should be 24\xD724 as well. -tod.text.12=<html>You can create random maps quite fast? Try this:<ol><li>Create a new map.<li>Select the entire map using Edit -> Select All or Ctrl-A<li>Select the "gras" pickmap (do not select a square in the pickmap)<li>Use Edit -> Random Fill Above or Ctrl-D<li>When asked for a fill seed value, simply press OK or Return (enter nothing).<li>Select the "trees1" pickmap (do not select a square in the pickmap)<li>Use Edit -> Random Fill Above or Ctrl-D<li>When asked for a fill seed value, now enter 3.</ol>Nice, isn''t it? -tod.text.13=<html>Maps can be tiled using absolute and relative paths.<p><em>Relative paths</em> are good for paths to maps from the same mapset.<br><em>Absolute paths</em> are good for paths to maps from another mapset.<p>The "RA"-Switch in the Map Properties can be used to indvidually convert absolute to relative paths and vice versa. +tod.text.12=<html>You can create random maps quite fast? Try this:<ol><li>Create a new map.<li>Select the entire map using Edit -> Select All or Ctrl-A<li>Select the "grass" pickmap (do not select a square in the pickmap)<li>Use Edit -> Random Fill Above or Ctrl-D<li>When asked for a fill seed value, simply press OK or Return (enter nothing).<li>Select the "trees1" pickmap (do not select a square in the pickmap)<li>Use Edit -> Random Fill Above or Ctrl-D<li>When asked for a fill seed value, now enter 3.</ol>Nice, isn''t it? +tod.text.13=<html>Maps can be tiled using absolute and relative paths.<p><em>Relative paths</em> are good for paths to maps from the same map set.<br><em>Absolute paths</em> are good for paths to maps from another map set.<p>The "RA"-Switch in the Map Properties can be used to individually convert absolute to relative paths and vice versa. tod.text.14=<html>The editor runs better on Linux than on Windows.\nIt runs faster and smoother on Linux. tod.text.15=<html>You can control the client.<p>Menu: <code>Tools -> Control Client</code>.<p>There you can start and stop the client as well as see its console output. tod.text.16=<html>You can control the server.<p>Menu: <code>Tools -> Control Server</code>.<p><em><strong>Warning</strong>: This feature is experimental and might result in stale servers (zombies).</em> Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/build.xml 2011-03-27 00:15:31 UTC (rev 8885) @@ -752,7 +752,7 @@ <attribute name="Implementation-Title" value="Gridarta"/> <attribute name="Implementation-Vendor" value="The Gridarta Developers"/> <attribute name="Implementation-Version" value="${project.version}"/> - <attribute name="Implementation-URL" value="http://sourceforge.net/projets/gridarta/"/> + <attribute name="Implementation-URL" value="http://sourceforge.net/projects/gridarta/"/> </manifest> </jar> <pack200 src="${distLib}.jar" destfile="${distLib}.pack.gz" gzipoutput="true" stripdebug="true" effort="9" keepfileorder="false" modificationtime="latest" deflatehint="false"/> Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/crossfire/ChangeLog 2011-03-27 00:15:31 UTC (rev 8885) @@ -1440,7 +1440,7 @@ 2007-11-17 Andreas Kirschbaum - * Fix #1833500 (Attacktypes in attributes displayed as number). + * Fix #1833500 (Attack types in attributes displayed as number). * Fix #1833514 (Map selection dialog doesn't work from unsaved map). Modified: trunk/crossfire/Developer_README.txt =================================================================== --- trunk/crossfire/Developer_README.txt 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/crossfire/Developer_README.txt 2011-03-27 00:15:31 UTC (rev 8885) @@ -70,7 +70,7 @@ In case you are unexperienced with java and swing, note that the graphics look different on every system, and with every font. They also have different sizes/proportions and behave different. - A seemingly trivial and effectless change can wreck havock for + A seemingly trivial and effectless change can wreck havoc for the same GUI run on another system. Again, please don't be totally afraid of it, just keep it in mind. Modified: trunk/crossfire/INSTALL.txt =================================================================== --- trunk/crossfire/INSTALL.txt 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/crossfire/INSTALL.txt 2011-03-27 00:15:31 UTC (rev 8885) @@ -1,7 +1,7 @@ How to run the editor: ^^^^^^^^^^^^^^^^^^^^^ Simply run the jar file "CrossfireEditor.jar" in the main directory. -In Windows this is done by a doubleclick on "CrossfireEditor.jar". +In Windows this is done by a double-click on "CrossfireEditor.jar". In Linux/Unix you type in the console: "java -jar CrossfireEditor.jar". If you have enough memory, it is recommended to run the editor @@ -32,7 +32,7 @@ Install Ant on your system. Make sure both the JAVA_HOME and ANT_HOME environment variables are set correctly. -Change into the crossfire subdirectory or the Gridarta directory. +Change into the crossfire sub-directory or the Gridarta directory. On the console type "ant" - that's all. Modified: trunk/crossfire/resource/resource/HelpFiles/guide.html =================================================================== --- trunk/crossfire/resource/resource/HelpFiles/guide.html 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/crossfire/resource/resource/HelpFiles/guide.html 2011-03-27 00:15:31 UTC (rev 8885) @@ -78,18 +78,18 @@ "solvable".) Players could look at your maps via editor at any time. Don't force them doing this. Support the "honorable" players. <LI><B>Avoid mixing difficulty levels</B> all over the place. When newbie - maps, mid level- and high level areas stay seperated, players have a + maps, mid level- and high level areas stay separated, players have a much easier time to find what is suitable for them. It is okay to place a harder map into a low level area, as long as it requires something to enter which keeps out too weak players. </UL> -<H2 align=center>Guidlines for creating artifacts:</H2> +<H2 align=center>Guidelines for creating artifacts:</H2> <UL> <LI><B>Don't rely on artifacts to make your maps interesting for players.</B> <LI>When you create a new artifact (weapon, armor, etc), <B>always keep an - eye on playbalance.</B> Powerful items must not be reachable without + eye on play balance.</B> Powerful items must not be reachable without hard fighting AND questing. Look at other maps. Try to adopt the average taste of "difficulty". Make sure the artifact is always hard to get, not only for the first time. A hidden location, for instance, does not Modified: trunk/crossfire/resource/resource/HelpFiles/map_basic.html =================================================================== --- trunk/crossfire/resource/resource/HelpFiles/map_basic.html 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/crossfire/resource/resource/HelpFiles/map_basic.html 2011-03-27 00:15:31 UTC (rev 8885) @@ -47,9 +47,9 @@ <H2 align="center">Step 2 - Floor:</H2> <P>Now it's time to put some floor tiles on your map. Look at the - <A HREF="tut_frames.html">Default-Archpanel</A> on the left side. These are - the default objects you can choose from. Click on the "Pickmaps" tab and - "background". Now left-click on one of the floors you like, and then + <A HREF="tut_frames.html">Default-Archetype panel</A> on the left side. + These are the default objects you can choose from. Click on the "Pickmaps" + tab and "background". Now left-click on one of the floors you like, and then right-click on the map to insert. (Middle-click to delete misplaced objects.)</P> @@ -60,9 +60,9 @@ <H2 align="center">Step 3 - Walls:</H2> <P>Let's add some walls next. On the - <A HREF="tut_frames.html">Default-Archpanel</A> (left side) select "Arch - List" - "wall". Now pick one of the wall types. You can enable the menu - "Map->Auto-Joining". This will automatically join the wall parts as you + <A HREF="tut_frames.html">Default-Archetype panel</A> (left side) select + "Arch List" - "wall". Now pick one of the wall types. You can enable the + menu "Map->Auto-Joining". This will automatically join the wall parts as you insert them on the map. Later you can switch off Auto-Joining again and replace some wall parts with special parts, like a window as seen below.</P> @@ -77,9 +77,10 @@ fitting. Different types of maps need different style of decoration of course. An undead map could show some tombstones/mist, pillars belong in a castle, altars in a church, trees/bushes for outdoor maps etc. (At this - point I assume you know how to find things in the <A HREF="tut_frames.html">Default-Archpanel</A>.) + point I assume you know how to find things in the <A HREF="tut_frames.html">Default-Archetype + panel</A>.) <br> - You can place some doors between seperate rooms. And maybe add a little + You can place some doors between separate rooms. And maybe add a little food, because players are always hungry. </P> <P> Modified: trunk/crossfire/resource/resource/HelpFiles/map_otcs.html =================================================================== --- trunk/crossfire/resource/resource/HelpFiles/map_otcs.html 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/crossfire/resource/resource/HelpFiles/map_otcs.html 2011-03-27 00:15:31 UTC (rev 8885) @@ -38,8 +38,8 @@ <P>You should know that every object has a <i>type</i>, defining it's base functionality. Is it a monster, an exit, food, or a weapon? That is defined by the object type. Apart from the type, there are countless - <i>attributes</i>. A monster for example can have health points, attacktype, - a damage value, and many more.</P> + <i>attributes</i>. A monster for example can have health points, attack + type, a damage value, and many more.</P> <P>There are two "layers" for the Crossfire objects (see <A HREF="tut_objects.html">manipulating objects</A>):</P> @@ -51,7 +51,7 @@ This is how the objects are defined in the arch files and also how they are stored in maps. Except for the special cases like type, name, image, and scripting, you can see the real arch syntax for any selected object - in the <A HREF="tut_frames.html">Archtext Window</A>: + in the <A HREF="tut_frames.html">Archetype Text Window</A>: <P> <IMG SRC="archtext.png" WIDTH="361" HEIGHT="234" ALIGN="CENTER"> </P> @@ -62,7 +62,7 @@ <LI><b>The attribute dialog</b> is there to help you <br> <br> - Select an object on the map and doubleclick on it in the + Select an object on the map and double click on it in the <A HREF="tut_frames.html">Map-ArchPanel</A> (bottom-right window), or press the "attributes" button. You'll see a popup window: The so-called Attribute Dialog. This is an interface which tries to Modified: trunk/crossfire/resource/resource/HelpFiles/map_start.html =================================================================== --- trunk/crossfire/resource/resource/HelpFiles/map_start.html 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/crossfire/resource/resource/HelpFiles/map_start.html 2011-03-27 00:15:31 UTC (rev 8885) @@ -34,12 +34,12 @@ stories and mystical places... - But you don't know where to start?</p> <p>Don't worry, this is a common problem that all of us went through. My advice: - <b>Start small</b>. Too many people have started to work on a huge mapset, + <b>Start small</b>. Too many people have started to work on a huge map set, and they've never been able to complete it. At some point the interest was gone, finally the maps were forgotten and lost. What a pity! You wouldn't believe how often this has happened.</p> -<p>The other point is: You need to learn step by step. Crossfire mapmaking +<p>The other point is: You need to learn step by step. Crossfire map making requires quite a bit of learning. When you start with small and easy maps, working your way up later, this learning can be a joyful process.</p> @@ -49,7 +49,7 @@ a cave) which is really crappy designed and never played. There's quite a lot of those yet, unfortunately. So, take this map and re-create it from scratch. Make it look nice, choose monsters fitting into the place/area. - According to your mapmaking skills, you may even go so far as to add a + According to your map making skills, you may even go so far as to add a little secret perhaps, an NPC, a story, or a small treasure - whatever you like. But better not all at once. Not yet.</p> @@ -89,7 +89,7 @@ something else which is easier. Or ask for help on IRC or the crossfire-maps mailing list.</p> -<h2>Embarking on the big mapset</h2> +<h2>Embarking on the big map set</h2> <p>I recommend you work on a lot more small maps before you start working on a big set. Don't start unless you feel you have already acquired a good deal Modified: trunk/crossfire/resource/resource/HelpFiles/treasure_multi.html =================================================================== --- trunk/crossfire/resource/resource/HelpFiles/treasure_multi.html 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/crossfire/resource/resource/HelpFiles/treasure_multi.html 2011-03-27 00:15:31 UTC (rev 8885) @@ -59,8 +59,8 @@ generated, automatically arrows are generated too.</p> <p>There is a 5% chance for the sword to be generated. If that fails, the - shortsword has a 10% chance to be generated. If that fails again, there is a - 15% chance for the dagger.</p> + short sword has a 10% chance to be generated. If that fails again, there is + a 15% chance for the dagger.</p> <p> <img src="treasure4.jpg" width="277" height="366" align="center" alt="Treasurelist 'goblin"> Modified: trunk/crossfire/resource/resource/HelpFiles/treasure_one.html =================================================================== --- trunk/crossfire/resource/resource/HelpFiles/treasure_one.html 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/crossfire/resource/resource/HelpFiles/treasure_one.html 2011-03-27 00:15:31 UTC (rev 8885) @@ -40,7 +40,7 @@ <table border="1"> <tr> <td> - <img src="treasure1.jpg" width="219" height="155" align="center" alt="Treasure list 'dragon_paarts'"> + <img src="treasure1.jpg" width="219" height="155" align="center" alt="Treasure list 'dragon_parts'"> </td> <td> <img src="treasure2.jpg" width="257" height="87" align="center" alt="Treasure list 'traps'"> Modified: trunk/crossfire/resource/resource/HelpFiles/tut_copypaste.html =================================================================== --- trunk/crossfire/resource/resource/HelpFiles/tut_copypaste.html 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/crossfire/resource/resource/HelpFiles/tut_copypaste.html 2011-03-27 00:15:31 UTC (rev 8885) @@ -36,7 +36,7 @@ <h2>Undo and Redo</h2> <p> - Undo allows you to undo your edits if you did make a mistake. Redo undos an + Undo allows you to undo your edits if you did make a mistake. Redo undoes an undo operation. (Note that the number of possible undo operations is rather limited.)</p> @@ -93,8 +93,8 @@ selected map squares <li>Random Fill Below: same as "Fill Below" but fills only a fraction of the selected map squares - <li>Floodfill: if the cursor is on an empty map square, fills the cursor map - square and all adjacent empty map squares + <li>Flood fill: if the cursor is on an empty map square, fills the cursor + map square and all adjacent empty map squares </ul> </BODY> Modified: trunk/crossfire/resource/resource/HelpFiles/tut_loading.html =================================================================== --- trunk/crossfire/resource/resource/HelpFiles/tut_loading.html 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/crossfire/resource/resource/HelpFiles/tut_loading.html 2011-03-27 00:15:31 UTC (rev 8885) @@ -49,9 +49,9 @@ </P> <P>Once you've got the arch folder, you must <B>set the path</B> to this - folder. Select the menu "File->Options...", uncheck the box "Load - Arches from Collection", then enter the path in "Archfiles". When - you're at it, you can also customize the default map-path.</P> + folder. Select the menu "File->Options...", un-check the box + "Load Arches from Collection", then enter the path in "Arch". + When you're at it, you can also customize the default map-path.</P> <P>Now you're ready to go. Click OK, quit the editor and restart it. This time the archetypes will load from all the individual arch and @@ -61,9 +61,9 @@ </ol> <P>You might ask yourself now: "Why should I spend my time downloading the arch package only to find out it takes three times longer to load?". Well, at - some point during mapmaking you will probably want to modify an archetype, + some point during map making you will probably want to modify an archetype, create new archetypes or new images. And for that task, you need to have the - individual archtype files in extracted form. However, don't worry too much + individual archetype files in extracted form. However, don't worry too much about the loading time. You can collect the arches after modifying/adding what you want (see menu: "Resources->Collect Arches"). This will create new collected archives so you can both have your changes and load in short @@ -73,10 +73,10 @@ <P>Concerning maps: You don't necessarily need to have the Crossfire maps. You can just head off creating your own maps. Though, most likely you will - notice that Crossfire mapmaking isn't all that easy, and you'll want to have - working examples to look at. Besides, you will want to link your maps into - the existing Crossfire world and probably you'll want to test them too. For - all of that you need the Crossfire map package.</P> + notice that Crossfire map making isn't all that easy, and you'll want to + have working examples to look at. Besides, you will want to link your maps + into the existing Crossfire world and probably you'll want to test them too. + For all of that you need the Crossfire map package.</P> <P>Like the archetypes, you can get the maps either directly from SVN or download the package. See Modified: trunk/crossfire/resource/resource/HelpFiles/tut_objects.html =================================================================== --- trunk/crossfire/resource/resource/HelpFiles/tut_objects.html 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/crossfire/resource/resource/HelpFiles/tut_objects.html 2011-03-27 00:15:31 UTC (rev 8885) @@ -42,7 +42,7 @@ <ol> <li><p><b>Use the convenient attribute interface</b></p> - <p>Select the game object you want to modify, then doubleclick on it in + <p>Select the game object you want to modify, then double click on it in the <a href="tut_frames.html">Selected Square Display</a> (on the right side). You could alternatively select it and press the "Attributes" button on the <a href="tut_frames.html">Game Object @@ -53,7 +53,7 @@ Game Object Attributes Dialog" title="The Game Object Attributes Dialog"></p> - <li><p><b>Modify the archtext directly</b></p> + <li><p><b>Modify the archetype text directly</b></p> <p>Select the game object you want, then modify the attributes directly in the <a href="tut_frames.html">Game Object Text Editor</a> (in the @@ -62,8 +62,8 @@ <p>But beware! You need to know exactly what you are doing there. If you do typing mistakes or set otherwise wrong values, you won't receive - a warning. Modifying the archtext directly is only recommended for - experienced mapmakers.</p> + a warning. Modifying the archetype text directly is only recommended + for experienced mapmakers.</p> <p><img src="game-object-text-editor.png" width="257" height="247" alt="The Game Object Text Editor" title="The Game Object Text Editor"></p> Modified: trunk/crossfire/resource/resource/conf/autojoin.txt =================================================================== --- trunk/crossfire/resource/resource/conf/autojoin.txt 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/crossfire/resource/resource/conf/autojoin.txt 2011-03-27 00:15:31 UTC (rev 8885) @@ -16,7 +16,7 @@ # # 0, N, E, NE, S, NS, ES, NES, W, WN, WE, WNE, SW, SWN, ESW, NESW # -# Autojoining works with anything except multisquare arches. +# Autojoining works with anything except multi-square arches. # # Creator: Andreas Vogl # Modified: trunk/crossfire/resource/resource/conf/types.xml =================================================================== --- trunk/crossfire/resource/resource/conf/types.xml 2011-03-26 22:09:02 UTC (rev 8884) +++ trunk/crossfire/resource/resource/conf/types.xml 2011-03-27 00:15:31 UTC (rev 8885) @@ -853,8 +853,8 @@ This adds chaos resistance to the item. The number is a percent-value in the range 0-100. Treat this with CARE. Look at other maps and what they require to do for getting this-and-that - artifact. Note that chaos is not a stand-alone attacktype. Chaos - "contains" a combination of other attacktypes. + artifact. Note that chaos is not a stand-alone attack type. + Chaos "contains" a combination of other attack types. </attribute> <attribute arch="resist_blind" editor="resist blinding %" length="15" type="int"> This adds blinding resistance to the item. The number is a @@ -864,7 +864,7 @@ </attribute> <attribute arch="resist_holyword" editor="resist holy power %" length="15" type="int"> This adds holy power resistance to the item. The number is a - percent-value in the range 0-100. Holy power is the attacktype + percent-value in the range 0-100. Holy power is the attack type that holyword-type spells use to hurt undead creatures. This kind of resistance is only reasonable for undead players (wraith or devourer cult). Generally, resistance to holy word should not @@ -904,7 +904,7 @@ <section name="misc"> <attribute arch="luck" editor="luck bonus" type="int" min="-128" max="127"> With positive luck bonus, the player is more likely to succeed - in all sorts of things (spellcasting, praying,...). Unless the + in all sorts of things (spell-casting, praying,...). Unless the <luck bonus> is very high, the effect will be barely visible in-game. Luck bonus on one piece of equipment should never exceed 3, and such bonus should not be too frequently @@ -1480,8 +1480,8 @@ <use><![CDATA[ There is one major specialty about detectors: You can detect spells blown over a detector! To detect a lighting bolt for example, set - "slaying lighting" and "speed 1.0". In combination with spellcasting - walls, this can be very useful for map-mechanisms. ]]> + "slaying lighting" and "speed 1.0". In combination with + spell-casting walls, this can be very useful for map-mechanisms. ]]> </use> <attribute arch="no_pick" value="1" type="fixed"/> <attribute arch="slaying" editor="match name" type="string"> @@ -1617,9 +1617,9 @@ </attribute> </section> <section name="symptoms"> - <attribute arch="attacktype" editor="attacktype" type="bitmask_attacktype"> - The disease will attack the host with the given <attacktype>. - Godpower attacktype is commonly used for "unresistable" + <attribute arch="attacktype" editor="attack type" type="bitmask_attacktype"> + The disease will attack the host with the given <attack type>. + Godpower attack type is commonly used for "unresistable" diseases. </attribute> <attribute arch="dam" editor="damage" type="int" min="-100" max="32767"> @@ -2418,11 +2418,11 @@ <attribute arch="move_block" editor="blocked movement" type="bitmask_movement"> If set, the object cannot be passed by players nor monsters. </attribute> - <attribute arch="attacktype" editor="attacktype" type="bitmask_attacktype"> - This attribute specifies the attacktypes that this floor uses to - damage it's victims. Attacktypes are: physical, fire, cold.. etc. If - you want a real tough hazard floor, add more than just one - attacktype. + <attribute arch="attacktype" editor="attack type" type="bitmask_attacktype"> + This attribute specifies the attack types that this floor uses to + damage it's victims. Attack types are: physical, fire, cold.. etc. + If you want a real tough hazard floor, add more than just one + attack type. </attribute> <attribute arch="dam" editor="base damage" type="int" min="0" max="32767"> The <base damage> defines how much damage is inflicted to the @@ -2870,7 +2870,7 @@ archetypes, and can be found on the "connected" Pickmap. ]]> </description> <use><![CDATA[ - Spellcasting walls pose an interesting alternative to monsters. + Spell-casting walls pose an interesting alternative to monsters. Usually they are set to be undestroyable. Thus, while monsters in a map can be cleared out, the magic walls remain. Low level characters for example will not be able to pass through their spell-area, hence @@ -2908,7 +2908,7 @@ this won't have much visible effect. </attribute> <attribute arch="speed" editor="casting speed" type="float"> - The <casting speed> defines the spellcasting speed of the + The <casting speed> defines the spell-casting speed of the wall. You can fine-tune how long the duration between two casts shall be. If you want to create a wall that can be activated (cast per trigger) via connected lever/button/etc, you must set "speed 0". @@ -3144,7 +3144,7 @@ If you create special monsters of tweaked strength/abilities, always make sure that the <experience> is set to a reasonable value. Compare with existing arches to get a feeling what reasonable means. - Keep in mind that spellcasting monsters are a lot harder to kill + Keep in mind that spell-casting monsters are a lot harder to kill than non spell casters! </attribute> <attribute arch="speed" editor="speed" type="float"> @@ -3187,8 +3187,8 @@ moves, there is a 1% chance to breed. If set to 20, each time the monster moves there is a 5% chance. - Warning: Do not create spellcasting and breeding monsters since this - field is also used as <max spellpoints>. + Warning: Do not create spell-casting and breeding monsters since + this field is also used as <max spellpoints>. </attribute> <attribute arch="use_content_on_gen" editor="template generation" type="bool"> This only takes effect if <multiply> is enabled. The monster @@ -3225,15 +3225,15 @@ </attribute> <section name="melee"> - <attribute arch="attacktype" editor="attacktype" type="bitmask_attacktype"> - This number is a bitmask, specifying the monster's attacktypes - for melee damage. Attacktypes are: physical, magical, fire, + <attribute arch="attacktype" editor="attack type" type="bitmask_attacktype"> + This number is a bitmask, specifying the monster's attack types + for melee damage. Attack types are: physical, magical, fire, cold.. etc. Strong monsters often have more than just physical - attacktype. + attack type. - When a monster with multiple attacktypes hits an opponent, it - will do as much damage as the "best" of it's attacktypes does. - So, the more attacktypes, the more dangerous. Attacktypes + When a monster with multiple attack types hits an opponent, it + will do as much damage as the "best" of it's attack types does. + So, the more attack types, the more dangerous. Attack types "magic" and "chaos" are somehow exceptions. </attribute> <attribute arch="dam" editor="damage" type="int" min="0" max="32767"> @@ -3280,7 +3280,7 @@ Monsters with <hitback> enabled hurt the attacker in proportion to the amount of damage the *attacker* inflicted. This damage is additional to the regular melee damage of the - monster. As far as I know, hitback uses acid attacktype, and it + monster. As far as I know, hitback uses acid attack type, and it only takes effect if the monster actually has acid attacktype at it's disposal. Acid spheres for example use this feature. </attribute> @@ -3307,7 +3307,7 @@ Like players, monsters need <spellpoints> to do magic. Monsters use them for both wizard- and prayer-spells. However, this value defines only the amount of *initial* spellpoints the - monster starts with. When creating a spellcasting monster, + monster starts with. When creating a spell-casting monster, remember that <max spellpoints> and <spellpoint regen.> are more important than just initial <spellpoints>. </attribute> @@ -3317,14 +3317,14 @@ unless the monster has a decent <spellpoint regen.>, or the spell "regenerate mana" at it's disposal. - Warning: Do not create spellcasting and breeding monsters since + Warning: Do not create spell-casting and breeding monsters since this field is also used as <multiply speed>. </attribute> <attribute arch="Pow" editor="spellpoint regen." type="int" min="0" max="127"> Monsters regenerate this many spellpoints each 16 ticks. Hence, the spellpoint regeneration rate is independent of <speed>. - To make a real tough spellcasting monster, the rate of + To make a real tough spell-casting monster, the rate of spellpoint regeneration is most important. If your monster is still not casting fast enough, give it the spell-ability of "regenerate mana". That, paired with high <max spellpoints>, @@ -4013,11 +4013,11 @@ really fulfill a useful purpose. In fact, even bows and crossbows are rarely ever used. ]]> </use> - <attribute arch="attacktype" editor="attacktype" type="bitmask_attacktype"> - This number is a bitmask, specifying the projectile's attacktypes. - Attacktypes are: physical, magical, fire, cold.. etc. This works + <attribute arch="attacktype" editor="attack type" type="bitmask_attacktype"> + This number is a bitmask, specifying the projectile's attack types. + Attack types are: physical, magical, fire, cold.. etc. This works identical to melee weapons. Note that shooting weapons cannot have - attacktypes. + attack types. </attribute> <attribute arch="race" editor="ammunition class" type="string"> Only shooting weapons with matching <ammunition class> can @@ -4082,7 +4082,7 @@ <description><![CDATA[ Rings are worn on the hands - one ring each. Wearing rings, the object's stats will directly be inherited to the player. Usually - enhancing his spellcasting potential. ]]> + enhancing his spell-casting potential. ]]> </description> <use><![CDATA[ When you create an artifact ring, never forget that players can @@ -4091,7 +4091,7 @@ <br> <br> Also keep in mind that rings are generally the wizard's tools. They - should primarily grant bonuses to spellcasting abilities and + should primarily grant bonuses to spell-casting abilities and non-physical resistances. ]]> </use> </type> @@ -4161,7 +4161,7 @@ <br> <br> Runes hit any monster or person who steps on them for 'dam' damage - in 'attacktype' attacktype. Alternatively, the rune could contain + in 'attack type' attack type. Alternatively, the rune could contain any spell, and will cast this spell when it detonates. Yet another kind is the "summoning rune", summoning predefined monsters of any kind, at detonation. @@ -4171,8 +4171,8 @@ </description> <use><![CDATA[ Avoid monsters stepping on your runes. For example, summoning runes - together with spellcasting- and attack-runes is usually a bad idea. - ]]> + together with spell-casting- and attack-runes is usually a bad + idea.]]> </use> <attribute arch="no_pick" value="1" type="fixed"/> <attribute arch="move_on" value="walk" type="fixed"/> @@ -4206,9 +4206,9 @@ if it doesn't contain a spell. This should be set in reasonable relation to the rune's level. </attribute> - <attribute arch="attacktype" editor="attacktype" type="bitmask_attacktype"> + <attribute arch="attacktype" editor="attack type" type="bitmask_attacktype"> If there isn't any spell (and <summon monster> is unset), this - attribute defines what attacktype to use for direct damage when the + attribute defines what attack type to use for direct damage when the rune detonates. </attribute> <section name="spellcraft"> @@ -4233,7 +4233,7 @@ <attribute arch="race" editor="summon monster" type="string"> If this is set to the arch name of any monster, together with <spell name> "summon evil monster", the rune will summon a - bunch of those on detonation. (dam and attacktype will still be + bunch of those on detonation. (dam and attack type will still be ignored in this case). Runes are even capable of summoning multi-square monsters, given enough space. You'd better test it though. @@ -4465,7 +4465,7 @@ <section name="bonus"> <attribute arch="luck" editor="luck bonus" type="int" min="-128" max="127"> With positive luck bonus, the player is more likely to succeed - in all sorts of things (spellcasting, praying,...). Unless the + in all sorts of things (spell-casting, praying,...). Unless the <luck bonus> is very high, the effect will be barely visible in-game. Luck bonus on one piece of equipment should never exceed 3, and such bonus should not be too frequently @@ -5212,7 +5212,7 @@ <br> <br> Traps hit any monster or person who steps on them for 'dam' damage - in 'attacktype' attacktype and/or trigger a reaction. + in 'attack type' attacktype and/or trigger a reaction. <br> <br> Many traps are already defined in the archetypes. ]]> @@ -5249,9 +5249,9 @@ <direct damage> specifies how much damage is done by the trap. This should be set in reasonable relation to the trap's level. </attribute> - <attribute arch="attacktype" editor="attacktype" type="bitmask_attacktype"> - This attribute defines what attacktype to use for direct damage when - the trap detonates. + <attribute arch="attacktype" editor="attack type" type="bitmask_attacktype"> + This attribute defines what attack type to use for direct damage + when the trap detonates. </attribute> <attribute arch="connected" editor="connection" type="int"> When the trap is detonated, all objects with the same connection @@ -5596,24 +5596,25 @@ Keep play balance in mind! Such items mustn't be reachable without hard fighting AND questing. ]]> </use> - <attribute arch="attacktype" editor="attacktype" type="bitmask_attacktype"> - This number is a bitmask, specifying the weapon's attacktypes. - Attacktypes are: physical, magical, fire, cold.. etc. Most artifact - weapons have no more than one or two attacktypes. Keep in mind that + <attribute arch="attacktype... [truncated message content] |
From: <aki...@us...> - 2011-03-26 22:09:08
|
Revision: 8884 http://gridarta.svn.sourceforge.net/gridarta/?rev=8884&view=rev Author: akirschbaum Date: 2011-03-26 22:09:02 +0000 (Sat, 26 Mar 2011) Log Message: ----------- Add serialVersionUID fields. Modified Paths: -------------- trunk/model/src/app/net/sf/gridarta/model/anim/AbstractAnimationObjects.java trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetype.java trunk/model/src/app/net/sf/gridarta/model/face/AbstractFaceObjects.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/treasurelist/TreasureObj.java Modified: trunk/model/src/app/net/sf/gridarta/model/anim/AbstractAnimationObjects.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/anim/AbstractAnimationObjects.java 2011-03-26 22:06:45 UTC (rev 8883) +++ trunk/model/src/app/net/sf/gridarta/model/anim/AbstractAnimationObjects.java 2011-03-26 22:09:02 UTC (rev 8884) @@ -34,6 +34,11 @@ public abstract class AbstractAnimationObjects<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends AbstractNamedObjects<AnimationObject> implements AnimationObjects<G, A, R> { /** + * The serial version UID. + */ + private static final long serialVersionUID = 1L; + + /** * Creates a new instance. * @param name the localized name of the object type, e.g. used in dialogs */ Modified: trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetype.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetype.java 2011-03-26 22:06:45 UTC (rev 8883) +++ trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetype.java 2011-03-26 22:09:02 UTC (rev 8884) @@ -38,6 +38,11 @@ public abstract class AbstractArchetype<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends AbstractBaseObject<G, A, R, R> implements Archetype<G, A, R> { /** + * The serial version UID. + */ + private static final long serialVersionUID = 1L; + + /** * The name of this archetype. * @serial */ Modified: trunk/model/src/app/net/sf/gridarta/model/face/AbstractFaceObjects.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/face/AbstractFaceObjects.java 2011-03-26 22:06:45 UTC (rev 8883) +++ trunk/model/src/app/net/sf/gridarta/model/face/AbstractFaceObjects.java 2011-03-26 22:09:02 UTC (rev 8884) @@ -34,6 +34,11 @@ public abstract class AbstractFaceObjects<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends AbstractNamedObjects<FaceObject> implements FaceObjects<G, A, R> { /** + * The serial version UID. + */ + private static final long serialVersionUID = 1L; + + /** * Creates a new instance. * @param name localized name of the object type, e.g. used in dialogs */ Modified: trunk/model/src/app/net/sf/gridarta/model/gameobject/AbstractGameObject.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/gameobject/AbstractGameObject.java 2011-03-26 22:06:45 UTC (rev 8883) +++ trunk/model/src/app/net/sf/gridarta/model/gameobject/AbstractGameObject.java 2011-03-26 22:09:02 UTC (rev 8884) @@ -38,6 +38,11 @@ public abstract class AbstractGameObject<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends AbstractBaseObject<G, A, R, G> implements GameObject<G, A, R> { /** + * The serial version UID. + */ + private static final long serialVersionUID = 1L; + + /** * The {@link Archetype} of this game object. Set to <code>null</code> if * not yet known. * @serial Modified: trunk/model/src/app/net/sf/gridarta/model/gameobject/DefaultIsoGameObject.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/gameobject/DefaultIsoGameObject.java 2011-03-26 22:06:45 UTC (rev 8883) +++ trunk/model/src/app/net/sf/gridarta/model/gameobject/DefaultIsoGameObject.java 2011-03-26 22:09:02 UTC (rev 8884) @@ -35,6 +35,11 @@ public abstract class DefaultIsoGameObject<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends AbstractGameObject<G, A, R> { /** + * The serial version UID. + */ + private static final long serialVersionUID = 1L; + + /** * The {@link FaceObjectProviders} for looking up faces. */ @NotNull Modified: trunk/model/src/app/net/sf/gridarta/model/treasurelist/TreasureObj.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/treasurelist/TreasureObj.java 2011-03-26 22:06:45 UTC (rev 8883) +++ trunk/model/src/app/net/sf/gridarta/model/treasurelist/TreasureObj.java 2011-03-26 22:09:02 UTC (rev 8884) @@ -32,6 +32,11 @@ public abstract class TreasureObj implements Serializable { /** + * The serial version UID. + */ + private static final long serialVersionUID = 1L; + + /** * Unset values. */ public static final int UNSET = -1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-03-26 22:06:52
|
Revision: 8883 http://gridarta.svn.sourceforge.net/gridarta/?rev=8883&view=rev Author: akirschbaum Date: 2011-03-26 22:06:45 +0000 (Sat, 26 Mar 2011) Log Message: ----------- Accelerate code. Modified Paths: -------------- trunk/model/src/app/net/sf/gridarta/model/filter/NamedFilter.java Modified: trunk/model/src/app/net/sf/gridarta/model/filter/NamedFilter.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/filter/NamedFilter.java 2011-03-26 22:04:12 UTC (rev 8882) +++ trunk/model/src/app/net/sf/gridarta/model/filter/NamedFilter.java 2011-03-26 22:06:45 UTC (rev 8883) @@ -140,8 +140,8 @@ @Override public NamedFilterConfig createConfig() { final NamedFilterConfig filterConfig = new NamedFilterConfig(this); - for (final String name : subFilters.keySet()) { - fireEvent(NamedFilterChangeType.ADD, name, subFilters.get(name)); + for (final Map.Entry<String, Filter<?, ?>> filterEntry : subFilters.entrySet()) { + fireEvent(NamedFilterChangeType.ADD, filterEntry.getKey(), filterEntry.getValue()); } resetConfig(filterConfig); return filterConfig; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-03-26 22:04:18
|
Revision: 8882 http://gridarta.svn.sourceforge.net/gridarta/?rev=8882&view=rev Author: akirschbaum Date: 2011-03-26 22:04:12 +0000 (Sat, 26 Mar 2011) Log Message: ----------- Rename identifiers. Modified Paths: -------------- trunk/gridarta.ipr trunk/model/src/app/net/sf/gridarta/model/match/Operation.java trunk/src/app/net/sf/gridarta/gui/shortcuts/ShortcutsDialog.java trunk/utils/src/app/net/sf/gridarta/utils/StringParameterBuilder.java Modified: trunk/gridarta.ipr =================================================================== --- trunk/gridarta.ipr 2011-03-26 21:51:49 UTC (rev 8881) +++ trunk/gridarta.ipr 2011-03-26 22:04:12 UTC (rev 8882) @@ -432,7 +432,7 @@ </inspection_tool> <inspection_tool class="EnumeratedConstantNamingConvention" enabled="true" level="WARNING" enabled_by_default="true"> <option name="m_regex" value="[A-Z][A-Z_\d]*" /> - <option name="m_minLength" value="3" /> + <option name="m_minLength" value="2" /> <option name="m_maxLength" value="32" /> </inspection_tool> <inspection_tool class="EqualsAndHashcode" enabled="true" level="WARNING" enabled_by_default="true" /> @@ -499,8 +499,8 @@ </inspection_tool> <inspection_tool class="InstanceVariableNamingConvention" 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" /> - <option name="m_maxLength" value="32" /> + <option name="m_minLength" value="1" /> + <option name="m_maxLength" value="64" /> </inspection_tool> <inspection_tool class="InstanceVariableUninitializedUse" enabled="true" level="WARNING" enabled_by_default="true"> <option name="m_ignorePrimitives" value="false" /> @@ -747,7 +747,7 @@ <inspection_tool class="StaticInheritance" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="StaticMethodNamingConvention" enabled="true" level="WARNING" enabled_by_default="true"> <option name="m_regex" value="[a-z][A-Za-z\d]*" /> - <option name="m_minLength" value="4" /> + <option name="m_minLength" value="3" /> <option name="m_maxLength" value="64" /> </inspection_tool> <inspection_tool class="StaticSuite" enabled="true" level="WARNING" enabled_by_default="true" /> Modified: trunk/model/src/app/net/sf/gridarta/model/match/Operation.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/match/Operation.java 2011-03-26 21:51:49 UTC (rev 8881) +++ trunk/model/src/app/net/sf/gridarta/model/match/Operation.java 2011-03-26 22:04:12 UTC (rev 8882) @@ -23,6 +23,7 @@ * Operator. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ +@SuppressWarnings({ "EnumeratedConstantNamingConvention" }) public enum Operation { eq, Modified: trunk/src/app/net/sf/gridarta/gui/shortcuts/ShortcutsDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/shortcuts/ShortcutsDialog.java 2011-03-26 21:51:49 UTC (rev 8881) +++ trunk/src/app/net/sf/gridarta/gui/shortcuts/ShortcutsDialog.java 2011-03-26 22:04:12 UTC (rev 8882) @@ -97,13 +97,13 @@ * The {@link Pattern} to split a list of action categories. */ @NotNull - private static final Pattern patternCategories = Pattern.compile(","); + private static final Pattern PATTERN_CATEGORIES = Pattern.compile(","); /** * The {@link Pattern} to split a category into sub-categories. */ @NotNull - private static final Pattern patterSubCategories = Pattern.compile("/"); + private static final Pattern PATTERN_SUB_CATEGORIES = Pattern.compile("/"); /** * The {@link JButton} for ok. @@ -419,7 +419,7 @@ private void createNodes(@NotNull final DefaultMutableTreeNode root) { for (final Action action : shortcutsManager) { final String categories = ActionUtils.getActionCategory(action); - for (final String category : patternCategories.split(categories, -1)) { + for (final String category : PATTERN_CATEGORIES.split(categories, -1)) { addNode(root, category, action); } } @@ -446,7 +446,7 @@ @NotNull private static DefaultMutableTreeNode getOrCreateNodeForCategory(@NotNull final DefaultMutableTreeNode root, @NotNull final CharSequence category) { DefaultMutableTreeNode node = root; - for (final String subCategory : patterSubCategories.split(category, -1)) { + for (final String subCategory : PATTERN_SUB_CATEGORIES.split(category, -1)) { node = getOrCreateChildNode(node, subCategory); } return node; Modified: trunk/utils/src/app/net/sf/gridarta/utils/StringParameterBuilder.java =================================================================== --- trunk/utils/src/app/net/sf/gridarta/utils/StringParameterBuilder.java 2011-03-26 21:51:49 UTC (rev 8881) +++ trunk/utils/src/app/net/sf/gridarta/utils/StringParameterBuilder.java 2011-03-26 22:04:12 UTC (rev 8882) @@ -35,7 +35,7 @@ * The {@link Pattern} for parameters. */ @NotNull - private static final Pattern pattern = Pattern.compile("\\$\\{([a-zA-Z]+)}"); + private static final Pattern PATTERN = Pattern.compile("\\$\\{([a-zA-Z]+)}"); /** * Maps parameter key to value. @@ -62,7 +62,7 @@ */ @NotNull public String replace(@NotNull final CharSequence spec) throws SyntaxErrorException { - final Matcher matcher = pattern.matcher(spec); + final Matcher matcher = PATTERN.matcher(spec); final StringBuffer sb = new StringBuffer(); while (matcher.find()) { final String key = matcher.group(1); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-03-26 21:51:55
|
Revision: 8881 http://gridarta.svn.sourceforge.net/gridarta/?rev=8881&view=rev Author: akirschbaum Date: 2011-03-26 21:51:49 +0000 (Sat, 26 Mar 2011) Log Message: ----------- Replace for with while. Modified Paths: -------------- trunk/src/doc/dev/SafeCopy.java Modified: trunk/src/doc/dev/SafeCopy.java =================================================================== --- trunk/src/doc/dev/SafeCopy.java 2011-03-26 21:49:29 UTC (rev 8880) +++ trunk/src/doc/dev/SafeCopy.java 2011-03-26 21:51:49 UTC (rev 8881) @@ -13,7 +13,7 @@ final OutputStream out = new FileOutputStream(args[1]); try { final byte[] buf = new byte[4096]; - for (; ;) { + while (true) { final int bytesRead = in.read(buf); if (bytesRead == -1) { break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-03-26 21:49:35
|
Revision: 8880 http://gridarta.svn.sourceforge.net/gridarta/?rev=8880&view=rev Author: akirschbaum Date: 2011-03-26 21:49:29 +0000 (Sat, 26 Mar 2011) Log Message: ----------- Weaken types. Modified Paths: -------------- trunk/model/src/app/net/sf/gridarta/model/data/AbstractNamedObject.java trunk/model/src/app/net/sf/gridarta/model/exitconnector/ExitMatcher.java trunk/src/app/net/sf/gridarta/gui/connectionview/Connection.java trunk/src/app/net/sf/gridarta/gui/findarchetypes/TableModel.java trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareView.java trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/ButtonList.java trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/DoubleButtonList.java Modified: trunk/model/src/app/net/sf/gridarta/model/data/AbstractNamedObject.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/data/AbstractNamedObject.java 2011-03-25 20:35:35 UTC (rev 8879) +++ trunk/model/src/app/net/sf/gridarta/model/data/AbstractNamedObject.java 2011-03-26 21:49:29 UTC (rev 8880) @@ -97,7 +97,7 @@ if (obj == null || obj.getClass() != getClass()) { return false; } - final NamedObject abstractNamedObject = (AbstractNamedObject) obj; + final NamedObject abstractNamedObject = (NamedObject) obj; return getName().equals(abstractNamedObject.getName()); } Modified: trunk/model/src/app/net/sf/gridarta/model/exitconnector/ExitMatcher.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/exitconnector/ExitMatcher.java 2011-03-25 20:35:35 UTC (rev 8879) +++ trunk/model/src/app/net/sf/gridarta/model/exitconnector/ExitMatcher.java 2011-03-26 21:49:29 UTC (rev 8880) @@ -97,6 +97,7 @@ * found */ @Nullable + @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/src/app/net/sf/gridarta/gui/connectionview/Connection.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/connectionview/Connection.java 2011-03-25 20:35:35 UTC (rev 8879) +++ trunk/src/app/net/sf/gridarta/gui/connectionview/Connection.java 2011-03-26 21:49:29 UTC (rev 8880) @@ -61,6 +61,7 @@ * @return the key */ @NotNull + @SuppressWarnings({ "TypeMayBeWeakened" }) public K getKey() { return key; } Modified: trunk/src/app/net/sf/gridarta/gui/findarchetypes/TableModel.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/findarchetypes/TableModel.java 2011-03-25 20:35:35 UTC (rev 8879) +++ trunk/src/app/net/sf/gridarta/gui/findarchetypes/TableModel.java 2011-03-26 21:49:29 UTC (rev 8880) @@ -134,6 +134,7 @@ * @return the row content */ @NotNull + @SuppressWarnings({ "TypeMayBeWeakened" }) public R get(final int index) { return archetypes.get(sorting[index]); } Modified: trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareView.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareView.java 2011-03-25 20:35:35 UTC (rev 8879) +++ trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareView.java 2011-03-26 21:49:29 UTC (rev 8880) @@ -498,6 +498,7 @@ * @return the game object, or <code>null</code> if the index is invalid */ @Nullable + @SuppressWarnings({ "TypeMayBeWeakened" }) G getListGameObject(final int index) { final int actualIndex = getValidIndex(index); if (actualIndex >= model.getSize()) { Modified: trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/ButtonList.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/ButtonList.java 2011-03-25 20:35:35 UTC (rev 8879) +++ trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/ButtonList.java 2011-03-26 21:49:29 UTC (rev 8880) @@ -191,7 +191,7 @@ * @return the container */ @NotNull - public Container getButtons() { + public Component getButtons() { return buttons; } Modified: trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/DoubleButtonList.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/DoubleButtonList.java 2011-03-25 20:35:35 UTC (rev 8879) +++ trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/DoubleButtonList.java 2011-03-26 21:49:29 UTC (rev 8880) @@ -20,6 +20,7 @@ package net.sf.gridarta.gui.utils.tabbedpanel; import java.awt.BorderLayout; +import java.awt.Component; import java.awt.Container; import javax.swing.AbstractButton; import javax.swing.JPanel; @@ -128,7 +129,7 @@ * @return the container */ @NotNull - public Container getButtons() { + public Component getButtons() { return buttons; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-03-25 20:35:41
|
Revision: 8879 http://gridarta.svn.sourceforge.net/gridarta/?rev=8879&view=rev Author: akirschbaum Date: 2011-03-25 20:35:35 +0000 (Fri, 25 Mar 2011) Log Message: ----------- Prepend "python.exe" to map-checker.py on Windows machines; Add hacks to allow spaces in file names. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/model/src/app/net/sf/gridarta/model/validation/checks/MapCheckerScriptChecker.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2011-03-24 03:53:48 UTC (rev 8878) +++ trunk/atrinik/ChangeLog 2011-03-25 20:35:35 UTC (rev 8879) @@ -1,3 +1,10 @@ +2011-03-25 Andreas Kirschbaum + + * Prepend "python.exe" to map-checker.py on Windows machines. + + * Add hacks to allow spaces in file names for map-checker.py on + Windows machines. + 2011-03-24 Andreas Kirschbaum * Pass correct map file name to map-checker.py on Windows 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-03-24 03:53:48 UTC (rev 8878) +++ trunk/model/src/app/net/sf/gridarta/model/validation/checks/MapCheckerScriptChecker.java 2011-03-25 20:35:35 UTC (rev 8879) @@ -85,19 +85,24 @@ private final MapWriter<G, A, R> mapWriter; /** - * The command to execute and the arguments to pass. + * The {@link CommandFinder} for the script to execute. */ @NotNull - private final String[] args; + private final CommandFinder commandFinder1 = new CommandFinder(); /** - * The command to execute. Set to <code>null</code> if unknown. Otherwise - * points to <code>{@link #args}[0]</code>. + * The {@link CommandFinder} for the script interpreter. */ - @Nullable - private File cachedCommand = null; + @NotNull + private final CommandFinder commandFinder2 = new CommandFinder(); /** + * The command to execute and the arguments to pass. + */ + @NotNull + private final String[] args; + + /** * The temp file for saving maps to be checked. Set to <code>null</code> * until created. */ @@ -355,36 +360,75 @@ return null; } - final String[] result = new String[args.length]; + final boolean isWindows = System.getProperty("os.name").contains("Windows"); + final String[] result; + int index = 0; try { - result[0] = getCommand(); + if (isWindows) { + if (args[0].toLowerCase().endsWith(".py")) { + result = new String[args.length + 1]; + String command; + try { + command = commandFinder2.getCommand("python.exe"); + } catch (final IOException ex) { + command = "C:" + File.separator + "python27" + File.separator + "python.exe"; + if (!new File(command).exists()) { + throw ex; + } + } + result[index++] = "\"" + command + "\""; + } else { + result = new String[args.length]; + } + result[index++] = "\"" + commandFinder1.getCommand(args[0]) + "\""; + } else { + result = new String[args.length]; + result[index++] = commandFinder1.getCommand(args[0]); + } } catch (final IOException ex) { errorCollector.collect(new MapCheckerScriptMissingError<G, A, R>(mapModel, args[0], ex.getMessage())); return null; } final String mapPathQuoted = Matcher.quoteReplacement(mapPath); - for (int i = 1; i < result.length; i++) { - result[i] = args[i].replaceAll(QUOTED_MAP_PLACEHOLDER, mapPathQuoted); + for (int i = 1; i < args.length; i++) { + final String tmp = args[i].replaceAll(QUOTED_MAP_PLACEHOLDER, mapPathQuoted); + result[index++] = isWindows ? "\"" + tmp + "\"" : tmp; } return result; } /** - * Returns the command to execute. Returns or updates {@link - * #cachedCommand}. - * @return the command to execute - * @throws IOException if the command cannot be found + * Searches for commands in the PATH environment variable. + * @author Andreas Kirschbaum */ - @NotNull - private String getCommand() throws IOException { - final File existingCommand = cachedCommand; - if (existingCommand != null && existingCommand.exists()) { - return existingCommand.getPath(); + private static class CommandFinder { + + /** + * The command to execute. Set to <code>null</code> if unknown. + * Otherwise points to <code>{@link #args}[0]</code>. + */ + @Nullable + private File cachedCommand = null; + + /** + * Returns the command to execute. Returns or updates {@link + * #cachedCommand}. + * @param commandName the command name to search + * @return the command to execute + * @throws IOException if the command cannot be found + */ + @NotNull + private String getCommand(@NotNull final String commandName) throws IOException { + final File existingCommand = cachedCommand; + if (existingCommand != null && existingCommand.exists()) { + return existingCommand.getPath(); + } + + final File command = IOUtils.findPathFile(commandName); + cachedCommand = command; + return command.getPath(); } - final File command = IOUtils.findPathFile(args[0]); - cachedCommand = command; - return command.getPath(); } } // class MapCheckerScriptChecker This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-03-24 03:53:54
|
Revision: 8878 http://gridarta.svn.sourceforge.net/gridarta/?rev=8878&view=rev Author: akirschbaum Date: 2011-03-24 03:53:48 +0000 (Thu, 24 Mar 2011) Log Message: ----------- Revert previous commit. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/messages.properties Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2011-03-24 03:42:13 UTC (rev 8877) +++ trunk/atrinik/ChangeLog 2011-03-24 03:53:48 UTC (rev 8878) @@ -1,7 +1,3 @@ -2011-03-24 Alex Tokar - - * Properly quote path names passed to map-checker.py. - 2011-03-24 Andreas Kirschbaum * Pass correct map file name to map-checker.py on Windows Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/messages.properties =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/messages.properties 2011-03-24 03:42:13 UTC (rev 8877) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/messages.properties 2011-03-24 03:53:48 UTC (rev 8878) @@ -172,4 +172,4 @@ validator.11=net.sf.gridarta.model.validation.checks.UndefinedArchetypeChecker validator.12=net.sf.gridarta.model.validation.checks.UndefinedFaceChecker validator.13=net.sf.gridarta.model.validation.checks.UnsetSlayingChecker 20,21,51,55,64,122 -validator.14=net.sf.gridarta.model.validation.checks.MapCheckerScriptChecker map-checker.py -c --text-only -a "${ARCH}" -r "${MAPS}/regions.reg" -m "${MAP}" +validator.14=net.sf.gridarta.model.validation.checks.MapCheckerScriptChecker map-checker.py -c --text-only -a ${ARCH} -r ${MAPS}/regions.reg -m ${MAP} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-03-24 03:42:19
|
Revision: 8877 http://gridarta.svn.sourceforge.net/gridarta/?rev=8877&view=rev Author: akirschbaum Date: 2011-03-24 03:42:13 +0000 (Thu, 24 Mar 2011) Log Message: ----------- Properly quote path names passed to map-checker.py. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/messages.properties Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2011-03-24 03:39:26 UTC (rev 8876) +++ trunk/atrinik/ChangeLog 2011-03-24 03:42:13 UTC (rev 8877) @@ -1,3 +1,7 @@ +2011-03-24 Alex Tokar + + * Properly quote path names passed to map-checker.py. + 2011-03-24 Andreas Kirschbaum * Pass correct map file name to map-checker.py on Windows Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/messages.properties =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/messages.properties 2011-03-24 03:39:26 UTC (rev 8876) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/messages.properties 2011-03-24 03:42:13 UTC (rev 8877) @@ -172,4 +172,4 @@ validator.11=net.sf.gridarta.model.validation.checks.UndefinedArchetypeChecker validator.12=net.sf.gridarta.model.validation.checks.UndefinedFaceChecker validator.13=net.sf.gridarta.model.validation.checks.UnsetSlayingChecker 20,21,51,55,64,122 -validator.14=net.sf.gridarta.model.validation.checks.MapCheckerScriptChecker map-checker.py -c --text-only -a ${ARCH} -r ${MAPS}/regions.reg -m ${MAP} +validator.14=net.sf.gridarta.model.validation.checks.MapCheckerScriptChecker map-checker.py -c --text-only -a "${ARCH}" -r "${MAPS}/regions.reg" -m "${MAP}" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-03-24 03:39:32
|
Revision: 8876 http://gridarta.svn.sourceforge.net/gridarta/?rev=8876&view=rev Author: akirschbaum Date: 2011-03-24 03:39:26 +0000 (Thu, 24 Mar 2011) Log Message: ----------- Pass correct map file name to map-checker.py on Windows machines. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/model/src/app/net/sf/gridarta/model/validation/checks/MapCheckerScriptChecker.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2011-03-22 21:01:35 UTC (rev 8875) +++ trunk/atrinik/ChangeLog 2011-03-24 03:39:26 UTC (rev 8876) @@ -1,3 +1,8 @@ +2011-03-24 Andreas Kirschbaum + + * Pass correct map file name to map-checker.py on Windows + machines. + 2011-03-22 Andreas Kirschbaum * Allow map paths starting with /random/. 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-03-22 21:01:35 UTC (rev 8875) +++ trunk/model/src/app/net/sf/gridarta/model/validation/checks/MapCheckerScriptChecker.java 2011-03-24 03:39:26 UTC (rev 8876) @@ -362,8 +362,9 @@ errorCollector.collect(new MapCheckerScriptMissingError<G, A, R>(mapModel, args[0], ex.getMessage())); return null; } + final String mapPathQuoted = Matcher.quoteReplacement(mapPath); for (int i = 1; i < result.length; i++) { - result[i] = args[i].replaceAll(QUOTED_MAP_PLACEHOLDER, mapPath); + result[i] = args[i].replaceAll(QUOTED_MAP_PLACEHOLDER, mapPathQuoted); } return result; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-03-22 21:01:43
|
Revision: 8875 http://gridarta.svn.sourceforge.net/gridarta/?rev=8875&view=rev Author: akirschbaum Date: 2011-03-22 21:01:35 +0000 (Tue, 22 Mar 2011) Log Message: ----------- Allow map paths starting with /random/. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/build.xml trunk/crossfire/ChangeLog trunk/daimonin/ChangeLog trunk/model/src/app/net/sf/gridarta/model/validation/checks/ExitChecker.java trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapLocation.java Added Paths: ----------- trunk/test-mapvalidator/atrinik/ trunk/test-mapvalidator/atrinik/arch/ trunk/test-mapvalidator/atrinik/arch/artifacts trunk/test-mapvalidator/atrinik/arch/dev/ trunk/test-mapvalidator/atrinik/arch/dev/editor/ trunk/test-mapvalidator/atrinik/arch/dev/editor/conf/ trunk/test-mapvalidator/atrinik/arch/dev/editor/conf/GameObjectMatchers.xml trunk/test-mapvalidator/atrinik/arch/dev/editor/conf/TreasureLists.xml trunk/test-mapvalidator/atrinik/arch/dev/editor/conf/archdef.dat trunk/test-mapvalidator/atrinik/arch/dev/editor/conf/autojoin.txt trunk/test-mapvalidator/atrinik/arch/dev/editor/conf/spells.xml trunk/test-mapvalidator/atrinik/arch/dev/editor/conf/types.xml trunk/test-mapvalidator/atrinik/arch/dev/editor/pickmaps/ trunk/test-mapvalidator/atrinik/arch/floor_volcano_2.arc trunk/test-mapvalidator/atrinik/arch/stairs_stone_down.arc trunk/test-mapvalidator/atrinik/arch/treasures trunk/test-mapvalidator/atrinik/maps/ trunk/test-mapvalidator/atrinik/maps/dev/ trunk/test-mapvalidator/atrinik/maps/dev/editor/ trunk/test-mapvalidator/atrinik/maps/dev/editor/scripts/ trunk/test-mapvalidator/atrinik/maps/dev/editor/scripts/MapValidator trunk/test-mapvalidator/atrinik/maps/random_stairs_test trunk/test-mapvalidator/atrinik/maps/random_stairs_test.expected trunk/test-mapvalidator/atrinik/regtest.conf Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2011-03-19 16:22:21 UTC (rev 8874) +++ trunk/atrinik/ChangeLog 2011-03-22 21:01:35 UTC (rev 8875) @@ -1,3 +1,7 @@ +2011-03-22 Andreas Kirschbaum + + * Allow map paths starting with /random/. + 2011-03-19 Andreas Kirschbaum * Increase maximum execution time for map-checker.py map validator Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2011-03-19 16:22:21 UTC (rev 8874) +++ trunk/build.xml 2011-03-22 21:01:35 UTC (rev 8875) @@ -967,7 +967,7 @@ </javadoc> </target> - <target name="test" description="Executes all tests." depends="test-junit,test-mapvalidator-crossfire,test-mapvalidator-daimonin"/> + <target name="test" description="Executes all tests." depends="test-junit,test-mapvalidator-atrinik,test-mapvalidator-crossfire,test-mapvalidator-daimonin"/> <target name="test-junit" description="Executes the junit tests." depends="test-atrinik,test-crossfire,test-daimonin,test-gridarta,test-model,test-preferences,test-script,test-textedit,test-utils"> <junitreport todir="${docs.dir}/test"> @@ -1173,6 +1173,13 @@ </junit> </target> + <target name="test-mapvalidator-atrinik" description="Executes the map validator tests using AtrinikEditor.jar." depends="jar-atrinik"> + <java jar="AtrinikEditor.jar" failonerror="true" fork="true"> + <arg value="--config=test-mapvalidator/atrinik/regtest.conf"/> + <arg value="--script=MapValidator"/> + </java> + </target> + <target name="test-mapvalidator-crossfire" description="Executes the map validator tests using CrossfireEditor.jar." depends="jar-crossfire"> <java jar="CrossfireEditor.jar" failonerror="true" fork="true"> <arg value="--config=test-mapvalidator/crossfire/regtest.conf"/> Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2011-03-19 16:22:21 UTC (rev 8874) +++ trunk/crossfire/ChangeLog 2011-03-22 21:01:35 UTC (rev 8875) @@ -1,3 +1,7 @@ +2011-03-22 Andreas Kirschbaum + + * Allow map paths starting with /random/. + 2011-03-18 Andreas Kirschbaum * Correctly display special characters (<, >, and &) in map tooltips. Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2011-03-19 16:22:21 UTC (rev 8874) +++ trunk/daimonin/ChangeLog 2011-03-22 21:01:35 UTC (rev 8875) @@ -1,3 +1,7 @@ +2011-03-22 Andreas Kirschbaum + + * Allow map paths starting with /random/. + 2011-03-18 Andreas Kirschbaum * Correctly display special characters (<, >, and &) in map tooltips. Modified: trunk/model/src/app/net/sf/gridarta/model/validation/checks/ExitChecker.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/validation/checks/ExitChecker.java 2011-03-19 16:22:21 UTC (rev 8874) +++ trunk/model/src/app/net/sf/gridarta/model/validation/checks/ExitChecker.java 2011-03-22 21:01:35 UTC (rev 8875) @@ -71,7 +71,7 @@ } final String path = gameObject.getAttributeString("slaying", false); - if (path.length() <= 0 || path.equals("/!")) { + if (path.length() <= 0 || path.equals("/!") || path.startsWith("/random/")) { return; } Modified: trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapLocation.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapLocation.java 2011-03-19 16:22:21 UTC (rev 8874) +++ trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapLocation.java 2011-03-22 21:01:35 UTC (rev 8875) @@ -115,7 +115,7 @@ */ public static String getMapPath(@NotNull final BaseObject<?, ?, ?, ?> gameObject, final boolean allowRandomMapParameters) throws NoExitPathException { String path = gameObject.getAttributeString("slaying"); - if (allowRandomMapParameters && path.equals("/!")) { + if (allowRandomMapParameters && (path.equals("/!") || path.startsWith("/random/"))) { // destination is a random map; extract the final non-random map path = getRandomMapParameter(gameObject, "final_map"); if (path == null) { Property changes on: trunk/test-mapvalidator/atrinik/arch/artifacts ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/atrinik/arch/dev/editor/conf/GameObjectMatchers.xml =================================================================== --- trunk/test-mapvalidator/atrinik/arch/dev/editor/conf/GameObjectMatchers.xml (rev 0) +++ trunk/test-mapvalidator/atrinik/arch/dev/editor/conf/GameObjectMatchers.xml 2011-03-22 21:01:35 UTC (rev 8875) @@ -0,0 +1,84 @@ +<?xml version="1.0"?> +<!DOCTYPE GameObjectMatchers SYSTEM "GameObjectMatchers.dtd"> +<GameObjectMatchers> + <!-- Objects to be put below the floor in insertion tool --> + <GameObjectMatcher id="system_below_floor" system="true"> + <title xml:lang="en">Below Floor</title> + <TypeNrs numbers="-666" /> + </GameObjectMatcher> + + <!-- Objects to be put below the floor in insertion tool --> + <GameObjectMatcher id="system_wall" system="true"> + <title xml:lang="en">Wall</title> + <And> + <TypeNrs numbers="77 79" /> + <Attrib name="no_pass" type="int" op="ne" value="0" /> + </And> + </GameObjectMatcher> + + <!-- Objects to be treated as monsters in insertion tool --> + <GameObjectMatcher id="system_monster" system="true"> + <title xml:lang="en">Monster</title> + <TypeNrs numbers="80 81 83" /> + </GameObjectMatcher> + + <!-- Objects to be treated as exits by the GUI --> + <GameObjectMatcher id="system_exit" system="true"> + <title xml:lang="en">Exit</title> + <TypeNrs numbers="41 66 69 94 95" /> + </GameObjectMatcher> + + <!-- Objects to be checked by the "Critical slaying characters" map + validator. --> + <GameObjectMatcher id="system_environment_sensor" system="true"> + <title xml:lang="en">Environment Sensor</title> + <TypeNrs numbers="133" /> + </GameObjectMatcher> + + <GameObjectMatcher id="system_monster_only" system="true"> + <title xml:lang="en">Monster Only</title> + <TypeNrs numbers="80 83" /> + </GameObjectMatcher> + + <GameObjectMatcher id="system_combat_values_objects" system="true"> + <title xml:lang="en">Objects using "combat_values"</title> + <TypeNrs numbers="5 6 7 13 39 54 62 72 73 80 83 154 158" /> + </GameObjectMatcher> + + <!-- Objects checked by the "Suspicious connection" map validator: objects + matching this matcher are connection sources. --> + <GameObjectMatcher id="system_connection_source" system="true"> + <title xml:lang="en">Connected objects being a source</title> + <TypeNrs numbers="17 18 27 30 31 32 51 64 92 93 132 133 134" /> + </GameObjectMatcher> + + <!-- Objects checked by the "Suspicious connection" map validator: objects + matching this matcher are connection sinks. --> + <GameObjectMatcher id="system_connection_sink" system="true"> + <title xml:lang="en">Connected objects being a sink</title> + <Or> + <TypeNrs numbers="26 41 42 55 62 65 74 78 81 91 94 98 112 132" /> + </Or> + </GameObjectMatcher> + + <!-- Objects checked by the "Suspicious connection" map validator: objects + matching this matcher are connection sinks. This matcher exists in + order to match inventory objects since <Env> cannot be included + into <Or>. --> + <GameObjectMatcher id="system_connection_sink2" system="true"> + <title xml:lang="en">Connected objects being a sink</title> + <TypeNrs numbers="-666" /> + </GameObjectMatcher> + + <!-- Objects checked by the "Shop square contains paid item" map validator: + objects matching this matcher are paid items. --> + <GameObjectMatcher id="system_paid_item" system="true"> + <title xml:lang="en">Paid items</title> + <And> + <Attrib name="unpaid" type="int" value="0" /> + <Attrib name="no_teleport" type="int" value="0" /> + <Attrib name="monster" type="int" value="0" /> + <Attrib name="weight" type="int" op="ne" value="0" /> + </And> + </GameObjectMatcher> +</GameObjectMatchers> Property changes on: trunk/test-mapvalidator/atrinik/arch/dev/editor/conf/GameObjectMatchers.xml ___________________________________________________________________ Added: svn:mime-type + text/xml Added: svn:eol-style + LF Added: trunk/test-mapvalidator/atrinik/arch/dev/editor/conf/TreasureLists.xml =================================================================== --- trunk/test-mapvalidator/atrinik/arch/dev/editor/conf/TreasureLists.xml (rev 0) +++ trunk/test-mapvalidator/atrinik/arch/dev/editor/conf/TreasureLists.xml 2011-03-22 21:01:35 UTC (rev 8875) @@ -0,0 +1,4 @@ +<?xml version="1.0"?> +<!DOCTYPE lists SYSTEM "TreasureLists.dtd"> +<lists> +</lists> Property changes on: trunk/test-mapvalidator/atrinik/arch/dev/editor/conf/TreasureLists.xml ___________________________________________________________________ Added: svn:mime-type + text/xml Added: svn:eol-style + LF Added: trunk/test-mapvalidator/atrinik/arch/dev/editor/conf/archdef.dat =================================================================== --- trunk/test-mapvalidator/atrinik/arch/dev/editor/conf/archdef.dat (rev 0) +++ trunk/test-mapvalidator/atrinik/arch/dev/editor/conf/archdef.dat 2011-03-22 21:01:35 UTC (rev 8875) @@ -0,0 +1,16 @@ +0 0 +1 2 +2 1 +2 2 +2 3 +3 2 +3 3 +2 4 +4 2 +2 5 +5 2 +3 4 +4 3 +2 7 +7 2 +4 4 Property changes on: trunk/test-mapvalidator/atrinik/arch/dev/editor/conf/archdef.dat ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + text/plain Added: svn:eol-style + LF Property changes on: trunk/test-mapvalidator/atrinik/arch/dev/editor/conf/autojoin.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/atrinik/arch/dev/editor/conf/spells.xml =================================================================== --- trunk/test-mapvalidator/atrinik/arch/dev/editor/conf/spells.xml (rev 0) +++ trunk/test-mapvalidator/atrinik/arch/dev/editor/conf/spells.xml 2011-03-22 21:01:35 UTC (rev 8875) @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE spells SYSTEM "spells.dtd"> +<spells> + <spell id="0" name="none"/> +</spells> Property changes on: trunk/test-mapvalidator/atrinik/arch/dev/editor/conf/spells.xml ___________________________________________________________________ Added: svn:mime-type + text/xml Added: svn:eol-style + LF Added: trunk/test-mapvalidator/atrinik/arch/dev/editor/conf/types.xml =================================================================== --- trunk/test-mapvalidator/atrinik/arch/dev/editor/conf/types.xml (rev 0) +++ trunk/test-mapvalidator/atrinik/arch/dev/editor/conf/types.xml 2011-03-22 21:01:35 UTC (rev 8875) @@ -0,0 +1,38 @@ +<?xml version="1.0" standalone="no" ?><!DOCTYPE types SYSTEM "types.dtd"> +<types> + <bitmasks/> + <lists> + <list name="event"> + <listentry value="1" name="apply"/> + </list> + </lists> + <ignorelists/> + + <default_type> + <attribute arch="name" editor="name" type="string"> + This is the name of the object, displayed to the player. + </attribute> + </default_type> + + <type number="0" name="Misc"/> + + <type number="66" name="Exit"> + <attribute arch="slaying" editor="exit path" type="map_path"/> + <attribute arch="hp" editor="destination X" type="int"/> + <attribute arch="sp" editor="destination Y" type="int"/> + </type> + + <type number="71" name="Floor"> + <attribute arch="z" editor="height" type="int"/> + </type> + + <type number="80" name="Monster & NPC"> + <attribute arch="dam" editor="damage" type="int"/> + </type> + + <type number="81" name="Spawn Point"/> + + <type number="83" name="Spawn Point Monster"> + <attribute arch="dam" editor="damage" type="int"/> + </type> +</types> Property changes on: trunk/test-mapvalidator/atrinik/arch/dev/editor/conf/types.xml ___________________________________________________________________ Added: svn:mime-type + text/xml Added: svn:eol-style + LF Added: trunk/test-mapvalidator/atrinik/arch/floor_volcano_2.arc =================================================================== --- trunk/test-mapvalidator/atrinik/arch/floor_volcano_2.arc (rev 0) +++ trunk/test-mapvalidator/atrinik/arch/floor_volcano_2.arc 2011-03-22 21:01:35 UTC (rev 8875) @@ -0,0 +1,8 @@ +Object floor_volcano_2 +name floor +layer 1 +terrain_type 1 +type 71 +no_pick 1 +is_floor 1 +end Property changes on: trunk/test-mapvalidator/atrinik/arch/floor_volcano_2.arc ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/atrinik/arch/stairs_stone_down.arc =================================================================== --- trunk/test-mapvalidator/atrinik/arch/stairs_stone_down.arc (rev 0) +++ trunk/test-mapvalidator/atrinik/arch/stairs_stone_down.arc 2011-03-22 21:01:35 UTC (rev 8875) @@ -0,0 +1,13 @@ +Object stairs_stone_down +name stairs going down +is_animated 0 +anim_speed 1 +is_turnable 1 +direction 3 +no_teleport 1 +layer 5 +hp -1 +sp -1 +type 66 +no_pick 1 +end Property changes on: trunk/test-mapvalidator/atrinik/arch/stairs_stone_down.arc ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Property changes on: trunk/test-mapvalidator/atrinik/arch/treasures ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/atrinik/maps/dev/editor/scripts/MapValidator =================================================================== --- trunk/test-mapvalidator/atrinik/maps/dev/editor/scripts/MapValidator (rev 0) +++ trunk/test-mapvalidator/atrinik/maps/dev/editor/scripts/MapValidator 2011-03-22 21:01:35 UTC (rev 8875) @@ -0,0 +1,134 @@ +<?xml version="1.0" encoding="UTF-8"?> +<script> + <name>MapValidator</name> + <code><![CDATA[import java.io.BufferedWriter; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileWriter; +import java.io.InputStream; +import java.util.Iterator; +import net.sf.gridarta.model.gameobject.GameObject; +import net.sf.gridarta.model.io.RecursiveFileIterator; +import net.sf.gridarta.model.validation.ErrorCollector; +import net.sf.gridarta.model.validation.errors.ValidationError; + +String checkMap(File mapFile, String mapPath) { + try { + map = mapManager.openMapFile(mapFile, false); + } catch (IOException ex) { + print("Cannot load map '"+mapFile+"': "+ex.getMessage()); + return null; + } + if (map == null) { + print(mapPath + ":"); + print("- cannot load map file"); + return null; + } + + ErrorCollector errorCollector; + try { + try { + validators.validateAll(map.getMapModel()); + } finally { + errorCollector = map.getMapModel().getErrors(); + } + } finally { + mapManager.release(map); + } + + StringBuffer sb = new StringBuffer(); + Iterator it = errorCollector.iterator(); + while (it.hasNext()) { + ValidationError validationError = it.next(); + + sb.append(validationError); + + Iterator it2 = validationError.getGameObjects().iterator(); + while (it2.hasNext()) { + GameObject gameObject = it2.next(); + sb.append(" [").append(gameObject.getBestName()).append(']'); + } + + String parameter0 = validationError.getParameter(0); + if (parameter0 != null) { + sb.append(" [").append(parameter0); + String parameter1 = validationError.getParameter(1); + if (parameter1 != null) { + sb.append(", ").append(parameter1); + } + sb.append(']'); + } + sb.append("\n"); + } + + return sb.toString(); +} + +if (baseDirectory == null || baseDirectory.length() <= 0) { + baseDirectory = "/"; +} +print("Checking maps below " + baseDirectory + "..."); +if (baseDirectory.endsWith("/")) { + baseDirectory = baseDirectory.substring(0, baseDirectory.length() - 1); +} + +String mapDefaultFolder = globalSettings.getMapsDirectory().getPath(); +String rootDirectory = mapDefaultFolder + baseDirectory; +boolean ok = true; +Iterator it = new RecursiveFileIterator(new File(rootDirectory)); +while (it.hasNext()) { + File file = it.next(); + String name = file.getName(); + String path = file.getPath(); + if (file.isFile() + && path.startsWith(rootDirectory) + && !name.endsWith(".expected")) { + File expectedFile = new File(file.getPath() + ".expected"); + if (expectedFile.exists()) { + String result = checkMap(file, file.getPath().substring(mapDefaultFolder.length())); + + final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); + final InputStream inputStream = new FileInputStream(expectedFile); + try { + final byte[] buf = new byte[1024]; + for (;;) { + final int len = inputStream.read(buf); + if (len == -1) { + break; + } + byteArrayOutputStream.write(buf, 0, len); + } + } finally { + inputStream.close(); + } + final String expected = byteArrayOutputStream.toString("UTF-8"); + if (result.equals(expected)) { + print(file + ": OK"); + } else { + print(file + ": unexpected result:"); + print(result); + print("expected result:"); + print(expected); + ok = false; + } + } + } +} +if (!ok) { + throw new AssertionError(); +} +]]></code> + <mode> + <autoboot>false</autoboot> + <bash>true</bash> + <filter>false</filter> + </mode> + <parameter> + <name>baseDirectory</name> + <description>Base Directory</description> + <type>java.lang.String</type> + <value>/</value> + </parameter> +</script> + Property changes on: trunk/test-mapvalidator/atrinik/maps/dev/editor/scripts/MapValidator ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/atrinik/maps/random_stairs_test =================================================================== --- trunk/test-mapvalidator/atrinik/maps/random_stairs_test (rev 0) +++ trunk/test-mapvalidator/atrinik/maps/random_stairs_test 2011-03-22 21:01:35 UTC (rev 8875) @@ -0,0 +1,77 @@ +arch map +name /random/ +msg +Created: 2011-03-22 Alex Tokar +Modified: 2011-03-22 Alex Tokar +endmsg +width 24 +height 24 +difficulty 1 +darkness -1 +end +arch floor_volcano_2 +z 48 +x 6 +y 11 +end +arch stairs_stone_down +msg +layoutstyle snake +monsterstyle promethia_island +exitstyle stairs_stone +doorstyle none +dungeon_depth 114 +dungeon_level 48 +xsize 24 +ysize 24 +floorstyle volcano +wallstyle lava +num_monsters 10 +darkness 3 +level_increment 2 +orientation 1 +dungeon_name Promethia Island Volcano +bg_music escape.mid +decorstyle volcano +decorchance 5 +endmsg +slaying /random/ +hp 0 +sp 0 +direction 7 +x 6 +y 11 +end +arch floor_volcano_2 +z 48 +x 6 +y 12 +end +arch stairs_stone_down +msg +layoutstyle snake +monsterstyle promethia_island +exitstyle stairs_stone +doorstyle none +dungeon_depth 114 +dungeon_level 48 +xsize 24 +ysize 24 +floorstyle volcano +wallstyle lava +num_monsters 10 +darkness 3 +level_increment 2 +orientation 1 +dungeon_name Promethia Island Volcano +bg_music escape.mid +decorstyle volcano +decorchance 5 +endmsg +slaying /! +hp 0 +sp 0 +direction 7 +x 6 +y 12 +end Property changes on: trunk/test-mapvalidator/atrinik/maps/random_stairs_test ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Property changes on: trunk/test-mapvalidator/atrinik/maps/random_stairs_test.expected ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/atrinik/regtest.conf =================================================================== --- trunk/test-mapvalidator/atrinik/regtest.conf (rev 0) +++ trunk/test-mapvalidator/atrinik/regtest.conf 2011-03-22 21:01:35 UTC (rev 8875) @@ -0,0 +1,94 @@ + +# Whether the map validator is enabled. +MapValidator.All=true + +UpdaterAutoCheck=false + +# Whether this map validator check is is enabled. +Validator.AttributeRange=true + +# Whether this map validator check is is enabled. +Validator.BlockedMobOrSpawnPoint=true + +# Whether this map validator check is is enabled. +Validator.BlockedSpawnPoint=true + +# Whether this map validator check is is enabled. +Validator.ConnectedInsideContainer=true + +# Whether this map validator check is is enabled. +Validator.ConnectedPickable=true + +# Whether this map validator check is is enabled. +Validator.Connection=true + +# Whether this map validator check is is enabled. +Validator.DoubleLayer=true + +# Whether this map validator check is is enabled. +Validator.EmptySpawnPoint=true + +# Whether this map validator check is is enabled. +Validator.Exit=true + +Validator.MapCheckerScript=false + +# Whether this map validator check is is enabled. +Validator.MapDifficulty=true + +# Whether this map validator check is is enabled. +Validator.MobOutsideSpawnPoint=true + +# Whether this map validator check is is enabled. +Validator.TilePaths=true + +# Whether this map validator check is is enabled. +Validator.UndefinedArchetype=true + +# Whether this map validator check is is enabled. +Validator.UndefinedFace=true + +# Whether this map validator check is is enabled. +Validator.UnsetSlaying=true + +# Main windows''s state (maximized, iconized, etc.) +WindowState=0 + +# Archetype directory. +archDirectory=test-mapvalidator/atrinik/arch + +# Whether the map validator is run automatically after each change. +autoValidate=true + +configSource=ARCH_DIRECTORY + +# Last displayed version of the help documentation. +docuVersion=1 + +filterRealMaps=true + +# Language for the user interface. +language=en + +# Maps directory. +mapDirectory=test-mapvalidator/atrinik/maps + +# The settings for alpha faces. +mapViewSettings.alphaType=0 + +# Whether autojoining is enabled. +mapViewSettings.autojoin=false + +# Whether double faces are shown. +mapViewSettings.doubleFaces=false + +# Whether the map grid is visible. +mapViewSettings.gridVisible=false + +# Whether smoothing is active. +mapViewSettings.smoothing=false + +mediaDirectory=test-mapvalidator/atrinik/client/media + +# The image set to use. +useImageSet= Property changes on: trunk/test-mapvalidator/atrinik/regtest.conf ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-03-19 16:22:28
|
Revision: 8874 http://gridarta.svn.sourceforge.net/gridarta/?rev=8874&view=rev Author: akirschbaum Date: 2011-03-19 16:22:21 +0000 (Sat, 19 Mar 2011) Log Message: ----------- Fix display errors in tooltips for map validation errors. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/map/renderer/ToolTipAppender.java Modified: trunk/src/app/net/sf/gridarta/gui/map/renderer/ToolTipAppender.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/renderer/ToolTipAppender.java 2011-03-19 13:13:25 UTC (rev 8873) +++ trunk/src/app/net/sf/gridarta/gui/map/renderer/ToolTipAppender.java 2011-03-19 16:22:21 UTC (rev 8874) @@ -102,7 +102,7 @@ } else { sb.append("\n<hr>"); } - sb.append(encode(error.getMessage().trim())); + sb.append(error.getMessage().trim()); } @Nullable This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-03-19 13:13:32
|
Revision: 8873 http://gridarta.svn.sourceforge.net/gridarta/?rev=8873&view=rev Author: akirschbaum Date: 2011-03-19 13:13:25 +0000 (Sat, 19 Mar 2011) Log Message: ----------- Increase maximum execution time for map-checker.py map validator to 30 seconds. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/model/src/app/net/sf/gridarta/model/validation/checks/MapCheckerScriptChecker.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2011-03-18 19:46:39 UTC (rev 8872) +++ trunk/atrinik/ChangeLog 2011-03-19 13:13:25 UTC (rev 8873) @@ -1,3 +1,8 @@ +2011-03-19 Andreas Kirschbaum + + * Increase maximum execution time for map-checker.py map validator + to 30 seconds. + 2011-03-18 Andreas Kirschbaum * Correctly display special characters (<, >, and &) in map tooltips. 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-03-18 19:46:39 UTC (rev 8872) +++ trunk/model/src/app/net/sf/gridarta/model/validation/checks/MapCheckerScriptChecker.java 2011-03-19 13:13:25 UTC (rev 8873) @@ -58,7 +58,7 @@ * The maximum execution time of the checker script in milliseconds. If the * script runs longer, it will be terminated. */ - private static final int MAX_EXEC_TIME = 1000; + private static final int MAX_EXEC_TIME = 30000; /** * The placeholder in the command's arguments for the map to check. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-03-18 19:46:45
|
Revision: 8872 http://gridarta.svn.sourceforge.net/gridarta/?rev=8872&view=rev Author: akirschbaum Date: 2011-03-18 19:46:39 +0000 (Fri, 18 Mar 2011) Log Message: ----------- Correctly display special characters (<, >, and &) in map tooltips. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/crossfire/ChangeLog trunk/daimonin/ChangeLog trunk/src/app/net/sf/gridarta/gui/map/renderer/ToolTipAppender.java Added Paths: ----------- trunk/src/test/net/sf/gridarta/gui/map/renderer/ToolTipAppenderTest.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2011-03-17 22:36:13 UTC (rev 8871) +++ trunk/atrinik/ChangeLog 2011-03-18 19:46:39 UTC (rev 8872) @@ -1,3 +1,7 @@ +2011-03-18 Andreas Kirschbaum + + * Correctly display special characters (<, >, and &) in map tooltips. + 2011-03-17 Andreas Kirschbaum * Center map view around destination of "Enter Exit". Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2011-03-17 22:36:13 UTC (rev 8871) +++ trunk/crossfire/ChangeLog 2011-03-18 19:46:39 UTC (rev 8872) @@ -1,3 +1,7 @@ +2011-03-18 Andreas Kirschbaum + + * Correctly display special characters (<, >, and &) in map tooltips. + 2011-03-17 Andreas Kirschbaum * Center map view around destination of "Enter Exit". Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2011-03-17 22:36:13 UTC (rev 8871) +++ trunk/daimonin/ChangeLog 2011-03-18 19:46:39 UTC (rev 8872) @@ -1,3 +1,7 @@ +2011-03-18 Andreas Kirschbaum + + * Correctly display special characters (<, >, and &) in map tooltips. + 2011-03-17 Andreas Kirschbaum * Center map view around destination of "Enter Exit". Modified: trunk/src/app/net/sf/gridarta/gui/map/renderer/ToolTipAppender.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/renderer/ToolTipAppender.java 2011-03-17 22:36:13 UTC (rev 8871) +++ trunk/src/app/net/sf/gridarta/gui/map/renderer/ToolTipAppender.java 2011-03-18 19:46:39 UTC (rev 8872) @@ -67,7 +67,7 @@ sb.append("<br><hr>"); } sb.append(prefix); - sb.append(("<b>" + gameObject.getBestName() + "</b>\n" + text).trim().replaceAll("\n", "<br>" + prefix)); + sb.append(("<b>" + encode(gameObject.getBestName()) + "</b>\n" + encode(text)).trim().replaceAll("\n", "<br>" + prefix)); for (final G invGameObject : gameObject.reverse()) { appendGameObject(invGameObject, true, prefix + " "); } @@ -83,11 +83,11 @@ sb.append("<br><hr>"); } sb.append(prefix); - sb.append("<b>").append(gameObject.getBestName()).append("</b>"); + sb.append("<b>").append(encode(gameObject.getBestName())).append("</b>"); for (final Map.Entry<String, String> field : fields.entrySet()) { sb.append("<br>"); sb.append(prefix); - sb.append((field.getKey() + field.getValue()).trim().replaceAll("\n", "<br>" + prefix)); + sb.append((encode(field.getKey()) + encode(field.getValue())).trim().replaceAll("\n", "<br>" + prefix)); } for (final G invGameObject : gameObject.reverse()) { appendGameObject(invGameObject, true, prefix + " "); @@ -102,7 +102,7 @@ } else { sb.append("\n<hr>"); } - sb.append(error.getMessage().trim()); + sb.append(encode(error.getMessage().trim())); } @Nullable @@ -110,4 +110,34 @@ return empty ? null : sb.toString().replaceAll("\n", "<br>"); } + /** + * Encodes a string so that the result can be embedded into HTML. + * @param str the string to encode + * @return the encoded string + */ + @NotNull + private static String encode(@NotNull final String str) { + final StringBuilder sb = new StringBuilder(str.length()); + for (final char ch : str.toCharArray()) { + switch (ch) { + case '<': + sb.append("<"); + break; + + case '>': + sb.append(">"); + break; + + case '&': + sb.append("&"); + break; + + default: + sb.append(ch); + break; + } + } + return sb.toString(); + } + } Added: trunk/src/test/net/sf/gridarta/gui/map/renderer/ToolTipAppenderTest.java =================================================================== --- trunk/src/test/net/sf/gridarta/gui/map/renderer/ToolTipAppenderTest.java (rev 0) +++ trunk/src/test/net/sf/gridarta/gui/map/renderer/ToolTipAppenderTest.java 2011-03-18 19:46:39 UTC (rev 8872) @@ -0,0 +1,54 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.gui.map.renderer; + +import net.sf.gridarta.model.archetype.TestArchetype; +import net.sf.gridarta.model.gameobject.GameObjectFactory; +import net.sf.gridarta.model.gameobject.TestGameObject; +import net.sf.gridarta.model.io.GameObjectParser; +import net.sf.gridarta.model.maparchobject.TestMapArchObject; +import net.sf.gridarta.model.mapmodel.TestMapModelCreator; +import org.junit.Assert; +import org.junit.Test; + +/** + * Regression tests for {@link ToolTipAppender}. + * @author Andreas Kirschbaum + */ +public class ToolTipAppenderTest { + + /** + * Checks that HTML tags are correctly encoded in tooltip. + */ + @Test + public void testEmbeddedHtml1() { + final TestMapModelCreator mapModelCreator = new TestMapModelCreator(false); + final GameObjectParser<TestGameObject, TestMapArchObject, TestArchetype> gameObjectParser = mapModelCreator.newGameObjectParser(); + final ToolTipAppender<TestGameObject, TestMapArchObject, TestArchetype> toolTipAppender = new ToolTipAppender<TestGameObject, TestMapArchObject, TestArchetype>(gameObjectParser); + final GameObjectFactory<TestGameObject, TestMapArchObject, TestArchetype> gameObjectFactory = mapModelCreator.getGameObjectFactory(); + final TestArchetype archetype = gameObjectFactory.newArchetype("arch"); + final TestGameObject gameObject = gameObjectFactory.createGameObject(archetype); + gameObject.setAttributeString("<key>", "<value>&<value>"); + toolTipAppender.appendGameObject(gameObject, false, ""); + final String tooltip = toolTipAppender.finish(); + Assert.assertEquals("<html><b>arch</b><br><key> <value>&<value>", tooltip); + } + +} // class ToolTipAppenderTest Property changes on: trunk/src/test/net/sf/gridarta/gui/map/renderer/ToolTipAppenderTest.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-03-17 22:36:20
|
Revision: 8871 http://gridarta.svn.sourceforge.net/gridarta/?rev=8871&view=rev Author: akirschbaum Date: 2011-03-17 22:36:13 +0000 (Thu, 17 Mar 2011) Log Message: ----------- Center map view around destination of "Enter Exit". Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/crossfire/ChangeLog trunk/daimonin/ChangeLog trunk/src/app/net/sf/gridarta/gui/gomapdialog/GoMapDialog.java trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapActions.java trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViews.java trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewsManager.java trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractMapRenderer.java trunk/src/app/net/sf/gridarta/gui/map/renderer/MapRenderer.java trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFile.java trunk/src/app/net/sf/gridarta/gui/mapmenu/MapMenuAction.java trunk/src/app/net/sf/gridarta/gui/misc/DefaultFileControl.java trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2011-03-17 21:19:15 UTC (rev 8870) +++ trunk/atrinik/ChangeLog 2011-03-17 22:36:13 UTC (rev 8871) @@ -1,5 +1,7 @@ 2011-03-17 Andreas Kirschbaum + * Center map view around destination of "Enter Exit". + * Implement Edit|Invert Selection which inverts the currently selected map squares. Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2011-03-17 21:19:15 UTC (rev 8870) +++ trunk/crossfire/ChangeLog 2011-03-17 22:36:13 UTC (rev 8871) @@ -1,5 +1,7 @@ 2011-03-17 Andreas Kirschbaum + * Center map view around destination of "Enter Exit". + * Implement Edit|Invert Selection which inverts the currently selected map squares. Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2011-03-17 21:19:15 UTC (rev 8870) +++ trunk/daimonin/ChangeLog 2011-03-17 22:36:13 UTC (rev 8871) @@ -1,5 +1,7 @@ 2011-03-17 Andreas Kirschbaum + * Center map view around destination of "Enter Exit". + * Implement Edit|Invert Selection which inverts the currently selected map squares. Modified: trunk/src/app/net/sf/gridarta/gui/gomapdialog/GoMapDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gomapdialog/GoMapDialog.java 2011-03-17 21:19:15 UTC (rev 8870) +++ trunk/src/app/net/sf/gridarta/gui/gomapdialog/GoMapDialog.java 2011-03-17 22:36:13 UTC (rev 8871) @@ -542,7 +542,7 @@ boolean result = false; for (final Object selectedValue : selectedValues) { try { - mapViewsManager.openMapFileWithView((File) selectedValue, null); + mapViewsManager.openMapFileWithView((File) selectedValue, null, null); result = true; } catch (final IOException ex) { ACTION_BUILDER.showMessageDialog(dialog, "goMapIOException", selectedValue, ex.getMessage()); Modified: trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapActions.java 2011-03-17 21:19:15 UTC (rev 8870) +++ trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapActions.java 2011-03-17 22:36:13 UTC (rev 8871) @@ -755,7 +755,7 @@ final MapView<G, A, R> newMapView; try { - newMapView = mapViewsManager.openMapFileWithView(canonicalNewFile, null); + newMapView = mapViewsManager.openMapFileWithView(canonicalNewFile, null, destinationPoint); } catch (final IOException ex) { fileControl.reportLoadError(canonicalNewFile, ex.getMessage()); return false; @@ -953,7 +953,7 @@ } if (performAction) { - mapViewsManager.newMapView(mapView.getMapControl(), mapView.getMapViewBasic().getScrollPane().getViewport().getViewPosition()); + mapViewsManager.newMapView(mapView.getMapControl(), mapView.getMapViewBasic().getScrollPane().getViewport().getViewPosition(), null); } return true; Modified: trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViews.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViews.java 2011-03-17 21:19:15 UTC (rev 8870) +++ trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViews.java 2011-03-17 22:36:13 UTC (rev 8871) @@ -19,11 +19,14 @@ package net.sf.gridarta.gui.map.mapview; +import java.awt.Dimension; import java.awt.Point; +import java.awt.Rectangle; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; +import javax.swing.JScrollPane; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; @@ -96,11 +99,13 @@ * @param mapControl the map control new map view is part of * @param viewPosition the view position to show initially; may be * <code>null</code> to show the top left corner + * @param centerSquare the map square that should be in the center of the + * view; ignored if <code>viewPosition</code> is set * @param mapViewFactory the map view factory to use * @return the map view */ @NotNull - public MapView<G, A, R> newMapView(@NotNull final MapControl<G, A, R> mapControl, @Nullable final Point viewPosition, @NotNull final MapViewFactory<G, A, R> mapViewFactory) { + public MapView<G, A, R> newMapView(@NotNull final MapControl<G, A, R> mapControl, @Nullable final Point viewPosition, @Nullable final Point centerSquare, @NotNull final MapViewFactory<G, A, R> mapViewFactory) { mapControl.acquire(); try { final MapView<G, A, R> mapView = mapViewFactory.newMapView(mapControl, viewPosition, ++nextMapViewCounter); @@ -109,6 +114,13 @@ for (final MapViewsListener<G, A, R> listener : listeners.getListeners()) { listener.mapViewCreated(mapView); } + if (viewPosition == null && centerSquare != null) { + final Rectangle squareBounds = mapView.getMapViewBasic().getRenderer().getSquareBounds(centerSquare); + final JScrollPane scrollPane = mapView.getMapViewBasic().getScrollPane(); + final Dimension extentSize = scrollPane.getViewport().getExtentSize(); + final Point centerPoint = new Point(Math.max(0, squareBounds.x + squareBounds.width / 2 - extentSize.width / 2), Math.max(0, squareBounds.y + squareBounds.height / 2 - extentSize.height / 2)); + scrollPane.getViewport().setViewPosition(centerPoint); + } return mapView; } finally { mapControl.release(); Modified: trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewsManager.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewsManager.java 2011-03-17 21:19:15 UTC (rev 8870) +++ trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewsManager.java 2011-03-17 22:36:13 UTC (rev 8871) @@ -213,11 +213,13 @@ * @param mapControl the map control * @param viewPosition the view position to show initially; may be * <code>null</code> to show the top left corner + * @param centerSquare the map square that should be in the center of the + * view; ignored if <code>viewPosition</code> is set * @return the map view */ @NotNull - public MapView<G, A, R> newMapView(@NotNull final MapControl<G, A, R> mapControl, @Nullable final Point viewPosition) { - return getMapViewsInt(mapControl).newMapView(mapControl, viewPosition, mapViewFactory); + public MapView<G, A, R> newMapView(@NotNull final MapControl<G, A, R> mapControl, @Nullable final Point viewPosition, @Nullable final Point centerSquare) { + return getMapViewsInt(mapControl).newMapView(mapControl, viewPosition, centerSquare, mapViewFactory); } /** @@ -285,7 +287,7 @@ public MapView<G, A, R> newMapWithView(@Nullable final List<G> objects, @NotNull final A mapArchObject, @Nullable final Point viewPosition, @Nullable final File file) { final MapControl<G, A, R> mapControl = mapManager.newMap(objects, mapArchObject, file, true); try { - return newMapView(mapControl, viewPosition); + return newMapView(mapControl, viewPosition, null); } finally { mapManager.release(mapControl); } @@ -316,14 +318,16 @@ * @param file the map file to load * @param viewPosition the view position to show initially; may be * <code>null</code> to show the top left corner + * @param centerSquare the map square that should be in the center of the + * view; ignored if <code>viewPosition</code> is set * @return the map view * @throws IOException if an I/O error occurs */ @NotNull - public MapView<G, A, R> openMapFileWithView(@NotNull final File file, @Nullable final Point viewPosition) throws IOException { + public MapView<G, A, R> openMapFileWithView(@NotNull final File file, @Nullable final Point viewPosition, @Nullable final Point centerSquare) throws IOException { final MapControl<G, A, R> mapControl = mapManager.openMapFile(file, true); try { - return newMapView(mapControl, viewPosition); + return newMapView(mapControl, viewPosition, centerSquare); } finally { mapManager.release(mapControl); } Modified: trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractMapRenderer.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractMapRenderer.java 2011-03-17 21:19:15 UTC (rev 8870) +++ trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractMapRenderer.java 2011-03-17 22:36:13 UTC (rev 8871) @@ -20,7 +20,6 @@ package net.sf.gridarta.gui.map.renderer; import java.awt.Point; -import java.awt.Rectangle; import java.awt.event.MouseEvent; import java.io.File; import java.io.IOException; @@ -108,14 +107,6 @@ public abstract void closeNotify(); /** - * Returns coordinates, length and width of map square. - * @param p the map coordinates - * @return the boundary rectangle of square - */ - @NotNull - public abstract Rectangle getSquareBounds(@NotNull final Point p); - - /** * {@inheritDoc} * @noinspection RefusedBequest */ Modified: trunk/src/app/net/sf/gridarta/gui/map/renderer/MapRenderer.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/renderer/MapRenderer.java 2011-03-17 21:19:15 UTC (rev 8870) +++ trunk/src/app/net/sf/gridarta/gui/map/renderer/MapRenderer.java 2011-03-17 22:36:13 UTC (rev 8871) @@ -20,6 +20,7 @@ package net.sf.gridarta.gui.map.renderer; import java.awt.Point; +import java.awt.Rectangle; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.awt.image.BufferedImage; @@ -80,4 +81,12 @@ void removeMouseListener(@NotNull MouseListener l); + /** + * Returns coordinates, length and width of map square. + * @param p the map coordinates + * @return the boundary rectangle of square + */ + @NotNull + Rectangle getSquareBounds(@NotNull Point p); + } // interface MapRenderer Modified: trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFile.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFile.java 2011-03-17 21:19:15 UTC (rev 8870) +++ trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFile.java 2011-03-17 22:36:13 UTC (rev 8871) @@ -172,7 +172,7 @@ final File file = getFile(); final MapReader<G, A> decoder = mapReaderFactory.newMapReader(file); pickmap = pickmapManager.newMap(decoder.getGameObjects(), decoder.getMapArchObject(), file, true); - pickmapView = mapViewsManager.newMapView(pickmap, null); + pickmapView = mapViewsManager.newMapView(pickmap, null, null); } } Modified: trunk/src/app/net/sf/gridarta/gui/mapmenu/MapMenuAction.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapmenu/MapMenuAction.java 2011-03-17 21:19:15 UTC (rev 8870) +++ trunk/src/app/net/sf/gridarta/gui/mapmenu/MapMenuAction.java 2011-03-17 22:36:13 UTC (rev 8871) @@ -86,7 +86,7 @@ public void actionPerformed(final ActionEvent e) { final File mapFile = mapMenuEntryMap.getMapFile(); try { - mapViewsManager.openMapFileWithView(mapFile, null); + mapViewsManager.openMapFileWithView(mapFile, null, null); } catch (final IOException ex) { fileControl.reportLoadError(mapFile, ex.getMessage()); } Modified: trunk/src/app/net/sf/gridarta/gui/misc/DefaultFileControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/misc/DefaultFileControl.java 2011-03-17 21:19:15 UTC (rev 8870) +++ trunk/src/app/net/sf/gridarta/gui/misc/DefaultFileControl.java 2011-03-17 22:36:13 UTC (rev 8871) @@ -220,7 +220,7 @@ } else { globalSettings.setCurrentDirectory(dir); try { - mapViewsManager.openMapFileWithView(file, null); + mapViewsManager.openMapFileWithView(file, null, null); } catch (final IOException ex) { reportLoadError(file, ex.getMessage()); } Modified: trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java 2011-03-17 21:19:15 UTC (rev 8870) +++ trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java 2011-03-17 22:36:13 UTC (rev 8871) @@ -723,7 +723,7 @@ if (performAction) { final File file = mapFile.getFile(); try { - mapViewsManager.openMapFileWithView(file, null); + mapViewsManager.openMapFileWithView(file, null, null); } catch (final IOException ex) { fileControl.reportLoadError(file, ex.getMessage()); return false; Modified: trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2011-03-17 21:19:15 UTC (rev 8870) +++ trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2011-03-17 22:36:13 UTC (rev 8871) @@ -737,7 +737,7 @@ if (isScriptFile) { scriptEditControl.openScriptFile(file.getAbsolutePath()); } else { - return mapViewsManager.openMapFileWithView(file, null); + return mapViewsManager.openMapFileWithView(file, null, null); } } else if (!file.exists()) { if (isScriptFile) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-03-17 21:19:22
|
Revision: 8870 http://gridarta.svn.sourceforge.net/gridarta/?rev=8870&view=rev Author: akirschbaum Date: 2011-03-17 21:19:15 +0000 (Thu, 17 Mar 2011) Log Message: ----------- Implement Edit|Invert Selection which inverts the currently selected map squares. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/action.properties trunk/crossfire/ChangeLog trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/action.properties trunk/daimonin/ChangeLog trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/action.properties trunk/model/src/app/net/sf/gridarta/model/mapgrid/MapGrid.java trunk/src/app/net/sf/gridarta/action.properties trunk/src/app/net/sf/gridarta/mainactions/MainActions.java trunk/src/app/net/sf/gridarta/messages.properties trunk/src/app/net/sf/gridarta/messages_de.properties trunk/src/app/net/sf/gridarta/messages_fr.properties trunk/src/app/net/sf/gridarta/messages_sv.properties Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2011-03-17 20:59:35 UTC (rev 8869) +++ trunk/atrinik/ChangeLog 2011-03-17 21:19:15 UTC (rev 8870) @@ -1,3 +1,8 @@ +2011-03-17 Andreas Kirschbaum + + * Implement Edit|Invert Selection which inverts the currently + selected map squares. + 2011-03-17 Alex Tokar * Remove support for 'plugins' map attribute; add support for Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/action.properties =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/action.properties 2011-03-17 20:59:35 UTC (rev 8869) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/action.properties 2011-03-17 21:19:15 UTC (rev 8870) @@ -26,7 +26,7 @@ # Menus main.menubar=file edit map archetypes pickmaps resources tools analyze view bookmarks plugins window help file.menu=newMap openFile goMap recent closeMap - saveMap saveMapAs saveAllMaps - closeAllMaps revertMap createImage - options shortcuts - exit -edit.menu=undo redo - clear cut copy paste pasteTiled - shift - replace fillAuto fillAbove fillBelow randFillAuto randFillAbove randFillBelow floodFill - selectAll expandEmptySelection growSelection shrinkSelection +edit.menu=undo redo - clear cut copy paste pasteTiled - shift - replace fillAuto fillAbove fillBelow randFillAuto randFillAbove randFillBelow floodFill - selectAll invertSelection expandEmptySelection growSelection shrinkSelection map.menu=autoJoin - enterExit nextExit prevExit enterNorthMap enterEastMap enterSouthMap enterWestMap enterNorthEastMap enterSouthEastMap enterSouthWestMap enterNorthWestMap - mapCreateView mapProperties shrinkMapSize deleteUnknownObjects - gameObjectTextEditor archetypes.menu=displayGameObjectNames displayArchetypeNames displayIconsOnly - findArchetypes #pickmaps.menu: See gridarta @@ -41,7 +41,7 @@ mapwindow.menubar=mapwindowFile mapwindowEdit mapwindowMap mapwindowCursor mapwindowFile.menu=saveMap saveMapAs createImage - revertMap - closeMap -mapwindowEdit.menu=undo redo - clear cut copy paste pasteTiled - shift - replace fillAuto fillAbove fillBelow randFillAuto randFillAbove randFillBelow floodFill - selectAll expandEmptySelection growSelection shrinkSelection +mapwindowEdit.menu=undo redo - clear cut copy paste pasteTiled - shift - replace fillAuto fillAbove fillBelow randFillAuto randFillAbove randFillBelow floodFill - selectAll invertSelection expandEmptySelection growSelection shrinkSelection mapwindowMap.menu=gridVisible enterExit nextExit prevExit enterNorthMap enterEastMap enterSouthMap enterWestMap enterNorthEastMap enterSouthEastMap enterSouthWestMap enterNorthWestMap - mapCreateView mapProperties shrinkMapSize deleteUnknownObjects mapwindowCursor.menu=moveCursor - exitConnector - selectSquare startStopDrag addToSelection subFromSelection releaseDrag - insertArch deleteArch - selectArchAbove selectArchBelow - archAttributes Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2011-03-17 20:59:35 UTC (rev 8869) +++ trunk/crossfire/ChangeLog 2011-03-17 21:19:15 UTC (rev 8870) @@ -1,3 +1,8 @@ +2011-03-17 Andreas Kirschbaum + + * Implement Edit|Invert Selection which inverts the currently + selected map squares. + 2011-03-01 Andreas Kirschbaum * Manage bookmarks dialog: Add "undo remove" button for restoring Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/action.properties =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/action.properties 2011-03-17 20:59:35 UTC (rev 8869) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/action.properties 2011-03-17 21:19:15 UTC (rev 8870) @@ -26,7 +26,7 @@ # Menus main.menubar=file edit map archetypes pickmaps resources tools analyze view bookmarks plugins window help file.menu=newMap openFile goMap recent closeMap - saveMap saveMapAs saveAllMaps - closeAllMaps revertMap createImage - options shortcuts - exit -edit.menu=undo redo - clear cut copy paste pasteTiled - shift - replace fillAuto fillAbove fillBelow randFillAuto randFillAbove randFillBelow floodFill - selectAll expandEmptySelection growSelection shrinkSelection +edit.menu=undo redo - clear cut copy paste pasteTiled - shift - replace fillAuto fillAbove fillBelow randFillAuto randFillAbove randFillBelow floodFill - selectAll invertSelection expandEmptySelection growSelection shrinkSelection map.menu=autoJoin - enterExit nextExit prevExit enterNorthMap enterEastMap enterSouthMap enterWestMap tileShow - mapCreateView mapProperties shrinkMapSize deleteUnknownObjects - gameObjectTextEditor archetypes.menu=displayGameObjectNames displayArchetypeNames displayIconsOnly - findArchetypes #pickmaps.menu: See gridarta @@ -41,7 +41,7 @@ mapwindow.menubar=mapwindowFile mapwindowEdit mapwindowMap mapwindowCursor mapwindowFile.menu=saveMap saveMapAs createImage - revertMap - closeMap -mapwindowEdit.menu=undo redo - clear cut copy paste pasteTiled - shift - replace fillAuto fillAbove fillBelow randFillAuto randFillAbove randFillBelow floodFill - selectAll expandEmptySelection growSelection shrinkSelection +mapwindowEdit.menu=undo redo - clear cut copy paste pasteTiled - shift - replace fillAuto fillAbove fillBelow randFillAuto randFillAbove randFillBelow floodFill - selectAll invertSelection expandEmptySelection growSelection shrinkSelection mapwindowMap.menu=gridVisible smoothing enterExit nextExit prevExit enterNorthMap enterEastMap enterSouthMap enterWestMap tileShow - mapCreateView mapProperties shrinkMapSize deleteUnknownObjects mapwindowCursor.menu=moveCursor - exitConnector - selectSquare startStopDrag addToSelection subFromSelection releaseDrag - insertArch deleteArch - selectArchAbove selectArchBelow - archAttributes Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2011-03-17 20:59:35 UTC (rev 8869) +++ trunk/daimonin/ChangeLog 2011-03-17 21:19:15 UTC (rev 8870) @@ -1,3 +1,8 @@ +2011-03-17 Andreas Kirschbaum + + * Implement Edit|Invert Selection which inverts the currently + selected map squares. + 2011-03-01 Andreas Kirschbaum * Manage bookmarks dialog: Add "undo remove" button for restoring Modified: trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/action.properties =================================================================== --- trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/action.properties 2011-03-17 20:59:35 UTC (rev 8869) +++ trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/action.properties 2011-03-17 21:19:15 UTC (rev 8870) @@ -26,7 +26,7 @@ # Menus main.menubar=file edit map archetypes pickmaps resources tools analyze view bookmarks plugins window help file.menu=newMap openFile goMap recent closeMap - saveMap saveMapAs saveAllMaps - closeAllMaps revertMap createImage - options shortcuts - exit -edit.menu=undo redo - clear cut copy paste pasteTiled - shift - replace fillAuto fillAbove fillBelow randFillAuto randFillAbove randFillBelow floodFill - selectAll expandEmptySelection growSelection shrinkSelection +edit.menu=undo redo - clear cut copy paste pasteTiled - shift - replace fillAuto fillAbove fillBelow randFillAuto randFillAbove randFillBelow floodFill - selectAll invertSelection expandEmptySelection growSelection shrinkSelection map.menu=autoJoin - enterExit nextExit prevExit enterNorthMap enterEastMap enterSouthMap enterWestMap enterNorthEastMap enterSouthEastMap enterSouthWestMap enterNorthWestMap - mapCreateView mapProperties shrinkMapSize deleteUnknownObjects - gameObjectTextEditor archetypes.menu=displayGameObjectNames displayArchetypeNames displayIconsOnly - findArchetypes #pickmaps.menu: See gridarta @@ -41,7 +41,7 @@ mapwindow.menubar=mapwindowFile mapwindowEdit mapwindowMap mapwindowCursor mapwindowFile.menu=saveMap saveMapAs createImage - revertMap - closeMap -mapwindowEdit.menu=undo redo - clear cut copy paste pasteTiled - shift - replace fillAuto fillAbove fillBelow randFillAuto randFillAbove randFillBelow floodFill - selectAll expandEmptySelection growSelection shrinkSelection +mapwindowEdit.menu=undo redo - clear cut copy paste pasteTiled - shift - replace fillAuto fillAbove fillBelow randFillAuto randFillAbove randFillBelow floodFill - selectAll invertSelection expandEmptySelection growSelection shrinkSelection mapwindowMap.menu=gridVisible enterExit nextExit prevExit enterNorthMap enterEastMap enterSouthMap enterWestMap enterNorthEastMap enterSouthEastMap enterSouthWestMap enterNorthWestMap - mapCreateView mapProperties shrinkMapSize deleteUnknownObjects mapwindowCursor.menu=moveCursor - exitConnector - selectSquare startStopDrag addToSelection subFromSelection releaseDrag - insertArch deleteArch - selectArchAbove selectArchBelow - archAttributes Modified: trunk/model/src/app/net/sf/gridarta/model/mapgrid/MapGrid.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/mapgrid/MapGrid.java 2011-03-17 20:59:35 UTC (rev 8869) +++ trunk/model/src/app/net/sf/gridarta/model/mapgrid/MapGrid.java 2011-03-17 21:19:15 UTC (rev 8870) @@ -410,15 +410,7 @@ unsetFlags(cornerMin.x, cornerMin.y, cornerMax.x, cornerMax.y, GRID_FLAG_SELECTION); break; case FLIP: - for (int x = cornerMin.x; x <= cornerMax.x; x++) { - for (int y = cornerMin.y; y <= cornerMax.y; y++) { - updateSelectionFlag(x, y, (gridFlags[x][y] & GRID_FLAG_SELECTION) == 0); - gridFlags[x][y] ^= GRID_FLAG_SELECTION; - } - } - cachedSelectedRecValid = false; - updateRecChange(cornerMin.x, cornerMin.y); - updateRecChange(cornerMax.x, cornerMax.y); + toggleFlags(cornerMin.x, cornerMin.y, cornerMax.x, cornerMax.y, GRID_FLAG_SELECTION); break; } } finally { @@ -585,6 +577,18 @@ } /** + * Inverts all selected squares. + */ + public void invertSelection() { + beginTransaction(); + try { + toggleFlags(0, 0, gridSize.getWidth() - 1, gridSize.getHeight() - 1, GRID_FLAG_SELECTION); + } finally { + endTransaction(); + } + } + + /** * Sets the error flag at given coordinates. * @param x the x coordinate * @param y the y coordinate @@ -701,6 +705,26 @@ } /** + * Flips flags in a rectangle and generate a grid change event. + * @param minX the left x-coordinate + * @param minY the left y-coordinate + * @param maxX the right x-coordinate + * @param maxY the right y-coordinate + * @param flags the flags to reset + */ + private void toggleFlags(final int minX, final int minY, final int maxX, final int maxY, final int flags) { + for (int x = minX; x <= maxX; x++) { + for (int y = minY; y <= maxY; y++) { + updateSelectionFlag(x, y, (gridFlags[x][y] & flags) == 0); + gridFlags[x][y] ^= flags; + } + } + cachedSelectedRecValid = false; + updateRecChange(minX, minY); + updateRecChange(maxX, maxY); + } + + /** * Starts a new transaction. Transactions may be nested. Transactions serve * the purpose of firing events to the views when more changes are known to * come before the view is really required to update. Each invocation of Modified: trunk/src/app/net/sf/gridarta/action.properties =================================================================== --- trunk/src/app/net/sf/gridarta/action.properties 2011-03-17 20:59:35 UTC (rev 8869) +++ trunk/src/app/net/sf/gridarta/action.properties 2011-03-17 21:19:15 UTC (rev 8870) @@ -79,6 +79,8 @@ selectAll.icon=EmptySmallIcon +invertSelection=EmptySmallIcon + mapProperties.icon=general/Properties16 pickmaps.menu=lockAllPickmaps - addNewPickmap deletePickmap - openPickmapMap - savePickmap revertPickmap - createPickmapFolder deletePickmapFolder - pickmapFolders Modified: trunk/src/app/net/sf/gridarta/mainactions/MainActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/mainactions/MainActions.java 2011-03-17 20:59:35 UTC (rev 8869) +++ trunk/src/app/net/sf/gridarta/mainactions/MainActions.java 2011-03-17 21:19:15 UTC (rev 8870) @@ -299,6 +299,12 @@ private final Action aSelectAll; /** + * Action called for "invert selection". + */ + @NotNull + private final Action aInvertSelection; + + /** * Action called for "grow empty selection". */ @NotNull @@ -451,6 +457,7 @@ aRandFillBelow = ActionUtils.newAction(ACTION_BUILDER, "Map/Fill", this, "randFillBelow"); aFloodFill = ActionUtils.newAction(ACTION_BUILDER, "Map/Fill", this, "floodFill"); aSelectAll = ActionUtils.newAction(ACTION_BUILDER, "Map/Selection", this, "selectAll"); + aInvertSelection = ActionUtils.newAction(ACTION_BUILDER, "Map/Selection", this, "invertSelection"); aExpandEmptySelection = ActionUtils.newAction(ACTION_BUILDER, "Map/Selection", this, "expandEmptySelection"); aGrowSelection = ActionUtils.newAction(ACTION_BUILDER, "Map/Selection", this, "growSelection"); aShrinkSelection = ActionUtils.newAction(ACTION_BUILDER, "Map/Selection", this, "shrinkSelection"); @@ -681,6 +688,7 @@ aRandFillBelow.setEnabled(doRandFillBelow(false)); aFloodFill.setEnabled(doFloodFill(false)); aSelectAll.setEnabled(doSelectAll(false)); + aInvertSelection.setEnabled(doInvertSelection(false)); aExpandEmptySelection.setEnabled(doExpandEmptySelection(false)); aGrowSelection.setEnabled(doGrowSelection(false)); aShrinkSelection.setEnabled(doShrinkSelection(false)); @@ -866,6 +874,14 @@ } /** + * Invoked when the user wants to invert all selected squares from a map. + */ + @ActionMethod + public void invertSelection() { + doInvertSelection(true); + } + + /** * Invoked when the user wants to expand the selection of empty map squares * to surrounding empty map squares. */ @@ -1260,6 +1276,23 @@ } /** + * Executes the "invert selection" action. + * @param performAction whether the action should be performed + * @return whether the action was or can be performed + */ + private boolean doInvertSelection(final boolean performAction) { + if (currentMapView == null) { + return false; + } + + if (performAction) { + currentMapView.getMapViewBasic().getMapGrid().invertSelection(); + } + + return true; + } + + /** * Executes the "expand empty selection" action. * @param performAction whether the action should be performed * @return whether the action was or can be performed Modified: trunk/src/app/net/sf/gridarta/messages.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages.properties 2011-03-17 20:59:35 UTC (rev 8869) +++ trunk/src/app/net/sf/gridarta/messages.properties 2011-03-17 21:19:15 UTC (rev 8870) @@ -823,6 +823,11 @@ selectAll.shortdescription=Selects all map squares of the current map. selectAll.accel=ctrl pressed A +invertSelection.text=Invert Selection +invertSelection.mnemonic=I +invertSelection.shortdescription=Inverts the selection. +invertSelection.accel=ctrl pressed I + expandEmptySelection.text=Expand Empty Selection expandEmptySelection.shortdescription=Includes empty map squares surrounding selected empty squares to the selection. Modified: trunk/src/app/net/sf/gridarta/messages_de.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages_de.properties 2011-03-17 20:59:35 UTC (rev 8869) +++ trunk/src/app/net/sf/gridarta/messages_de.properties 2011-03-17 21:19:15 UTC (rev 8870) @@ -767,6 +767,10 @@ selectAll.mnemonic=S selectAll.shortdescription=W\u00e4hlt alle Felder der aktiven Karte aus. +invertSelection.text=Auswahl invertieren +invertSelection.mnemonic=I +invertSelection.shortdescription=Vertauscht ausgew\u00e4lte und nicht ausgew\u00e4hlte Felder. + expandEmptySelection.text=Leere Auswahl erweitern expandEmptySelection.shortdescription=Erweitert die Auswahl um leere Felder, die an ausgew\u00e4hlte leere Felder angrenzen. Modified: trunk/src/app/net/sf/gridarta/messages_fr.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages_fr.properties 2011-03-17 20:59:35 UTC (rev 8869) +++ trunk/src/app/net/sf/gridarta/messages_fr.properties 2011-03-17 21:19:15 UTC (rev 8870) @@ -763,6 +763,10 @@ selectAll.mnemonic=T #selectAll.shortdescription= +#invertSelection.text= +#invertSelection.mnemonic= +#invertSelection.shortdescription= + expandEmptySelection.text=\u00c9tendre la s\u00e9lection aux carr\u00e9s vides expandEmptySelection.shortdescription=\u00c9tend la s\u00e9lection aux carr\u00e9s vides adjacents \u00e0 un carr\u00e9 vide d\u00e9j\u00e0 s\u00e9lectionn\u00e9. Modified: trunk/src/app/net/sf/gridarta/messages_sv.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages_sv.properties 2011-03-17 20:59:35 UTC (rev 8869) +++ trunk/src/app/net/sf/gridarta/messages_sv.properties 2011-03-17 21:19:15 UTC (rev 8870) @@ -765,6 +765,10 @@ selectAll.mnemonic=M #selectAll.shortdescription= +#invertSelection.text= +#invertSelection.mnemonic= +#invertSelection.shortdescription= + #expandEmptySelection.text= #expandEmptySelection.shortdescription= This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-03-17 20:59:42
|
Revision: 8869 http://gridarta.svn.sourceforge.net/gridarta/?rev=8869&view=rev Author: akirschbaum Date: 2011-03-17 20:59:35 +0000 (Thu, 17 Mar 2011) Log Message: ----------- Remove support for 'plugins' map attribute; add support for 'weather' map attribute. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/mappropertiesdialog/MapPropertiesDialog.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/messages.properties trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/messages_de.properties trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/messages_fr.properties trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/messages_sv.properties trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/io/MapArchObjectParser.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/maparchobject/MapArchObject.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2011-03-10 17:33:42 UTC (rev 8868) +++ trunk/atrinik/ChangeLog 2011-03-17 20:59:35 UTC (rev 8869) @@ -1,3 +1,8 @@ +2011-03-17 Alex Tokar + + * Remove support for 'plugins' map attribute; add support for + 'weather' map attribute. + 2011-03-01 Andreas Kirschbaum * Manage bookmarks dialog: Add "undo remove" button for restoring Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/mappropertiesdialog/MapPropertiesDialog.java =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/mappropertiesdialog/MapPropertiesDialog.java 2011-03-10 17:33:42 UTC (rev 8868) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/mappropertiesdialog/MapPropertiesDialog.java 2011-03-17 20:59:35 UTC (rev 8869) @@ -137,6 +137,13 @@ private final JTextField mapBackgroundMusic = new JTextField(); /** + * The map's weather. + * @serial + */ + @NotNull + private final JTextField mapWeather = new JTextField(); + + /** * The width in squares. * @serial */ @@ -277,13 +284,6 @@ private final AbstractButton checkboxPvp = new JCheckBox(); /** - * The checkbox for the plugins attribute. - * @serial - */ - @NotNull - private final AbstractButton checkboxPlugins = new JCheckBox(); - - /** * The button for ok. * @serial */ @@ -352,6 +352,7 @@ TextComponentUtils.setAutoSelectOnFocus(mapName); TextComponentUtils.setAutoSelectOnFocus(mapRegion); TextComponentUtils.setAutoSelectOnFocus(mapBackgroundMusic); + TextComponentUtils.setAutoSelectOnFocus(mapWeather); TextComponentUtils.setAutoSelectOnFocus(mapWidthField); TextComponentUtils.setAutoSelectOnFocus(mapHeightField); TextComponentUtils.setAutoSelectOnFocus(fieldEnterX); @@ -377,7 +378,7 @@ gbc.gridx = 1; gbc.gridy = 1; gbc.weightx = 1.0; - gbc.weighty = 1.0; + gbc.weighty = 1.3; mainPanel.add(createMapPanel(map), gbc); gbc.gridx = 1; @@ -439,7 +440,6 @@ optionPanel.add(createPanelCBox(checkboxFixedResetTime, map.isFixedResetTime(), "mapFixedResetTime")); optionPanel.add(createPanelCBox(checkboxPlayerNoSave, map.isPlayerNoSave(), "mapPlayerNoSave")); optionPanel.add(createPanelCBox(checkboxPvp, map.isPvp(), "mapPvP")); - optionPanel.add(createPanelCBox(checkboxPlugins, map.isPlugins(), "mapPlugins")); final JComponent scrollPane = new JScrollPane(optionPanel); scrollPane.setBorder(createTitledBorder("mapOptions")); @@ -478,6 +478,11 @@ mapRegion.setText(map.getRegion()); mapPanel.add(mapRegion, gbc); + mapPanel.add(ActionBuilderUtils.newLabel(ACTION_BUILDER, "mapWeather"), labelGbc); + mapWeather.setColumns(16); + mapWeather.setText(map.getWeather()); + mapPanel.add(mapWeather, gbc); + mapPanel.add(ActionBuilderUtils.newLabel(ACTION_BUILDER, "mapWidth"), labelGbc); mapWidthField.setColumns(5); mapWidthField.setText(Integer.toString(mapModel.getMapArchObject().getMapSize().getWidth())); @@ -673,6 +678,7 @@ mapArchObject.setText(mapDescription.getText()); mapArchObject.setMapName(mapName.getText()); mapArchObject.setRegion(mapRegion.getText()); + mapArchObject.setWeather(mapWeather.getText()); mapArchObject.setBackgroundMusic(mapBackgroundMusic.getText()); mapArchObject.setEnterX(enterX); @@ -694,7 +700,6 @@ mapArchObject.setFixedResetTime(checkboxFixedResetTime.isSelected()); mapArchObject.setPlayerNoSave(checkboxPlayerNoSave.isSelected()); mapArchObject.setPvp(checkboxPvp.isSelected()); - mapArchObject.setPlugins(checkboxPlugins.isSelected()); mapTilePane.modifyMapProperties(); } finally { @@ -737,6 +742,7 @@ mapDescription.setText(map.getText()); mapName.setText(map.getMapName()); mapRegion.setText(map.getRegion()); + mapWeather.setText(map.getWeather()); mapBackgroundMusic.setText(map.getBackgroundMusic()); mapWidthField.setText(Integer.toString(map.getMapSize().getWidth())); mapHeightField.setText(Integer.toString(map.getMapSize().getHeight())); @@ -760,7 +766,6 @@ checkboxFixedResetTime.setSelected(map.isFixedResetTime()); checkboxPlayerNoSave.setSelected(map.isPlayerNoSave()); checkboxPvp.setSelected(map.isPvp()); - checkboxPlugins.setSelected(map.isPlugins()); mapTilePane.restoreMapProperties(); } Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/messages.properties =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/messages.properties 2011-03-10 17:33:42 UTC (rev 8868) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/messages.properties 2011-03-17 20:59:35 UTC (rev 8869) @@ -85,6 +85,7 @@ # Map Properties mapMap=Map mapRegion=Region +mapWeather=Weather mapOutdoor=Outdoor mapOptions=Options mapNoSave=No Save @@ -97,7 +98,6 @@ mapFixedResetTime=Fixed Reset Time mapPlayerNoSave=Players Cannot Save mapPvP=PvP Enabled -mapPlugins=Plugins mapText=Map Text Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/messages_de.properties =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/messages_de.properties 2011-03-10 17:33:42 UTC (rev 8868) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/messages_de.properties 2011-03-17 20:59:35 UTC (rev 8869) @@ -34,6 +34,7 @@ # Map Properties mapMap=Karte mapRegion=Region +mapWeather=Wetter mapOutdoor=Im Freien mapOptions=Optionen mapNoSave=Nicht speichern Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/messages_fr.properties =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/messages_fr.properties 2011-03-10 17:33:42 UTC (rev 8868) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/messages_fr.properties 2011-03-17 20:59:35 UTC (rev 8869) @@ -35,6 +35,7 @@ # Map Properties #mapMap= #mapRegion= +#mapWeather= #mapOutdoor= #mapOptions= #mapNoSave= Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/messages_sv.properties =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/messages_sv.properties 2011-03-10 17:33:42 UTC (rev 8868) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/messages_sv.properties 2011-03-17 20:59:35 UTC (rev 8869) @@ -34,6 +34,7 @@ # Map Properties mapMap=Karta #mapRegion= +#mapWeather= mapOutdoor=Utomhus mapOptions=Inst\xE4llningar mapNoSave=Ingen spara Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/io/MapArchObjectParser.java =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/io/MapArchObjectParser.java 2011-03-10 17:33:42 UTC (rev 8868) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/io/MapArchObjectParser.java 2011-03-17 20:59:35 UTC (rev 8869) @@ -102,9 +102,6 @@ if (mapArchObject.isPvp()) { appendable.append("pvp 1\n"); } - if (mapArchObject.isPlugins()) { - appendable.append("plugins 1\n"); - } for (final Direction direction : Direction.values()) { if (mapArchObject.getTilePath(direction).length() > 0) { format.format("tile_path_%d %s\n", direction.ordinal() + 1, mapArchObject.getTilePath(direction)); @@ -123,6 +120,10 @@ if (region.length() > 0) { format.format("region %s\n", region); } + final String weather = mapArchObject.getWeather(); + if (weather.length() > 0) { + format.format("weather %s\n", weather); + } appendable.append("end\n"); } @@ -181,11 +182,6 @@ return true; } - if (line.startsWith("plugins ")) { - mapArchObject.setPlugins(NumberUtils.parseInt(line.substring(8)) != 0); - return true; - } - if (line.startsWith("tileset_id ")) { mapArchObject.setTilesetId(NumberUtils.parseInt(line.substring(11))); return true; @@ -211,6 +207,11 @@ return true; } + if (line.startsWith("weather ")) { + mapArchObject.setWeather(line.substring(8)); + return true; + } + return false; } Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/maparchobject/MapArchObject.java =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/maparchobject/MapArchObject.java 2011-03-10 17:33:42 UTC (rev 8868) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/maparchobject/MapArchObject.java 2011-03-17 20:59:35 UTC (rev 8869) @@ -104,12 +104,6 @@ private boolean pvp = false; /** - * Global map events for this map allowed. - * @serial - */ - private boolean plugins = false; - - /** * The tileset id. 0 means no available tileset id * @serial */ @@ -142,6 +136,13 @@ private String region = ""; /** + * The weather effect active on this map. + * @serial + */ + @NotNull + private String weather = ""; + + /** * {@inheritDoc} */ @Override @@ -157,12 +158,12 @@ setFixedResetTime(mapArchObject.fixedResetTime); setPlayerNoSave(mapArchObject.playerNoSave); setPvp(mapArchObject.pvp); - setPlugins(mapArchObject.plugins); setTilesetId(mapArchObject.tilesetId); setTilesetX(mapArchObject.tilesetX); setTilesetY(mapArchObject.tilesetY); setBackgroundMusic(mapArchObject.backgroundMusic); setRegion(mapArchObject.region); + setWeather(mapArchObject.weather); } /** @@ -376,27 +377,6 @@ } /** - * Returns the plugins attribute. - * @return the plugins attribute - */ - public boolean isPlugins() { - return plugins; - } - - /** - * Sets the plugins attribute. - * @param plugins the plugins attribute - */ - public void setPlugins(final boolean plugins) { - if (this.plugins == plugins) { - return; - } - - this.plugins = plugins; - setModified(); - } - - /** * Returns the tileset id attribute. * @return the tileset id attribute */ @@ -505,6 +485,29 @@ } /** + * Returns the weather attribute. + * @return the weather attribute + */ + @NotNull + public String getWeather() { + return weather; + } + + /** + * Sets the weather attribute. + * @param weather the weather attribute + */ + public void setWeather(@NotNull final String weather) { + final String trimmedWeather = weather.trim(); + if (this.weather.equals(trimmedWeather)) { + return; + } + + this.weather = trimmedWeather; + setModified(); + } + + /** * {@inheritDoc} */ @Override @@ -524,7 +527,7 @@ return false; } final MapArchObject mapArchObject = (MapArchObject) obj; - return super.equals(obj) && mapArchObject.noSave == noSave && mapArchObject.noMagic == noMagic && mapArchObject.noPriest == noPriest && mapArchObject.noHarm == noHarm && mapArchObject.noSummon == noSummon && mapArchObject.fixedLogin == fixedLogin && mapArchObject.unique == unique && mapArchObject.fixedResetTime == fixedResetTime && mapArchObject.playerNoSave == playerNoSave && mapArchObject.pvp == pvp && mapArchObject.plugins == plugins && mapArchObject.tilesetId == tilesetId && mapArchObject.tilesetX == tilesetX && mapArchObject.tilesetY == tilesetY && mapArchObject.backgroundMusic.equals(backgroundMusic); + return super.equals(obj) && mapArchObject.noSave == noSave && mapArchObject.noMagic == noMagic && mapArchObject.noPriest == noPriest && mapArchObject.noHarm == noHarm && mapArchObject.noSummon == noSummon && mapArchObject.fixedLogin == fixedLogin && mapArchObject.unique == unique && mapArchObject.fixedResetTime == fixedResetTime && mapArchObject.playerNoSave == playerNoSave && mapArchObject.pvp == pvp && mapArchObject.tilesetId == tilesetId && mapArchObject.tilesetX == tilesetX && mapArchObject.tilesetY == tilesetY && mapArchObject.backgroundMusic.equals(backgroundMusic) && mapArchObject.region.equals(region) && mapArchObject.weather.equals(weather); } /** @@ -532,7 +535,7 @@ */ @Override public int hashCode() { - return super.hashCode() + (noSave ? 2 : 0) + (noMagic ? 4 : 0) + (noPriest ? 8 : 0) + (noHarm ? 16 : 0) + (noSummon ? 32 : 0) + (fixedLogin ? 64 : 0) + (unique ? 128 : 0) + (fixedResetTime ? 256 : 0) + (playerNoSave ? 512 : 0) + (pvp ? 1024 : 0) + (plugins ? 2048 : 0) + tilesetId + tilesetX + tilesetY + backgroundMusic.hashCode() + region.hashCode(); + return super.hashCode() + (noSave ? 2 : 0) + (noMagic ? 4 : 0) + (noPriest ? 8 : 0) + (noHarm ? 16 : 0) + (noSummon ? 32 : 0) + (fixedLogin ? 64 : 0) + (unique ? 128 : 0) + (fixedResetTime ? 256 : 0) + (playerNoSave ? 512 : 0) + (pvp ? 1024 : 0) + tilesetId + tilesetX + tilesetY + backgroundMusic.hashCode() + region.hashCode() + weather.hashCode(); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-03-10 17:33:50
|
Revision: 8868 http://gridarta.svn.sourceforge.net/gridarta/?rev=8868&view=rev Author: akirschbaum Date: 2011-03-10 17:33:42 +0000 (Thu, 10 Mar 2011) Log Message: ----------- Whitespace changes. Modified Paths: -------------- trunk/atrinik/src/test/net/sf/gridarta/var/atrinik/model/archetype/ArchetypeParserTest.java trunk/crossfire/src/test/net/sf/gridarta/var/crossfire/model/archetype/ArchetypeParserTest.java trunk/model/src/app/net/sf/gridarta/model/archetypechooser/ArchetypeChooserModel.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/undo/UndoState.java trunk/model/src/test/net/sf/gridarta/model/archetype/ArchetypeParserTest.java trunk/src/app/net/sf/gridarta/gui/filter/MenuItemCreator.java trunk/src/app/net/sf/gridarta/gui/map/MapPreviewAccessory.java trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewManager.java trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTree.java trunk/src/app/net/sf/gridarta/gui/shortcuts/KeyStrokeDialog.java trunk/src/app/net/sf/gridarta/gui/shortcuts/KeyStrokeField.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/SystemIcons.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-03-09 09:18:28 UTC (rev 8867) +++ trunk/atrinik/src/test/net/sf/gridarta/var/atrinik/model/archetype/ArchetypeParserTest.java 2011-03-10 17:33:42 UTC (rev 8868) @@ -164,7 +164,7 @@ */ @NotNull @Override - @SuppressWarnings({"NullableProblems"}) + @SuppressWarnings({ "NullableProblems" }) protected ArchetypeSet getArchetypeSet() { if (archetypeSet == null) { throw new IllegalStateException(); 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-03-09 09:18:28 UTC (rev 8867) +++ trunk/crossfire/src/test/net/sf/gridarta/var/crossfire/model/archetype/ArchetypeParserTest.java 2011-03-10 17:33:42 UTC (rev 8868) @@ -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/archetypechooser/ArchetypeChooserModel.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetypechooser/ArchetypeChooserModel.java 2011-03-09 09:18:28 UTC (rev 8867) +++ trunk/model/src/app/net/sf/gridarta/model/archetypechooser/ArchetypeChooserModel.java 2011-03-10 17:33:42 UTC (rev 8868) @@ -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/ArchetypeType.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeType.java 2011-03-09 09:18:28 UTC (rev 8867) +++ trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeType.java 2011-03-10 17:33:42 UTC (rev 8868) @@ -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-03-09 09:18:28 UTC (rev 8867) +++ trunk/model/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java 2011-03-10 17:33:42 UTC (rev 8868) @@ -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 @@ -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/undo/UndoState.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/undo/UndoState.java 2011-03-09 09:18:28 UTC (rev 8867) +++ trunk/model/src/app/net/sf/gridarta/model/undo/UndoState.java 2011-03-10 17:33:42 UTC (rev 8868) @@ -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/test/net/sf/gridarta/model/archetype/ArchetypeParserTest.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/archetype/ArchetypeParserTest.java 2011-03-09 09:18:28 UTC (rev 8867) +++ trunk/model/src/test/net/sf/gridarta/model/archetype/ArchetypeParserTest.java 2011-03-10 17:33:42 UTC (rev 8868) @@ -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/src/app/net/sf/gridarta/gui/filter/MenuItemCreator.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/filter/MenuItemCreator.java 2011-03-09 09:18:28 UTC (rev 8867) +++ trunk/src/app/net/sf/gridarta/gui/filter/MenuItemCreator.java 2011-03-10 17:33:42 UTC (rev 8868) @@ -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/map/MapPreviewAccessory.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/MapPreviewAccessory.java 2011-03-09 09:18:28 UTC (rev 8867) +++ trunk/src/app/net/sf/gridarta/gui/map/MapPreviewAccessory.java 2011-03-10 17:33:42 UTC (rev 8868) @@ -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/mapview/MapViewManager.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewManager.java 2011-03-09 09:18:28 UTC (rev 8867) +++ trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewManager.java 2011-03-10 17:33:42 UTC (rev 8868) @@ -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/mapfiles/MapFolderTree.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTree.java 2011-03-09 09:18:28 UTC (rev 8867) +++ trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTree.java 2011-03-10 17:33:42 UTC (rev 8868) @@ -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/shortcuts/KeyStrokeDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/shortcuts/KeyStrokeDialog.java 2011-03-09 09:18:28 UTC (rev 8867) +++ trunk/src/app/net/sf/gridarta/gui/shortcuts/KeyStrokeDialog.java 2011-03-10 17:33:42 UTC (rev 8868) @@ -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-03-09 09:18:28 UTC (rev 8867) +++ trunk/src/app/net/sf/gridarta/gui/shortcuts/KeyStrokeField.java 2011-03-10 17:33:42 UTC (rev 8868) @@ -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/textedit/src/app/net/sf/gridarta/textedit/textarea/JEditTextArea.java =================================================================== --- trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/JEditTextArea.java 2011-03-09 09:18:28 UTC (rev 8867) +++ trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/JEditTextArea.java 2011-03-10 17:33:42 UTC (rev 8868) @@ -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-03-09 09:18:28 UTC (rev 8867) +++ trunk/utils/src/app/net/sf/gridarta/utils/CopyReader.java 2011-03-10 17:33:42 UTC (rev 8868) @@ -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/SystemIcons.java =================================================================== --- trunk/utils/src/app/net/sf/gridarta/utils/SystemIcons.java 2011-03-09 09:18:28 UTC (rev 8867) +++ trunk/utils/src/app/net/sf/gridarta/utils/SystemIcons.java 2011-03-10 17:33:42 UTC (rev 8868) @@ -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); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-03-09 09:18:35
|
Revision: 8867 http://gridarta.svn.sourceforge.net/gridarta/?rev=8867&view=rev Author: akirschbaum Date: 2011-03-09 09:18:28 +0000 (Wed, 09 Mar 2011) Log Message: ----------- Extract duplicated code. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/mapcursor/MapCursorActions.java Modified: trunk/src/app/net/sf/gridarta/gui/mapcursor/MapCursorActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapcursor/MapCursorActions.java 2011-03-09 09:12:10 UTC (rev 8866) +++ trunk/src/app/net/sf/gridarta/gui/mapcursor/MapCursorActions.java 2011-03-09 09:18:28 UTC (rev 8867) @@ -482,16 +482,7 @@ * @return whether the action was or can be performed */ private boolean doSelectSquare(final boolean performAction) { - final MapCursor mapCursor = getActiveMapCursor(); - if (mapCursor == null) { - return false; - } - - if (performAction) { - selectSquare(mapCursor, SelectionMode.FLIP); - } - - return true; + return doSelection(performAction, SelectionMode.FLIP); } /** @@ -500,16 +491,7 @@ * @return whether the action was or can be performed */ private boolean doAddToSelection(final boolean performAction) { - final MapCursor mapCursor = getActiveMapCursor(); - if (mapCursor == null) { - return false; - } - - if (performAction) { - selectSquare(mapCursor, SelectionMode.ADD); - } - - return true; + return doSelection(performAction, SelectionMode.ADD); } /** @@ -518,13 +500,23 @@ * @return whether the action was or can be performed */ private boolean doSubFromSelection(final boolean performAction) { + return doSelection(performAction, SelectionMode.SUB); + } + + /** + * Executes an action for changing the selection. + * @param performAction whether the action should be performed + * @param mode the type of action to perform + * @return whether the action was or can be performed + */ + private boolean doSelection(final boolean performAction, @NotNull final SelectionMode mode) { final MapCursor mapCursor = getActiveMapCursor(); if (mapCursor == null) { return false; } if (performAction) { - selectSquare(mapCursor, SelectionMode.SUB); + selectSquare(mapCursor, mode); } return true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-03-09 09:12:16
|
Revision: 8866 http://gridarta.svn.sourceforge.net/gridarta/?rev=8866&view=rev Author: akirschbaum Date: 2011-03-09 09:12:10 +0000 (Wed, 09 Mar 2011) Log Message: ----------- Extract duplicated code. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/actions/UndoActions.java Modified: trunk/src/app/net/sf/gridarta/actions/UndoActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/actions/UndoActions.java 2011-03-09 09:07:00 UTC (rev 8865) +++ trunk/src/app/net/sf/gridarta/actions/UndoActions.java 2011-03-09 09:12:10 UTC (rev 8866) @@ -45,26 +45,7 @@ * @param mapModel the map model to affect */ public static <G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> void undo(@NotNull final UndoModel<G, A, R> undoModel, @NotNull final MapModel<G, A, R> mapModel) { - final UndoState<G, A, R> undoState = undoModel.undo(); - try { - mapModel.beginTransaction(undoState.getName()); - try { - final A newMapArchObject = undoState.getMapArchObject(); - final MapArchObject<A> mapArchObject = mapModel.getMapArchObject(); - mapArchObject.setMapSize(newMapArchObject.getMapSize()); - mapArchObject.beginTransaction(); - try { - mapArchObject.setState(newMapArchObject); - } finally { - mapArchObject.endTransaction(); - } - undoState.getSavedSquares().applyChanges(mapModel); - } finally { - mapModel.endTransaction(); - } - } finally { - undoModel.finish(); - } + applyChange(undoModel, mapModel, undoModel.undo()); } /** @@ -73,7 +54,16 @@ * @param mapModel the map model to affect */ public static <G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> void redo(@NotNull final UndoModel<G, A, R> undoModel, @NotNull final MapModel<G, A, R> mapModel) { - final UndoState<G, A, R> undoState = undoModel.redo(); + applyChange(undoModel, mapModel, undoModel.redo()); + } + + /** + * Applies a change (for an undo or a redo operation). + * @param undoModel the state to redo + * @param mapModel the map model to affect + * @param undoState the change to apply + */ + private static <G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> void applyChange(final UndoModel<G, A, R> undoModel, final MapModel<G, A, R> mapModel, final UndoState<G, A, R> undoState) { try { mapModel.beginTransaction(undoState.getName()); try { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-03-09 09:07:07
|
Revision: 8865 http://gridarta.svn.sourceforge.net/gridarta/?rev=8865&view=rev Author: akirschbaum Date: 2011-03-09 09:07:00 +0000 (Wed, 09 Mar 2011) Log Message: ----------- Extract duplicated code. 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-03-09 09:04:28 UTC (rev 8864) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/SmoothingRenderer.java 2011-03-09 09:07:00 UTC (rev 8865) @@ -215,12 +215,12 @@ if (weight > 0) { src.x = IGUIConstants.SQUARE_WIDTH * weight; src.y = 0; - 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); + drawImage(graphics, x, y, borderOffsetX, borderOffsetY, src, img); } if (weightC > 0) { src.x = IGUIConstants.SQUARE_WIDTH * weightC; src.y = IGUIConstants.SQUARE_HEIGHT; - 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); + drawImage(graphics, x, y, borderOffsetX, borderOffsetY, src, img); } } /*while there's some smooth to do*/ @@ -232,4 +232,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); + } + } // class SmoothingRenderer This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-03-09 09:04:35
|
Revision: 8864 http://gridarta.svn.sourceforge.net/gridarta/?rev=8864&view=rev Author: akirschbaum Date: 2011-03-09 09:04:28 +0000 (Wed, 09 Mar 2011) Log Message: ----------- Extract duplicated code. Modified Paths: -------------- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/archetype/ArchetypeSet.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/archetype/ArchetypeSet.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/archetype/ArchetypeSet.java Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/archetype/ArchetypeSet.java =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/archetype/ArchetypeSet.java 2011-03-09 08:20:24 UTC (rev 8863) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/archetype/ArchetypeSet.java 2011-03-09 09:04:28 UTC (rev 8864) @@ -53,64 +53,64 @@ */ @Override protected int collectArchetype(@NotNull final Archetype archetype, @NotNull final Writer out, @NotNull final GameObjectParser<GameObject, MapArchObject, Archetype> gameObjectParser) throws IOException { - out.append("Object ").append(archetype.getArchetypeName()).append('\n'); + writeArchetype(out, archetype, true, gameObjectParser); + // process the multi-part tails: + int result = 1; + for (Archetype tail = archetype.getMultiNext(); tail != null; tail = tail.getMultiNext()) { + result++; + + out.append("More\n"); + writeArchetype(out, tail, false, gameObjectParser); + } + + return result; + } + + /** + * Writes an {@link Archetype}. + * @param writer the writer to write to + * @param archetype the archetype to write + * @param isHeadPart whether this part is the head part + * @param gameObjectParser the game object parser for writing the inventory + * @throws IOException if an I/O error occurs + */ + private static void writeArchetype(@NotNull final Writer writer, @NotNull final net.sf.gridarta.model.archetype.Archetype<GameObject, MapArchObject, Archetype> archetype, final boolean isHeadPart, @NotNull final GameObjectParser<GameObject, MapArchObject, Archetype> gameObjectParser) throws IOException { + writer.append("Object ").append(archetype.getArchetypeName()).append('\n'); + if (archetype.getMultiShapeID() > 0) { - out.append("mpart_id ").append(Integer.toString(archetype.getMultiShapeID())).append('\n'); + writer.append("mpart_id ").append(Integer.toString(archetype.getMultiShapeID())).append('\n'); } if (archetype.getMultiPartNr() > 0) { - out.append("mpart_nr ").append(Integer.toString(archetype.getMultiPartNr())).append('\n'); + writer.append("mpart_nr ").append(Integer.toString(archetype.getMultiPartNr())).append('\n'); } if (archetype.getMsgText() != null) { - out.append("msg\n").append(archetype.getMsgText()).append("endmsg\n"); + writer.append("msg\n").append(archetype.getMsgText()).append("endmsg\n"); } - // special: add a string-attribute with the display-category - out.append("editor_folder ").append(archetype.getEditorFolder()).append('\n'); - - out.append(archetype.getObjectText()); - - for (final GameObject inv : archetype) { - gameObjectParser.save(out, inv); + if (isHeadPart) { + // special: add a string-attribute with the display-category + writer.append("editor_folder ").append(archetype.getEditorFolder()).append('\n'); } - out.append("end\n"); + writer.append(archetype.getObjectText()); - // process the multi-part tails: - int result = 1; - for (Archetype tail = archetype.getMultiNext(); tail != null; tail = tail.getMultiNext()) { - result++; - - out.append("More\n"); - - out.append("Object ").append(tail.getArchetypeName()).append('\n'); - - if (tail.getMultiShapeID() > 0) { - out.append("mpart_id ").append(Integer.toString(tail.getMultiShapeID())).append('\n'); + if (isHeadPart) { + for (final GameObject inv : archetype) { + gameObjectParser.save(writer, inv); } - if (tail.getMultiPartNr() > 0) { - out.append("mpart_nr ").append(Integer.toString(tail.getMultiPartNr())).append('\n'); - } - - if (tail.getMsgText() != null) { - out.append("msg\n").append(tail.getMsgText()).append("endmsg\n"); - } - - out.append(tail.getObjectText()); - + } else { // position of multi relative to head - if (tail.getMultiX() != 0) { - out.append("x ").append(Integer.toString(tail.getMultiX())).append('\n'); + if (archetype.getMultiX() != 0) { + writer.append("x ").append(Integer.toString(archetype.getMultiX())).append('\n'); } - if (tail.getMultiY() != 0) { - out.append("y ").append(Integer.toString(tail.getMultiY())).append('\n'); + if (archetype.getMultiY() != 0) { + writer.append("y ").append(Integer.toString(archetype.getMultiY())).append('\n'); } - - out.append("end\n"); } - return result; + writer.append("end\n"); } /** Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/archetype/ArchetypeSet.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/archetype/ArchetypeSet.java 2011-03-09 08:20:24 UTC (rev 8863) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/archetype/ArchetypeSet.java 2011-03-09 09:04:28 UTC (rev 8864) @@ -61,47 +61,57 @@ */ @Override protected int collectArchetype(@NotNull final Archetype archetype, @NotNull final Writer out, @NotNull final GameObjectParser<GameObject, MapArchObject, Archetype> gameObjectParser) throws IOException { - out.append("Object ").append(archetype.getArchetypeName()).append('\n'); + writeArchetype(out, archetype, true, gameObjectParser); - // special: add a string-attribute with the display-category - out.append("editor_folder ").append(archetype.getEditorFolder()).append('\n'); - - // add message text - if (archetype.getMsgText() != null) { - out.append("msg\n").append(archetype.getMsgText()).append("endmsg\n"); - } - - out.append(archetype.getObjectText()); - - for (final GameObject inv : archetype) { - gameObjectParser.save(out, inv); - } - - out.append("end\n"); - // process the multi-part tails: int result = 1; for (Archetype tail = archetype.getMultiNext(); tail != null; tail = tail.getMultiNext()) { result++; out.append("More\n"); + writeArchetype(out, tail, false, gameObjectParser); + } - out.append("Object ").append(tail.getArchetypeName()).append('\n'); + return result; + } - out.append(tail.getObjectText()); + /** + * Writes an {@link Archetype}. + * @param writer the writer to write to + * @param archetype the archetype to write + * @param isHeadPart whether this part is the head part + * @param gameObjectParser the game object parser for writing the inventory + * @throws IOException if an I/O error occurs + */ + private static void writeArchetype(@NotNull final Writer writer, @NotNull final net.sf.gridarta.model.archetype.Archetype<GameObject, ?, ?> archetype, final boolean isHeadPart, @NotNull final GameObjectParser<GameObject, MapArchObject, Archetype> gameObjectParser) throws IOException { + writer.append("Object ").append(archetype.getArchetypeName()).append('\n'); + if (isHeadPart) { + // special: add a string-attribute with the display-category + writer.append("editor_folder ").append(archetype.getEditorFolder()).append('\n'); + + // add message text + if (archetype.getMsgText() != null) { + writer.append("msg\n").append(archetype.getMsgText()).append("endmsg\n"); + } + } + + writer.append(archetype.getObjectText()); + if (isHeadPart) { + for (final GameObject inv : archetype) { + gameObjectParser.save(writer, inv); + } + } else { // position of multi relative to head - if (tail.getMultiX() != 0) { - out.append("x ").append(Integer.toString(tail.getMultiX())).append('\n'); + if (archetype.getMultiX() != 0) { + writer.append("x ").append(Integer.toString(archetype.getMultiX())).append('\n'); } - if (tail.getMultiY() != 0) { - out.append("y ").append(Integer.toString(tail.getMultiY())).append('\n'); + if (archetype.getMultiY() != 0) { + writer.append("y ").append(Integer.toString(archetype.getMultiY())).append('\n'); } - - out.append("end\n"); } - return result; + writer.append("end\n"); } /** Modified: trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/archetype/ArchetypeSet.java =================================================================== --- trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/archetype/ArchetypeSet.java 2011-03-09 08:20:24 UTC (rev 8863) +++ trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/archetype/ArchetypeSet.java 2011-03-09 09:04:28 UTC (rev 8864) @@ -53,60 +53,59 @@ */ @Override protected int collectArchetype(@NotNull final Archetype archetype, @NotNull final Writer out, @NotNull final GameObjectParser<GameObject, MapArchObject, Archetype> gameObjectParser) throws IOException { - out.append("Object ").append(archetype.getArchetypeName()).append('\n'); + writeArchetype(out, archetype, true); - if (archetype.getMultiShapeID() > 0) { - out.append("mpart_id ").append(Integer.toString(archetype.getMultiShapeID())).append('\n'); - } - if (archetype.getMultiPartNr() > 0) { - out.append("mpart_nr ").append(Integer.toString(archetype.getMultiPartNr())).append('\n'); - } - - if (archetype.getMsgText() != null) { - out.append("msg\n").append(archetype.getMsgText()).append("endmsg\n"); - } - - // special: add a string-attribute with the display-category - out.append("editor_folder ").append(archetype.getEditorFolder()).append('\n'); - - out.append(archetype.getObjectText()); - - out.append("end\n"); - // process the multi-part tails: int result = 1; for (Archetype tail = archetype.getMultiNext(); tail != null; tail = tail.getMultiNext()) { result++; out.append("More\n"); + writeArchetype(out, tail, false); + } - out.append("Object ").append(tail.getArchetypeName()).append('\n'); + return result; + } - if (tail.getMultiShapeID() > 0) { - out.append("mpart_id ").append(Integer.toString(tail.getMultiShapeID())).append('\n'); - } - if (tail.getMultiPartNr() > 0) { - out.append("mpart_nr ").append(Integer.toString(tail.getMultiPartNr())).append('\n'); - } + /** + * Writes an {@link Archetype}. + * @param writer the writer to write to + * @param archetype the archetype to write + * @param isHeadPart whether this part is the head part + * @throws IOException if an I/O error occurs + */ + private static void writeArchetype(@NotNull final Writer writer, @NotNull final net.sf.gridarta.model.archetype.Archetype<GameObject, MapArchObject, Archetype> archetype, final boolean isHeadPart) throws IOException { + writer.append("Object ").append(archetype.getArchetypeName()).append('\n'); - if (tail.getMsgText() != null) { - out.append("msg\n").append(tail.getMsgText()).append("endmsg\n"); - } + if (archetype.getMultiShapeID() > 0) { + writer.append("mpart_id ").append(Integer.toString(archetype.getMultiShapeID())).append('\n'); + } + if (archetype.getMultiPartNr() > 0) { + writer.append("mpart_nr ").append(Integer.toString(archetype.getMultiPartNr())).append('\n'); + } - out.append(tail.getObjectText()); + if (archetype.getMsgText() != null) { + writer.append("msg\n").append(archetype.getMsgText()).append("endmsg\n"); + } + if (isHeadPart) { + // special: add a string-attribute with the display-category + writer.append("editor_folder ").append(archetype.getEditorFolder()).append('\n'); + } + + writer.append(archetype.getObjectText()); + + if (!isHeadPart) { // position of multi relative to head - if (tail.getMultiX() != 0) { - out.append("x ").append(Integer.toString(tail.getMultiX())).append('\n'); + if (archetype.getMultiX() != 0) { + writer.append("x ").append(Integer.toString(archetype.getMultiX())).append('\n'); } - if (tail.getMultiY() != 0) { - out.append("y ").append(Integer.toString(tail.getMultiY())).append('\n'); + if (archetype.getMultiY() != 0) { + writer.append("y ").append(Integer.toString(archetype.getMultiY())).append('\n'); } - - out.append("end\n"); } - return result; + writer.append("end\n"); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-03-09 08:20:33
|
Revision: 8863 http://gridarta.svn.sourceforge.net/gridarta/?rev=8863&view=rev Author: akirschbaum Date: 2011-03-09 08:20:24 +0000 (Wed, 09 Mar 2011) Log Message: ----------- Fix or suppress false posirive nullable warnings. Modified Paths: -------------- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/maparchobject/MapArchObject.java 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/daimonin/src/app/net/sf/gridarta/var/daimonin/model/maparchobject/MapArchObject.java trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeBuilder.java trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeSet.java trunk/model/src/app/net/sf/gridarta/model/archetype/ArchetypeSet.java trunk/model/src/app/net/sf/gridarta/model/archetypechooser/ArchetypeChooserModel.java trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeType.java trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSet.java trunk/model/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java trunk/model/src/app/net/sf/gridarta/model/face/FilterFaceProvider.java trunk/model/src/app/net/sf/gridarta/model/undo/UndoState.java trunk/model/src/test/net/sf/gridarta/model/archetype/ArchetypeParserTest.java trunk/model/src/test/net/sf/gridarta/model/maparchobject/TestMapArchObject.java trunk/src/app/net/sf/gridarta/gui/filter/MenuItemCreator.java trunk/src/app/net/sf/gridarta/gui/map/MapPreviewAccessory.java trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewManager.java trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTree.java trunk/src/app/net/sf/gridarta/gui/scripts/DefaultScriptArchEditor.java trunk/src/app/net/sf/gridarta/gui/scripts/ScriptArchEditor.java trunk/src/app/net/sf/gridarta/gui/scripts/ScriptedEventEditor.java trunk/src/app/net/sf/gridarta/gui/shortcuts/KeyStrokeDialog.java trunk/src/app/net/sf/gridarta/gui/shortcuts/KeyStrokeField.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/SystemIcons.java Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/maparchobject/MapArchObject.java =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/maparchobject/MapArchObject.java 2011-03-09 07:51:34 UTC (rev 8862) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/maparchobject/MapArchObject.java 2011-03-09 08:20:24 UTC (rev 8863) @@ -547,6 +547,7 @@ /** * {@inheritDoc} */ + @NotNull @Override protected MapArchObject getThis() { return this; 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-03-09 07:51:34 UTC (rev 8862) +++ trunk/atrinik/src/test/net/sf/gridarta/var/atrinik/model/archetype/ArchetypeParserTest.java 2011-03-09 08:20:24 UTC (rev 8863) @@ -164,6 +164,7 @@ */ @NotNull @Override + @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-03-09 07:51:34 UTC (rev 8862) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/maparchobject/MapArchObject.java 2011-03-09 08:20:24 UTC (rev 8863) @@ -602,6 +602,7 @@ /** * {@inheritDoc} */ + @NotNull @Override protected MapArchObject getThis() { return 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-03-09 07:51:34 UTC (rev 8862) +++ trunk/crossfire/src/test/net/sf/gridarta/var/crossfire/model/archetype/ArchetypeParserTest.java 2011-03-09 08:20:24 UTC (rev 8863) @@ -120,6 +120,7 @@ */ @NotNull @Override + @SuppressWarnings({"NullableProblems"}) protected ArchetypeSet getArchetypeSet() { if (archetypeSet == null) { throw new IllegalStateException(); Modified: trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/maparchobject/MapArchObject.java =================================================================== --- trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/maparchobject/MapArchObject.java 2011-03-09 07:51:34 UTC (rev 8862) +++ trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/maparchobject/MapArchObject.java 2011-03-09 08:20:24 UTC (rev 8863) @@ -488,6 +488,7 @@ /** * {@inheritDoc} */ + @NotNull @Override protected MapArchObject getThis() { return this; Modified: trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeBuilder.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeBuilder.java 2011-03-09 07:51:34 UTC (rev 8862) +++ trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeBuilder.java 2011-03-09 08:20:24 UTC (rev 8863) @@ -165,11 +165,15 @@ } /** - * @noinspection TypeMayBeWeakened + * @noinspection NullableProblems, TypeMayBeWeakened */ @NotNull protected R getArchetype() { - return archetype; + final R result = archetype; + if (result == null) { + throw new IllegalStateException(); + } + return result; } } // class AbstractArchetypeBuilder Modified: trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeSet.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeSet.java 2011-03-09 07:51:34 UTC (rev 8862) +++ trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeSet.java 2011-03-09 08:20:24 UTC (rev 8863) @@ -208,6 +208,7 @@ /** * {@inheritDoc} */ + @NotNull @Override public Collection<R> getArchetypes() { return Collections.unmodifiableCollection(archetypes); Modified: trunk/model/src/app/net/sf/gridarta/model/archetype/ArchetypeSet.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetype/ArchetypeSet.java 2011-03-09 07:51:34 UTC (rev 8862) +++ trunk/model/src/app/net/sf/gridarta/model/archetype/ArchetypeSet.java 2011-03-09 08:20:24 UTC (rev 8863) @@ -93,6 +93,7 @@ * Returns a read-only collection of all {@link Archetype Archetypes}. * @return a read-only collection of all archetypes */ + @NotNull Collection<R> getArchetypes(); void connectFaces(); Modified: trunk/model/src/app/net/sf/gridarta/model/archetypechooser/ArchetypeChooserModel.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetypechooser/ArchetypeChooserModel.java 2011-03-09 07:51:34 UTC (rev 8862) +++ trunk/model/src/app/net/sf/gridarta/model/archetypechooser/ArchetypeChooserModel.java 2011-03-09 08:20:24 UTC (rev 8863) @@ -165,6 +165,7 @@ * Sets the selected {@link ArchetypeChooserPanel}. * @param selectedPanel the selected panel */ + @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/ArchetypeType.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeType.java 2011-03-09 07:51:34 UTC (rev 8862) +++ trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeType.java 2011-03-09 08:20:24 UTC (rev 8863) @@ -154,8 +154,10 @@ * @return the description */ @NotNull + @SuppressWarnings({"NullableProblems"}) public String getDescription() { - return description == null ? "" : description.trim(); + final String result = description; + return result == null ? "" : result.trim(); } /** @@ -163,8 +165,10 @@ * @return the usage notes */ @NotNull + @SuppressWarnings({"NullableProblems"}) public String getUse() { - return use == null ? "" : use.trim(); + final String result = use; + return result == null ? "" : result.trim(); } /** Modified: trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSet.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSet.java 2011-03-09 07:51:34 UTC (rev 8862) +++ trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSet.java 2011-03-09 08:20:24 UTC (rev 8863) @@ -172,7 +172,7 @@ * Sets the default archetype type. * @param defaultArchetypeType the default archetype type */ - public void setDefaultArchetypeType(@NotNull final ArchetypeType defaultArchetypeType) { + public void setDefaultArchetypeType(@Nullable final ArchetypeType defaultArchetypeType) { this.defaultArchetypeType = defaultArchetypeType; } Modified: trunk/model/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java 2011-03-09 07:51:34 UTC (rev 8862) +++ trunk/model/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java 2011-03-09 08:20:24 UTC (rev 8863) @@ -214,6 +214,7 @@ * Sets the face name. * @param faceName the new face name */ + @SuppressWarnings({"NullableProblems"}) private void setFaceName(@NotNull final String faceName) { final String effectiveFaceName = getEffectiveFaceName(faceName); //Strings are interned @@ -922,6 +923,7 @@ * Sets object animation <code>animation <var>animName</var></code>. * @param animName object animation <code>animation <var>animName</var></code> */ + @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. @@ -968,6 +970,7 @@ /** * {@inheritDoc} */ + @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/face/FilterFaceProvider.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/face/FilterFaceProvider.java 2011-03-09 07:51:34 UTC (rev 8862) +++ trunk/model/src/app/net/sf/gridarta/model/face/FilterFaceProvider.java 2011-03-09 08:20:24 UTC (rev 8863) @@ -62,7 +62,7 @@ * @param parent parent provider to get unfiltered images from * @param filter ImageFilter to apply for creating the images */ - public FilterFaceProvider(@NotNull final FaceProvider parent, @NotNull final ImageFilter filter) { + public FilterFaceProvider(@Nullable final FaceProvider parent, @NotNull final ImageFilter filter) { this.parent = parent; this.filter = filter; } @@ -71,7 +71,7 @@ * Sets a new provider as parent. * @param parent parent provider to get unfiltered images from */ - public void setParent(@NotNull final FaceProvider parent) { + public void setParent(@Nullable final FaceProvider parent) { this.parent = parent; } Modified: trunk/model/src/app/net/sf/gridarta/model/undo/UndoState.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/undo/UndoState.java 2011-03-09 07:51:34 UTC (rev 8862) +++ trunk/model/src/app/net/sf/gridarta/model/undo/UndoState.java 2011-03-09 08:20:24 UTC (rev 8863) @@ -79,6 +79,7 @@ * @throws IllegalStateException if changed map squares have been recorded * before */ + @SuppressWarnings({"NullableProblems"}) public void setSavedSquares(@NotNull final SavedSquares<G, A, R> savedSquares) { if (this.savedSquares != null) { throw new IllegalStateException(); @@ -93,6 +94,7 @@ * @throws IllegalStateException if no saved squares have been recorded */ @NotNull + @SuppressWarnings({"NullableProblems"}) public SavedSquares<G, A, R> getSavedSquares() { if (savedSquares == null) { throw new IllegalStateException(); Modified: trunk/model/src/test/net/sf/gridarta/model/archetype/ArchetypeParserTest.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/archetype/ArchetypeParserTest.java 2011-03-09 07:51:34 UTC (rev 8862) +++ trunk/model/src/test/net/sf/gridarta/model/archetype/ArchetypeParserTest.java 2011-03-09 08:20:24 UTC (rev 8863) @@ -205,11 +205,13 @@ */ @NotNull @Override + @SuppressWarnings({"NullableProblems"}) protected ArchetypeSet<TestGameObject, TestMapArchObject, TestArchetype> getArchetypeSet() { - if (archetypeSet == null) { + final ArchetypeSet<TestGameObject, TestMapArchObject, TestArchetype> result = archetypeSet; + if (result == null) { throw new IllegalStateException(); } - return archetypeSet; + return result; } } // class ArchetypeParserTest Modified: trunk/model/src/test/net/sf/gridarta/model/maparchobject/TestMapArchObject.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/maparchobject/TestMapArchObject.java 2011-03-09 07:51:34 UTC (rev 8862) +++ trunk/model/src/test/net/sf/gridarta/model/maparchobject/TestMapArchObject.java 2011-03-09 08:20:24 UTC (rev 8863) @@ -44,6 +44,7 @@ /** * {@inheritDoc} */ + @NotNull @Override protected TestMapArchObject getThis() { return this; Modified: trunk/src/app/net/sf/gridarta/gui/filter/MenuItemCreator.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/filter/MenuItemCreator.java 2011-03-09 07:51:34 UTC (rev 8862) +++ trunk/src/app/net/sf/gridarta/gui/filter/MenuItemCreator.java 2011-03-09 08:20:24 UTC (rev 8863) @@ -84,6 +84,7 @@ * @return the menu item */ @NotNull + @SuppressWarnings({"NullableProblems"}) public JMenuItem getMenuItem() { assert menuItem != null; return menuItem; Modified: trunk/src/app/net/sf/gridarta/gui/map/MapPreviewAccessory.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/MapPreviewAccessory.java 2011-03-09 07:51:34 UTC (rev 8862) +++ trunk/src/app/net/sf/gridarta/gui/map/MapPreviewAccessory.java 2011-03-09 08:20:24 UTC (rev 8863) @@ -174,8 +174,9 @@ * Updates the text and icon of {@link #preview}. * @param image the icon to set or <code>null</code> */ + @SuppressWarnings({"NullableProblems"}) private void setPreview(@Nullable final Image image) { - preview.setIcon(new ImageIcon(image)); + preview.setIcon(image == null ? null : new ImageIcon(image)); preview.setText(null); } Modified: trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewManager.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewManager.java 2011-03-09 07:51:34 UTC (rev 8862) +++ trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewManager.java 2011-03-09 08:20:24 UTC (rev 8863) @@ -61,6 +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"}) 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/mapfiles/MapFolderTree.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTree.java 2011-03-09 07:51:34 UTC (rev 8862) +++ trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTree.java 2011-03-09 08:20:24 UTC (rev 8863) @@ -159,6 +159,7 @@ * @param mapFolder the active map folder or <code>null</code> if no folder * should be active */ + @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/scripts/DefaultScriptArchEditor.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/scripts/DefaultScriptArchEditor.java 2011-03-09 07:51:34 UTC (rev 8862) +++ trunk/src/app/net/sf/gridarta/gui/scripts/DefaultScriptArchEditor.java 2011-03-09 08:20:24 UTC (rev 8863) @@ -179,7 +179,7 @@ */ @Deprecated @Override - public void setScriptEditControl(@NotNull final ScriptEditControl scriptEditControl) { + public void setScriptEditControl(@Nullable final ScriptEditControl scriptEditControl) { this.scriptEditControl = scriptEditControl; } Modified: trunk/src/app/net/sf/gridarta/gui/scripts/ScriptArchEditor.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/scripts/ScriptArchEditor.java 2011-03-09 07:51:34 UTC (rev 8862) +++ trunk/src/app/net/sf/gridarta/gui/scripts/ScriptArchEditor.java 2011-03-09 08:20:24 UTC (rev 8863) @@ -27,6 +27,7 @@ import net.sf.gridarta.model.scripts.ScriptArchData; import net.sf.gridarta.textedit.scripteditor.ScriptEditControl; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public interface ScriptArchEditor<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> { @@ -43,6 +44,6 @@ void addEventScript(G gameObject, ScriptArchData<G, A, R> scriptArchData, @NotNull Frame parent); @Deprecated - void setScriptEditControl(@NotNull ScriptEditControl scriptEditControl); + void setScriptEditControl(@Nullable ScriptEditControl scriptEditControl); } // interface ScriptArchEditor Modified: trunk/src/app/net/sf/gridarta/gui/scripts/ScriptedEventEditor.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/scripts/ScriptedEventEditor.java 2011-03-09 07:51:34 UTC (rev 8862) +++ trunk/src/app/net/sf/gridarta/gui/scripts/ScriptedEventEditor.java 2011-03-09 08:20:24 UTC (rev 8863) @@ -107,7 +107,7 @@ } @Deprecated - public void setScriptEditControl(@NotNull final ScriptEditControl scriptEditControl) { + public void setScriptEditControl(@Nullable final ScriptEditControl scriptEditControl) { this.scriptEditControl = scriptEditControl; } Modified: trunk/src/app/net/sf/gridarta/gui/shortcuts/KeyStrokeDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/shortcuts/KeyStrokeDialog.java 2011-03-09 07:51:34 UTC (rev 8862) +++ trunk/src/app/net/sf/gridarta/gui/shortcuts/KeyStrokeDialog.java 2011-03-09 08:20:24 UTC (rev 8863) @@ -259,6 +259,7 @@ * @return the key stroke or <code>null</code> */ @Nullable + @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-03-09 07:51:34 UTC (rev 8862) +++ trunk/src/app/net/sf/gridarta/gui/shortcuts/KeyStrokeField.java 2011-03-09 08:20:24 UTC (rev 8863) @@ -123,6 +123,7 @@ * Updates the current key stroke. * @param keyStroke the new key stroke */ + @SuppressWarnings({"NullableProblems"}) private void setKeyStroke(@NotNull final KeyStroke keyStroke) { if (this.keyStroke == keyStroke) { return; Modified: trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/JEditTextArea.java =================================================================== --- trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/JEditTextArea.java 2011-03-09 07:51:34 UTC (rev 8862) +++ trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/JEditTextArea.java 2011-03-09 08:20:24 UTC (rev 8863) @@ -727,7 +727,11 @@ * Returns the document this text area is editing. */ @NotNull + @SuppressWarnings({"NullableProblems"}) public SyntaxDocument getDocument() { + if (document == null) { + throw new IllegalStateException(); + } return document; } Modified: trunk/utils/src/app/net/sf/gridarta/utils/CopyReader.java =================================================================== --- trunk/utils/src/app/net/sf/gridarta/utils/CopyReader.java 2011-03-09 07:51:34 UTC (rev 8862) +++ trunk/utils/src/app/net/sf/gridarta/utils/CopyReader.java 2011-03-09 08:20:24 UTC (rev 8863) @@ -123,6 +123,7 @@ * recorded. * @param failure the failure reason */ + @SuppressWarnings({"NullableProblems"}) private void setFailure(@NotNull final String failure) { synchronized (sync) { stopped = true; Modified: trunk/utils/src/app/net/sf/gridarta/utils/SystemIcons.java =================================================================== --- trunk/utils/src/app/net/sf/gridarta/utils/SystemIcons.java 2011-03-09 07:51:34 UTC (rev 8862) +++ trunk/utils/src/app/net/sf/gridarta/utils/SystemIcons.java 2011-03-09 08:20:24 UTC (rev 8863) @@ -193,6 +193,7 @@ } @NotNull + @SuppressWarnings({"NullableProblems"}) public ImageIcon getMapCursorIcon() { if (mapCursorIcon == null) { mapCursorIcon = guiUtils.getResourceIcon(SQUARE_CURSOR); @@ -201,6 +202,7 @@ } @NotNull + @SuppressWarnings({"NullableProblems"}) public Icon getEmptySquareIcon() { if (emptySquareIcon == null) { emptySquareIcon = guiUtils.getResourceIcon(SQUARE_EMPTY); @@ -209,6 +211,7 @@ } @NotNull + @SuppressWarnings({"NullableProblems"}) public ImageIcon getUnknownSquareIcon() { if (unknownSquareIcon == null) { unknownSquareIcon = guiUtils.getResourceIcon(SQUARE_UNKNOWN); @@ -217,6 +220,7 @@ } @NotNull + @SuppressWarnings({"NullableProblems"}) public ImageIcon getWarningSquareIcon() { if (warningSquareIcon == null) { final ImageFilter alphaFilter = AlphaImageFilterInstance.ALPHA_FILTER; @@ -231,6 +235,7 @@ } @NotNull + @SuppressWarnings({"NullableProblems"}) public ImageIcon getNoFaceSquareIcon() { if (noFaceSquareIcon == null) { noFaceSquareIcon = guiUtils.getResourceIcon(SQUARE_NO_FACE); @@ -239,6 +244,7 @@ } @NotNull + @SuppressWarnings({"NullableProblems"}) public ImageIcon getNoArchSquareIcon() { if (noArchSquareIcon == null) { noArchSquareIcon = guiUtils.getResourceIcon(SQUARE_NO_ARCH); @@ -247,6 +253,7 @@ } @NotNull + @SuppressWarnings({"NullableProblems"}) public ImageIcon getMapSelectedIcon() { if (mapSelIcon == null) { mapSelIcon = guiUtils.getResourceIcon(SQUARE_SELECTED_SQUARE); @@ -255,6 +262,7 @@ } @NotNull + @SuppressWarnings({"NullableProblems"}) public ImageIcon getMapSelectedIconNorth() { if (mapSelIconNorth == null) { mapSelIconNorth = guiUtils.getResourceIcon(SQUARE_SELECTED_SQUARE_NORTH); @@ -263,6 +271,7 @@ } @NotNull + @SuppressWarnings({"NullableProblems"}) public ImageIcon getMapSelectedIconEast() { if (mapSelIconEast == null) { mapSelIconEast = guiUtils.getResourceIcon(SQUARE_SELECTED_SQUARE_EAST); @@ -271,6 +280,7 @@ } @NotNull + @SuppressWarnings({"NullableProblems"}) public ImageIcon getMapSelectedIconSouth() { if (mapSelIconSouth == null) { mapSelIconSouth = guiUtils.getResourceIcon(SQUARE_SELECTED_SQUARE_SOUTH); @@ -279,6 +289,7 @@ } @NotNull + @SuppressWarnings({"NullableProblems"}) public ImageIcon getMapSelectedIconWest() { if (mapSelIconWest == null) { mapSelIconWest = guiUtils.getResourceIcon(SQUARE_SELECTED_SQUARE_WEST); @@ -287,6 +298,7 @@ } @NotNull + @SuppressWarnings({"NullableProblems"}) public ImageIcon getMapPreSelectedIcon() { if (mapPreSelIcon == null) { mapPreSelIcon = guiUtils.getResourceIcon(SQUARE_PRE_SELECTED_SQUARE); @@ -299,6 +311,7 @@ * @return the image */ @NotNull + @SuppressWarnings({"NullableProblems"}) public Image getDefaultIcon() { if (defaultIcon == null) { final ImageIcon icon = guiUtils.getResourceIcon(DEFAULT_ICON); @@ -313,6 +326,7 @@ * @return the image */ @NotNull + @SuppressWarnings({"NullableProblems"}) public Image getDefaultPreview() { if (defaultPreview == null) { final ImageIcon icon = guiUtils.getResourceIcon(DEFAULT_PREVIEW); @@ -323,6 +337,7 @@ } @NotNull + @SuppressWarnings({"NullableProblems"}) public Icon getTreasureListIcon() { if (treasureListIcon == null) { treasureListIcon = guiUtils.getResourceIcon(TREASURE_LIST); @@ -331,6 +346,7 @@ } @NotNull + @SuppressWarnings({"NullableProblems"}) public Icon getTreasureOneListIcon() { if (treasureOneListIcon == null) { treasureOneListIcon = guiUtils.getResourceIcon(TREASUREONE_LIST); @@ -339,6 +355,7 @@ } @NotNull + @SuppressWarnings({"NullableProblems"}) public Icon getTreasureYesIcon() { if (treasureYesIcon == null) { treasureYesIcon = guiUtils.getResourceIcon(TREASURE_YES); @@ -347,6 +364,7 @@ } @NotNull + @SuppressWarnings({"NullableProblems"}) public Icon getTreasureNoIcon() { if (treasureNoIcon == null) { treasureNoIcon = guiUtils.getResourceIcon(TREASURE_NO); @@ -355,6 +373,7 @@ } @NotNull + @SuppressWarnings({"NullableProblems"}) public ImageIcon getCloseTabSmallIcon() { if (closeTabSmallIcon == null) { closeTabSmallIcon = guiUtils.getResourceIcon(CLOSE_TAB_SMALL_ICON); @@ -363,6 +382,7 @@ } @NotNull + @SuppressWarnings({"NullableProblems"}) public Icon getAutoRunSmallIcon() { if (autoRunSmallIcon == null) { autoRunSmallIcon = guiUtils.getResourceIcon(AUTO_RUN_SMALL_ICON); @@ -371,6 +391,7 @@ } @NotNull + @SuppressWarnings({"NullableProblems"}) public Icon getFilterSmallIcon() { if (filterSmallIcon == null) { filterSmallIcon = guiUtils.getResourceIcon(FILTER_SMALL_ICON); @@ -379,6 +400,7 @@ } @NotNull + @SuppressWarnings({"NullableProblems"}) public Icon getRunPluginSmallIcon() { if (runPluginSmallIcon == null) { runPluginSmallIcon = guiUtils.getResourceIcon(RUN_PLUGIN_SMALL_ICON); @@ -391,6 +413,7 @@ * @return the icon or <code>null</code> if none is available */ @Nullable + @SuppressWarnings({"NullableProblems"}) public ImageIcon getAppIcon() { if (appIcon == null) { appIcon = guiUtils.getResourceIcon(APP_ICON); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-03-09 07:51:43
|
Revision: 8862 http://gridarta.svn.sourceforge.net/gridarta/?rev=8862&view=rev Author: akirschbaum Date: 2011-03-09 07:51:34 +0000 (Wed, 09 Mar 2011) Log Message: ----------- Update project file. Modified Paths: -------------- trunk/gridarta.ipr Modified: trunk/gridarta.ipr =================================================================== --- trunk/gridarta.ipr 2011-03-08 20:21:36 UTC (rev 8861) +++ trunk/gridarta.ipr 2011-03-09 07:51:34 UTC (rev 8862) @@ -27,10 +27,6 @@ <component name="CodeStyleSettingsManager"> <option name="PER_PROJECT_SETTINGS"> <value> - <option name="LINE_COMMENT_AT_FIRST_COLUMN" value="false" /> - <option name="BLOCK_COMMENT_AT_FIRST_COLUMN" value="false" /> - <option name="KEEP_LINE_BREAKS" value="false" /> - <option name="KEEP_FIRST_COLUMN_COMMENT" value="false" /> <option name="JAVA_INDENT_OPTIONS"> <value> <option name="INDENT_SIZE" value="4" /> @@ -40,20 +36,12 @@ <option name="SMART_TABS" value="false" /> <option name="LABEL_INDENT_SIZE" value="0" /> <option name="LABEL_INDENT_ABSOLUTE" value="true" /> + <option name="USE_RELATIVE_INDENTS" value="false" /> </value> </option> - <option name="KEEP_CONTROL_STATEMENT_IN_ONE_LINE" value="false" /> - <option name="INDENT_CASE_FROM_SWITCH" value="false" /> - <option name="ALIGN_MULTILINE_PARAMETERS" value="false" /> - <option name="ALIGN_MULTILINE_FOR" value="false" /> - <option name="BLANK_LINES_BEFORE_PACKAGE" value="1" /> - <option name="BLANK_LINES_AROUND_FIELD" value="1" /> - <option name="BLANK_LINES_AROUND_FIELD_IN_INTERFACE" value="1" /> - <option name="BLANK_LINES_AFTER_CLASS_HEADER" value="1" /> - <option name="SPACE_WITHIN_ARRAY_INITIALIZER_BRACES" value="true" /> - <option name="SPACE_BEFORE_ARRAY_INITIALIZER_LBRACE" value="true" /> <option name="GENERATE_FINAL_LOCALS" value="true" /> <option name="GENERATE_FINAL_PARAMETERS" value="true" /> + <option name="LAYOUT_STATIC_IMPORTS_SEPARATELY" value="false" /> <option name="USE_FQ_CLASS_NAMES_IN_JAVADOC" value="false" /> <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999999" /> <option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999999" /> @@ -64,15 +52,9 @@ <value> <package name="" withSubpackages="true" static="false" /> <emptyLine /> - <package name="" withSubpackages="true" static="true" /> </value> </option> <option name="RIGHT_MARGIN" value="80" /> - <option name="WRAP_COMMENTS" value="true" /> - <option name="IF_BRACE_FORCE" value="3" /> - <option name="DOWHILE_BRACE_FORCE" value="3" /> - <option name="WHILE_BRACE_FORCE" value="3" /> - <option name="FOR_BRACE_FORCE" value="3" /> <option name="JD_ALIGN_PARAM_COMMENTS" value="false" /> <option name="JD_ALIGN_EXCEPTION_COMMENTS" value="false" /> <option name="JD_ADD_BLANK_AFTER_DESCRIPTION" value="false" /> @@ -87,6 +69,26 @@ <option name="HTML_ELEMENTS_TO_INSERT_NEW_LINE_BEFORE" value="body,div,p,form,h1,h2,h3,br,ol,ul,li" /> <option name="HTML_ELEMENTS_TO_REMOVE_NEW_LINE_BEFORE" value="" /> <option name="HTML_INLINE_ELEMENTS" value="a,abbr,acronym,b,basefont,bdo,big,cite,cite,code,dfn,em,font,i,img,input,kbd,label,q,s,samp,select,span,strike,strong,sub,sup,textarea,tt,u,var" /> + <option name="LINE_COMMENT_AT_FIRST_COLUMN" value="false" /> + <option name="BLOCK_COMMENT_AT_FIRST_COLUMN" value="false" /> + <option name="KEEP_LINE_BREAKS" value="false" /> + <option name="KEEP_FIRST_COLUMN_COMMENT" value="false" /> + <option name="KEEP_CONTROL_STATEMENT_IN_ONE_LINE" value="false" /> + <option name="BLANK_LINES_BEFORE_PACKAGE" value="1" /> + <option name="BLANK_LINES_AROUND_FIELD" value="1" /> + <option name="BLANK_LINES_AROUND_FIELD_IN_INTERFACE" value="1" /> + <option name="BLANK_LINES_AFTER_CLASS_HEADER" value="1" /> + <option name="BLANK_LINES_AFTER_ANONYMOUS_CLASS_HEADER" value="1" /> + <option name="INDENT_CASE_FROM_SWITCH" value="false" /> + <option name="ALIGN_MULTILINE_PARAMETERS" value="false" /> + <option name="ALIGN_MULTILINE_FOR" value="false" /> + <option name="SPACE_WITHIN_ARRAY_INITIALIZER_BRACES" value="true" /> + <option name="SPACE_BEFORE_ARRAY_INITIALIZER_LBRACE" value="true" /> + <option name="WRAP_COMMENTS" value="true" /> + <option name="IF_BRACE_FORCE" value="3" /> + <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="groovy"> <option name="INDENT_SIZE" value="2" /> <option name="CONTINUATION_INDENT_SIZE" value="8" /> @@ -95,6 +97,7 @@ <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="gsp"> <option name="INDENT_SIZE" value="2" /> @@ -104,6 +107,7 @@ <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="java"> <option name="INDENT_SIZE" value="4" /> @@ -113,7 +117,58 @@ <option name="SMART_TABS" value="false" /> <option name="LABEL_INDENT_SIZE" value="0" /> <option name="LABEL_INDENT_ABSOLUTE" value="true" /> + <option name="USE_RELATIVE_INDENTS" value="false" /> </ADDITIONAL_INDENT_OPTIONS> + <ADDITIONAL_INDENT_OPTIONS fileType="js"> + <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="jsp"> + <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="php"> + <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="sass"> + <option name="INDENT_SIZE" value="2" /> + <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="sql"> + <option name="INDENT_SIZE" value="2" /> + <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="xml"> <option name="INDENT_SIZE" value="4" /> <option name="CONTINUATION_INDENT_SIZE" value="8" /> @@ -122,7 +177,18 @@ <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="yml"> + <option name="INDENT_SIZE" value="2" /> + <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> </value> </option> <option name="USE_PER_PROJECT_SETTINGS" value="true" /> @@ -182,12 +248,36 @@ </component> <component name="EntryPointsManager"> <entry_points version="2.0" /> + <list size="1"> + <item index="0" class="java.lang.String" itemvalue="net.sf.japi.swing.action.ActionMethod" /> + </list> </component> <component name="ExportToHTMLSettings"> <option name="PRINT_LINE_NUMBERS" value="false" /> <option name="OPEN_IN_BROWSER" value="false" /> <option name="OUTPUT_DIRECTORY" /> </component> + <component name="FacetAutodetectingManager"> + <autodetection-disabled> + <facet-type id="android" /> + <facet-type id="BeanValidation" /> + <facet-type id="ejb" /> + <facet-type id="google-app-engine" /> + <facet-type id="gwt" /> + <facet-type id="hibernate" /> + <facet-type id="javaeeApplication" /> + <facet-type id="jpa" /> + <facet-type id="jsf" /> + <facet-type id="Osmorc" /> + <facet-type id="Seam" /> + <facet-type id="Spring" /> + <facet-type id="struts" /> + <facet-type id="Struts2" /> + <facet-type id="tapestry" /> + <facet-type id="web" /> + <facet-type id="WebBeans" /> + </autodetection-disabled> + </component> <component name="IdProvider" IDEtalkID="334126487A954321E4EE61978AD5E372" /> <component name="InspectionProjectProfileManager"> <profiles> @@ -196,16 +286,33 @@ <option name="myLocal" value="false" /> <inspection_tool class="AbstractClassExtendsConcreteClass" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="AbstractClassNeverImplemented" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="AbstractClassWithoutAbstractMethods" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="AbstractClassWithOnlyOneDirectInheritor" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="AbstractMethodCallInConstructor" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="AbstractMethodOverridesAbstractMethod" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="AbstractMethodOverridesConcreteMethod" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="AbstractMethodWithMissingImplementations" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="AnonymousClassVariableHidesContainingMethodVariable" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="AccessToNonThreadSafeStaticFieldFromInstance" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="nonThreadSafeTypes" value="java.text.DateFormat,java.util.Calendar" /> + </inspection_tool> + <inspection_tool class="AccessToStaticFieldLockedOnInstance" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="AnnotationNamingConvention" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="m_regex" value="[A-Z][A-Za-z\d]*" /> + <option name="m_minLength" value="8" /> + <option name="m_maxLength" value="64" /> + </inspection_tool> + <inspection_tool class="Annotator" enabled="false" level="ERROR" enabled_by_default="false" /> <inspection_tool class="ArchaicSystemPropertyAccess" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="AssertEqualsCalledOnArray" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="AssertEqualsMayBeAssertSame" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="AssignmentToCatchBlockParameter" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="AssignmentToCollectionFieldFromParameter" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="ignorePrivateMethods" value="true" /> + </inspection_tool> + <inspection_tool class="AssignmentToDateFieldFromParameter" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="ignorePrivateMethods" value="true" /> + </inspection_tool> <inspection_tool class="AssignmentToForLoopParameter" enabled="true" level="WARNING" enabled_by_default="true"> - <option name="m_checkForeachParameters" value="false" /> + <option name="m_checkForeachParameters" value="true" /> </inspection_tool> <inspection_tool class="AssignmentToMethodParameter" enabled="true" level="WARNING" enabled_by_default="true"> <option name="ignoreTransformationOfOriginalParameter" value="false" /> @@ -213,21 +320,16 @@ <inspection_tool class="AssignmentToNull" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="AssignmentToStaticFieldFromInstanceMethod" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="AssignmentUsedAsCondition" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="BadExceptionCaught" enabled="true" level="WARNING" enabled_by_default="true"> - <option name="exceptionsString" value="java.lang.NullPointerException,java.lang.IllegalMonitorStateException,java.lang.ArrayIndexOutOfBoundsException" /> - </inspection_tool> - <inspection_tool class="BadExceptionDeclared" enabled="true" level="WARNING" enabled_by_default="true"> - <option name="exceptionsString" value="java.lang.Throwable,java.lang.Exception,java.lang.Error,java.lang.RuntimeException,java.lang.NullPointerException,java.lang.ClassCastException,java.lang.ArrayIndexOutOfBoundsException" /> - <option name="ignoreTestCases" value="true" /> - </inspection_tool> - <inspection_tool class="BadExceptionThrown" enabled="true" level="WARNING" enabled_by_default="true"> - <option name="exceptionsString" value="java.lang.Throwable,java.lang.Exception,java.lang.Error,java.lang.RuntimeException,java.lang.NullPointerException,java.lang.ClassCastException,java.lang.ArrayIndexOutOfBoundsException" /> - </inspection_tool> - <inspection_tool class="BadOddness" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="AwaitNotInLoop" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="AwaitWithoutCorrespondingSignal" enabled="true" level="WARNING" enabled_by_default="true" /> + <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="BooleanMethodIsAlwaysInverted" enabled="false" level="WARNING" enabled_by_default="false" /> + <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" /> + <inspection_tool class="CallToNativeMethodWhileLocked" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="CallToSimpleGetterInClass" enabled="true" level="WARNING" enabled_by_default="true"> <option name="ignoreGetterCallsOnOtherObjects" value="false" /> </inspection_tool> @@ -239,78 +341,141 @@ <inspection_tool class="CastToIncompatibleInterface" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="CatchGenericClass" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="ChainedEquality" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="ChannelResource" 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="CheckImageSize" enabled="false" level="WARNING" enabled_by_default="false" /> - <inspection_tool class="CheckValidXmlInScriptTagBody" enabled="false" level="ERROR" enabled_by_default="false" /> - <inspection_tool class="ClassEscapesItsScope" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="ClassInTopLevelPackage" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="ClassNameDiffersFromFileName" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="CloneCallsSuperClone" enabled="false" level="WARNING" enabled_by_default="false" /> + <inspection_tool class="ChannelResource" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="insideTryAllowed" value="false" /> + </inspection_tool> + <inspection_tool class="CharUsedInArithmeticContext" enabled="true" level="WARNING" enabled_by_default="true" /> + <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" /> + <option name="m_maxLength" value="64" /> + </inspection_tool> + <inspection_tool class="ClassReferencesSubclass" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="CloneCallsConstructors" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="CloneDeclaresCloneNotSupported" enabled="false" level="WARNING" enabled_by_default="false" /> + <inspection_tool class="CloneInNonCloneableClass" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="CloneableImplementsClone" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="m_ignoreCloneableDueToInheritance" value="false" /> + </inspection_tool> <inspection_tool class="CollectionAddedToSelf" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="CollectionContainsUrl" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="CollectionsFieldAccessReplaceableByMethodCall" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="ComparableImplementedButEqualsNotOverridden" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="ComparatorNotSerializable" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="CompareToUsesNonFinalVariable" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="ComparisonOfShortAndChar" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="ComparisonToNaN" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="ConditionalExpressionWithIdenticalBranches" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="ConfusingElse" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="ConditionSignal" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="ConfusingFloatingPointLiteral" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="ConfusingOctalEscape" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="ConstantConditionalExpression" enabled="false" level="WARNING" enabled_by_default="false" /> - <inspection_tool class="ConstantIfStatement" enabled="false" level="WARNING" enabled_by_default="false" /> + <inspection_tool class="ConnectionResource" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="ConstantAssertCondition" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="ConstantConditions" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="SUGGEST_NULLABLE_ANNOTATIONS" value="true" /> + <option name="DONT_REPORT_TRUE_ASSERT_STATEMENTS" value="true" /> + </inspection_tool> + <inspection_tool class="ConstantJUnitAssertArgument" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="ConstantMathCall" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="ConstantNamingConvention" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="onlyCheckImmutables" value="true" /> + <option name="m_regex" value="[A-Z_\d]*" /> + <option name="m_minLength" value="3" /> + <option name="m_maxLength" value="64" /> + </inspection_tool> + <inspection_tool class="ConstantValueVariableUse" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="ControlFlowStatementWithoutBraces" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="CovariantCompareTo" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="CovariantEquals" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="CssInvalidElementInspection" enabled="false" level="ERROR" enabled_by_default="false" /> + <inspection_tool class="CssInvalidHtmlTagReferenceInspection" enabled="false" level="WARNING" enabled_by_default="false" /> + <inspection_tool class="CssInvalidImportInspection" enabled="false" level="WARNING" enabled_by_default="false" /> + <inspection_tool class="CssInvalidShorthandPropertyValue" enabled="false" level="ERROR" enabled_by_default="false" /> + <inspection_tool class="CssNegativeValueInspection" enabled="false" level="ERROR" enabled_by_default="false" /> <inspection_tool class="CssNoGenericFontName" enabled="false" level="WARNING" enabled_by_default="false" /> + <inspection_tool class="CssOptimizeSimilarPropertiesInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" /> <inspection_tool class="CssOverwrittenProperties" enabled="false" level="WARNING" enabled_by_default="false" /> + <inspection_tool class="CssRgbFunctionInspection" enabled="false" level="ERROR" enabled_by_default="false" /> <inspection_tool class="CssUnitlessNumber" enabled="false" level="WARNING" enabled_by_default="false" /> - <inspection_tool class="DefaultFileTemplate" enabled="false" level="WARNING" enabled_by_default="false"> - <option name="CHECK_FILE_HEADER" value="true" /> - <option name="CHECK_TRY_CATCH_SECTION" value="true" /> - <option name="CHECK_METHOD_BODY" value="true" /> + <inspection_tool class="CssUnknownProperty" enabled="false" level="WARNING" enabled_by_default="false"> + <option name="myCustomPropertiesEnabled" value="false" /> + <option name="myIgnoreVendorSpecificProperties" value="false" /> + <option name="myCustomPropertiesList"> + <value> + <list size="0" /> + </value> + </option> </inspection_tool> + <inspection_tool class="CssUnusedSymbolInspection" enabled="false" level="WARNING" enabled_by_default="false" /> + <inspection_tool class="CyclicClassDependency" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="CyclicPackageDependency" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="DivideByZero" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="DollarSignInName" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="DoubleCheckedLocking" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="ignoreOnVolatileVariables" value="false" /> + </inspection_tool> + <inspection_tool class="DoubleLiteralMayBeFloatLiteral" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="DoubleNegation" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="DuplicateBooleanBranch" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="DuplicateCondition" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="ignoreMethodCalls" value="false" /> + </inspection_tool> + <inspection_tool class="DynamicRegexReplaceableByCompiledPattern" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="EmptyClass" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="EmptyInitializer" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="EmptySynchronizedStatement" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="EnumSwitchStatementWhichMissesCases" enabled="true" level="WARNING" enabled_by_default="true"> - <option name="ignoreSwitchStatementsWithDefault" value="false" /> + <option name="ignoreSwitchStatementsWithDefault" value="true" /> </inspection_tool> + <inspection_tool class="EnumeratedClassNamingConvention" 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" /> + <option name="m_maxLength" value="64" /> + </inspection_tool> + <inspection_tool class="EnumeratedConstantNamingConvention" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="m_regex" value="[A-Z][A-Z_\d]*" /> + <option name="m_minLength" value="3" /> + <option name="m_maxLength" value="32" /> + </inspection_tool> <inspection_tool class="EqualsAndHashcode" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="EqualsCalledOnEnumConstant" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="EqualsHashCodeCalledOnUrl" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="EqualsUsesNonFinalVariable" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="ErrorRethrown" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="ExceptionFromCatchWhichDoesntWrap" enabled="true" level="WARNING" enabled_by_default="true"> <option name="ignoreGetMessage" value="false" /> </inspection_tool> + <inspection_tool class="ExceptionNameDoesntEndWithException" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="ExpectedExceptionNeverThrown" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="ExtendsConcreteCollection" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="ExtendsThread" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="ExtendsUtilityClass" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="FieldHidesSuperclassField" enabled="true" level="WARNING" enabled_by_default="true"> - <option name="m_ignoreInvisibleFields" value="true" /> + <inspection_tool class="FieldAccessedSynchronizedAndUnsynchronized" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="countGettersAndSetters" value="true" /> </inspection_tool> + <inspection_tool class="FieldMayBeFinal" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="FieldMayBeStatic" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="FinalMethodInFinalClass" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="FinalClass" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="Finalize" enabled="true" level="WARNING" enabled_by_default="true"> - <option name="ignoreTrivialFinalizers" value="true" /> + <option name="ignoreTrivialFinalizers" value="false" /> </inspection_tool> + <inspection_tool class="FinalizeCallsSuperFinalize" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="ignoreObjectSubclasses" value="false" /> + <option name="ignoreTrivialFinalizers" value="false" /> + </inspection_tool> <inspection_tool class="FinalizeNotProtected" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="FloatingPointEquality" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="ForLoopReplaceableByWhile" enabled="true" level="WARNING" enabled_by_default="true"> - <option name="m_ignoreLoopsWithoutConditions" value="true" /> + <option name="m_ignoreLoopsWithoutConditions" value="false" /> </inspection_tool> <inspection_tool class="ForLoopThatDoesntUseLoopVariable" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="HashCodeUsesNonFinalVariable" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="IOResource" enabled="true" level="WARNING" enabled_by_default="true"> <option name="ignoredTypesString" value="java.io.ByteArrayOutputStream,java.io.ByteArrayInputStream,java.io.StringBufferInputStream,java.io.CharArrayWriter,java.io.CharArrayReader,java.io.StringWriter,java.io.StringReader" /> + <option name="insideTryAllowed" value="false" /> </inspection_tool> <inspection_tool class="IfStatementWithIdenticalBranches" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="ImplicitNumericConversion" enabled="true" level="WARNING" enabled_by_default="true"> <option name="ignoreWideningConversions" value="true" /> - <option name="ignoreCharConversions" value="false" /> + <option name="ignoreCharConversions" value="true" /> <option name="ignoreConstantConversions" value="false" /> </inspection_tool> <inspection_tool class="InconsistentResourceBundle" enabled="false" level="ERROR" enabled_by_default="false"> @@ -319,29 +484,59 @@ <option name="REPORT_DUPLICATED_PROPERTIES" value="true" /> </inspection_tool> <inspection_tool class="IndexOfReplaceableByContains" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="InfiniteLoopStatement" enabled="false" level="WARNING" enabled_by_default="false" /> + <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="InnerClassVariableHidesOuterClassVariable" enabled="true" level="WARNING" enabled_by_default="true"> - <option name="m_ignoreInvisibleFields" value="true" /> + <inspection_tool class="InnerClassOnInterface" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="m_ignoreInnerInterfaces" value="false" /> </inspection_tool> + <inspection_tool class="InstanceMethodNamingConvention" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="m_regex" value="[a-z][A-Za-z\d]*" /> + <option name="m_minLength" value="2" /> + <option name="m_maxLength" value="64" /> + </inspection_tool> <inspection_tool class="InstanceVariableInitialization" enabled="true" level="WARNING" enabled_by_default="true"> <option name="m_ignorePrimitives" value="false" /> </inspection_tool> + <inspection_tool class="InstanceVariableNamingConvention" 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" /> + <option name="m_maxLength" value="32" /> + </inspection_tool> <inspection_tool class="InstanceVariableUninitializedUse" enabled="true" level="WARNING" enabled_by_default="true"> <option name="m_ignorePrimitives" value="false" /> + <option name="annotationNamesString" value="" /> </inspection_tool> <inspection_tool class="InstanceofCatchParameter" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="InstanceofChain" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="InstanceofChain" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="ignoreInstanceofOnLibraryClasses" value="false" /> + </inspection_tool> <inspection_tool class="InstanceofIncompatibleInterface" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="InstanceofThis" enabled="true" level="WARNING" enabled_by_default="true" /> <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="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" /> + <option name="m_maxLength" value="64" /> + </inspection_tool> <inspection_tool class="InterfaceNeverImplemented" enabled="true" level="WARNING" enabled_by_default="true"> <option name="ignoreInterfacesThatOnlyDeclareConstants" value="false" /> </inspection_tool> <inspection_tool class="IteratorHasNextCallsIteratorNext" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="IteratorNextDoesNotThrowNoSuchElementException" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="JUnit4AnnotatedMethodInJUnit3TestCase" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="JUnitAbstractTestClassNamingConvention" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="m_regex" value="[A-Z][A-Za-z\d]*TestCase" /> + <option name="m_minLength" value="12" /> + <option name="m_maxLength" value="64" /> + </inspection_tool> + <inspection_tool class="JUnitTestClassNamingConvention" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="m_regex" value="[A-Z][A-Za-z\d]*Test" /> + <option name="m_minLength" value="8" /> + <option name="m_maxLength" value="64" /> + </inspection_tool> <inspection_tool class="JavaDoc" enabled="true" level="WARNING" enabled_by_default="true"> <option name="TOP_LEVEL_CLASS_OPTIONS"> <value> @@ -370,61 +565,84 @@ <option name="IGNORE_DEPRECATED" value="true" /> <option name="IGNORE_JAVADOC_PERIOD" value="false" /> <option name="IGNORE_DUPLICATED_THROWS" value="false" /> + <option name="IGNORE_POINT_TO_ITSELF" value="false" /> <option name="myAdditionalJavadocTags" value="default fixme invariant note pre retval todo val warning" /> </inspection_tool> <inspection_tool class="JavaLangImport" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="KeySetIterationMayUseEntrySet" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="LanguageMismatch" enabled="false" level="WARNING" enabled_by_default="false"> + <option name="CHECK_NON_ANNOTATED_REFERENCES" value="true" /> + </inspection_tool> <inspection_tool class="LengthOneStringInIndexOf" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="ListIndexOfReplaceableByContains" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="LocalCanBeFinal" enabled="true" level="WARNING" enabled_by_default="true"> <option name="REPORT_VARIABLES" value="true" /> <option name="REPORT_PARAMETERS" value="true" /> </inspection_tool> - <inspection_tool class="LocalVariableHidingMemberVariable" enabled="true" level="WARNING" enabled_by_default="true"> - <option name="m_ignoreInvisibleFields" value="true" /> - <option name="m_ignoreStaticMethods" value="true" /> + <inspection_tool class="LocalVariableNamingConvention" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="m_ignoreForLoopParameters" value="false" /> + <option name="m_ignoreCatchParameters" value="false" /> + <option name="m_regex" value="[a-z][A-Za-z\d]*" /> + <option name="m_minLength" value="1" /> + <option name="m_maxLength" value="64" /> </inspection_tool> <inspection_tool class="LongLiteralsEndingWithLowercaseL" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="LoopStatementsThatDontLoop" enabled="false" level="WARNING" enabled_by_default="false" /> + <inspection_tool class="LoopConditionNotUpdatedInsideLoop" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="ignoreIterators" value="false" /> + </inspection_tool> <inspection_tool class="MapReplaceableByEnumMap" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="MarkerInterface" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="MethodMayBeStatic" enabled="true" level="WARNING" enabled_by_default="true"> <option name="m_onlyPrivateOrFinal" value="false" /> - <option name="m_ignoreEmptyMethods" value="true" /> + <option name="m_ignoreEmptyMethods" value="false" /> </inspection_tool> - <inspection_tool class="MethodOverloadsParentMethod" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="MethodOverridesPackageLocalMethod" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="MethodOverridesPrivateMethod" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="MethodOverridesStaticMethod" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="MethodNameSameAsParentName" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="MisorderedAssertEqualsParameters" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="MissingDeprecatedAnnotation" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="MissingOverrideAnnotation" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="MissingOverrideAnnotation" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="ignoreObjectMethods" value="false" /> + </inspection_tool> <inspection_tool class="MissortedModifiers" enabled="true" level="WARNING" enabled_by_default="true"> <option name="m_requireAnnotationsFirst" value="true" /> </inspection_tool> <inspection_tool class="MisspelledCompareTo" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="MisspelledEquals" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="MisspelledHashcode" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="MisspelledSetUp" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="MisspelledTearDown" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="MisspelledToString" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="MultipleDeclaration" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="MultipleDeclaration" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="ignoreForLoopDeclarations" value="true" /> + </inspection_tool> <inspection_tool class="MultipleTopLevelClassesInFile" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="MultipleTypedDeclaration" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="NakedNotify" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="NestedAssignment" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="NonAtomicOperationOnVolatileField" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="NonFinalFieldOfException" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="NonFinalStaticVariableUsedInClassInitialization" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="NonProtectedConstructorInAbstractClass" enabled="true" level="WARNING" enabled_by_default="true"> <option name="m_ignoreNonPublicClasses" value="false" /> </inspection_tool> <inspection_tool class="NonReproducibleMathCall" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="NonSerializableFieldInSerializableClass" enabled="true" level="WARNING" enabled_by_default="true"> - <option name="superClassString" value="java.awt.Component" /> - </inspection_tool> - <inspection_tool class="NonSerializableObjectPassedToObjectStream" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="NonSerializableWithSerialVersionUIDField" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="NonShortCircuitBoolean" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="NonSynchronizedMethodOverridesSynchronizedMethod" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="NonThreadSafeLazyInitialization" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="NoopMethodInAbstractClass" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="NotifyCalledOnCondition" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="NotifyNotInSynchronizedContext" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="NotifyWithoutCorrespondingWait" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="ObjectNotify" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="ObjectToString" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="ObsoleteCollection" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="ignoreRequiredObsoleteCollectionTypes" value="true" /> + </inspection_tool> <inspection_tool class="OctalAndDecimalIntegersMixed" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="OnDemandImport" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="OverloadedVarargsMethod" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="OverlyStrongTypeCast" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="ignoreInMatchingInstanceof" value="true" /> + </inspection_tool> <inspection_tool class="OverridableMethodCallDuringObjectConstruction" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="OverriddenMethodCallDuringObjectConstruction" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="PackageVisibleField" enabled="true" level="WARNING" enabled_by_default="true" /> @@ -435,6 +653,16 @@ <option name="m_ignoreSingleCharacterNames" value="false" /> <option name="m_ignoreOverridesOfLibraryMethods" value="false" /> </inspection_tool> + <inspection_tool class="ParameterNamingConvention" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="m_regex" value="[a-z][A-Za-z\d]*" /> + <option name="m_minLength" value="1" /> + <option name="m_maxLength" value="64" /> + </inspection_tool> + <inspection_tool class="PatternNotApplicable" enabled="false" level="ERROR" enabled_by_default="false" /> + <inspection_tool class="PatternOverriddenByNonAnnotatedMethod" enabled="false" level="WARNING" enabled_by_default="false" /> + <inspection_tool class="PatternValidation" enabled="false" level="WARNING" enabled_by_default="false"> + <option name="CHECK_NON_CONSTANT_VALUES" value="true" /> + </inspection_tool> <inspection_tool class="PointlessBitwiseExpression" enabled="false" level="WARNING" enabled_by_default="false"> <option name="m_ignoreExpressionsContainingConstants" value="false" /> </inspection_tool> @@ -443,11 +671,11 @@ <inspection_tool class="ProtectedInnerClass" enabled="true" level="WARNING" enabled_by_default="true"> <option name="ignoreEnums" value="false" /> </inspection_tool> - <inspection_tool class="ProtectedMemberInFinalClass" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="PublicConstructorInNonPublicClass" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="PublicField" enabled="true" level="WARNING" enabled_by_default="true"> <option name="ignoreEnums" value="false" /> </inspection_tool> + <inspection_tool class="PublicFieldAccessedInSynchronizedContext" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="PublicInnerClass" enabled="true" level="WARNING" enabled_by_default="true"> <option name="ignoreEnums" value="false" /> </inspection_tool> @@ -462,6 +690,7 @@ </inspection_tool> <inspection_tool class="RedundantImport" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="RedundantMethodOverride" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="RedundantStringFormatCall" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="RedundantSuppression" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="RedundantThrowsDeclaration" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="RefusedBequest" enabled="true" level="WARNING" enabled_by_default="true"> @@ -469,68 +698,117 @@ </inspection_tool> <inspection_tool class="ReplaceAllDot" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="ReplaceAssignmentWithOperatorAssignment" enabled="true" level="WARNING" enabled_by_default="true"> - <option name="ignoreLazyOperators" value="true" /> + <option name="ignoreLazyOperators" value="false" /> <option name="ignoreObscureOperators" value="false" /> </inspection_tool> - <inspection_tool class="RequiredAttributes" enabled="false" level="WARNING" enabled_by_default="false"> - <option name="myAdditionalRequiredHtmlAttributes" value="" /> + <inspection_tool class="ReturnOfCollectionField" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="ignorePrivateMethods" value="true" /> </inspection_tool> - <inspection_tool class="ResultOfObjectAllocationIgnored" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="ResultSetIndexZero" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="ReturnNull" enabled="true" level="WARNING" enabled_by_default="true"> - <option name="m_reportObjectMethods" value="true" /> - <option name="m_reportArrayMethods" value="true" /> - <option name="m_reportCollectionMethods" 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" /> - <inspection_tool class="SerialPersistentFieldsWithWrongSignature" 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="superClassString" value="java.awt.Component" /> </inspection_tool> - <inspection_tool class="SerializableInnerClassHasSerialVersionUIDField" enabled="true" level="WARNING" enabled_by_default="true"> + <inspection_tool class="SerializableInnerClassHasSerialVersionUIDField" enabled="false" level="WARNING" enabled_by_default="false"> <option name="superClassString" value="" /> </inspection_tool> <inspection_tool class="SetReplaceableByEnumSet" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="SimplifiableConditionalExpression" enabled="false" level="WARNING" enabled_by_default="false" /> - <inspection_tool class="SimplifiableIfStatement" enabled="false" level="WARNING" enabled_by_default="false" /> + <inspection_tool class="SetupCallsSuperSetup" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="SetupIsPublicVoidNoArg" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="SignalWithoutCorrespondingAwait" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="SimplifiableAnnotation" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="SimplifiableJUnitAssertion" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="Singleton" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="SizeReplaceableByIsEmpty" enabled="true" level="WARNING" enabled_by_default="true"> <option name="ignoreNegations" value="false" /> </inspection_tool> - <inspection_tool class="SocketResource" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="SleepWhileHoldingLock" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="SocketResource" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="insideTryAllowed" value="false" /> + </inspection_tool> <inspection_tool class="SpellCheckingInspection" enabled="true" level="INFO" enabled_by_default="true"> <option name="processCode" value="true" /> <option name="processLiterals" value="true" /> <option name="processComments" value="true" /> </inspection_tool> <inspection_tool class="StaticCallOnSubclass" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="StaticCollection" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="m_ignoreWeakCollections" value="true" /> + </inspection_tool> <inspection_tool class="StaticFieldReferenceOnSubclass" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="StaticImport" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="StaticImport" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="ignoreSingleFieldImports" value="false" /> + <option name="ignoreSingeMethodImports" value="false" /> + </inspection_tool> <inspection_tool class="StaticInheritance" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="StaticMethodNamingConvention" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="m_regex" value="[a-z][A-Za-z\d]*" /> + <option name="m_minLength" value="4" /> + <option name="m_maxLength" value="64" /> + </inspection_tool> + <inspection_tool class="StaticSuite" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="StaticVariableInitialization" enabled="true" level="WARNING" enabled_by_default="true"> <option name="m_ignorePrimitives" value="false" /> </inspection_tool> + <inspection_tool class="StaticVariableNamingConvention" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="checkMutableFinals" value="false" /> + <option name="m_regex" value="[a-z][A-Za-z\d]*" /> + <option name="m_minLength" value="3" /> + <option name="m_maxLength" value="32" /> + </inspection_tool> <inspection_tool class="StaticVariableUninitializedUse" enabled="true" level="WARNING" enabled_by_default="true"> <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="StringBufferToStringInConcatenation" 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> <inspection_tool class="StringEqualsEmptyString" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="StringReplaceableByStringBuffer" enabled="true" level="WARNING" enabled_by_default="true"> - <option name="onlyWarnOnLoop" value="true" /> + <option name="onlyWarnOnLoop" value="false" /> </inspection_tool> <inspection_tool class="SubstringZero" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="SubtractionInCompareTo" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="SuspiciousIndentAfterControlStatement" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="SwitchStatementWithConfusingDeclaration" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="SynchronizeOnNonFinalField" enabled="false" level="WARNING" enabled_by_default="false" /> + <inspection_tool class="SynchronizationOnStaticField" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="SynchronizeOnLock" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="SynchronizeOnThis" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="SynchronizedMethod" enabled="true" level="WARNING" enabled_by_default="true"> + <option name="m_includeNativeMethods" value="true" /> + </inspection_tool> + <inspection_tool class="SynchronizedOnLiteralObject" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="SystemGC" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="SystemRunFinalizersOnExit" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="TailRecursion" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="TeardownCallsSuperTeardown" enabled="true" level="WARNIN... [truncated message content] |
From: <aki...@us...> - 2011-03-08 20:21:43
|
Revision: 8861 http://gridarta.svn.sourceforge.net/gridarta/?rev=8861&view=rev Author: akirschbaum Date: 2011-03-08 20:21:36 +0000 (Tue, 08 Mar 2011) Log Message: ----------- Remove unneeded type casts and implicit type conversions. Modified Paths: -------------- trunk/model/src/app/net/sf/gridarta/model/face/DefaultFaceObjects.java trunk/model/src/app/net/sf/gridarta/model/index/MapsIndexer.java trunk/model/src/test/net/sf/gridarta/model/index/MapsIndexTest.java Modified: trunk/model/src/app/net/sf/gridarta/model/face/DefaultFaceObjects.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/face/DefaultFaceObjects.java 2011-03-08 19:41:37 UTC (rev 8860) +++ trunk/model/src/app/net/sf/gridarta/model/face/DefaultFaceObjects.java 2011-03-08 20:21:36 UTC (rev 8861) @@ -265,7 +265,7 @@ throw new IOException("expecting 'IMAGE' at position " + offset); } offset += 6; // skip "IMAGE "; - while (data[offset++] != (byte) 0x20) { + while (data[offset++] != 0x20) { // skip seqNr ' ' } int size = 0; Modified: trunk/model/src/app/net/sf/gridarta/model/index/MapsIndexer.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/index/MapsIndexer.java 2011-03-08 19:41:37 UTC (rev 8860) +++ trunk/model/src/app/net/sf/gridarta/model/index/MapsIndexer.java 2011-03-08 20:21:36 UTC (rev 8861) @@ -350,7 +350,7 @@ public void waitForIdle() throws InterruptedException { synchronized (syncState) { while (state != State.IDLE) { - syncState.wait(1000); + syncState.wait(1000L); } } } Modified: trunk/model/src/test/net/sf/gridarta/model/index/MapsIndexTest.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/index/MapsIndexTest.java 2011-03-08 19:41:37 UTC (rev 8860) +++ trunk/model/src/test/net/sf/gridarta/model/index/MapsIndexTest.java 2011-03-08 20:21:36 UTC (rev 8861) @@ -40,24 +40,24 @@ @Test public void test1() { final Index<File> index = new MapsIndex(); - index.add(new File("a"), 1); - index.add(new File("b"), 1); - index.add(new File("c"), 1); + index.add(new File("a"), 1L); + index.add(new File("b"), 1L); + index.add(new File("c"), 1L); Assert.assertEquals("a,b,c", getPending(index)); Assert.assertEquals("", getPending(index)); - index.add(new File("d"), 1); + index.add(new File("d"), 1L); Assert.assertEquals("d", getPending(index)); - index.add(new File("b"), 1); - index.add(new File("d"), 1); + index.add(new File("b"), 1L); + index.add(new File("d"), 1L); Assert.assertEquals("", getPending(index)); - index.add(new File("b"), 2); - index.add(new File("d"), 2); + index.add(new File("b"), 2L); + index.add(new File("d"), 2L); Assert.assertEquals("b,d", getPending(index)); index.setPending(new File("a")); Assert.assertEquals("a", getPending(index)); index.setPending(new File("a")); - index.add(new File("b"), 3); - index.add(new File("c"), 3); + index.add(new File("b"), 3L); + index.add(new File("c"), 3L); index.remove(new File("b")); Assert.assertEquals("a,c", getPending(index)); } @@ -69,13 +69,13 @@ public void testFind1() { final Index<File> index = new MapsIndex(); Assert.assertEquals("", findPartialName(index, "a")); - index.add(new File("abc"), 1); - index.setName(new File("abc"), 1, "abC"); + index.add(new File("abc"), 1L); + index.setName(new File("abc"), 1L, "abC"); Assert.assertEquals("abc", findPartialName(index, "a")); Assert.assertEquals("abc", findPartialName(index, "b")); Assert.assertEquals("", findPartialName(index, "x")); - index.add(new File("bcd"), 1); - index.setName(new File("bcd"), 1, "BcD"); + index.add(new File("bcd"), 1L); + index.setName(new File("bcd"), 1L, "BcD"); Assert.assertEquals("abc", findPartialName(index, "a")); Assert.assertEquals("abc,bcd", findPartialName(index, "b")); Assert.assertEquals("abc,bcd", findPartialName(index, "Bc")); @@ -89,20 +89,20 @@ @Test public void testTransaction() { final Index<File> index = new MapsIndex(); - index.add(new File("a"), 1); - index.add(new File("b"), 1); - index.add(new File("c"), 1); - index.setName(new File("a"), 2, "a"); - index.setName(new File("b"), 2, "a"); - index.setName(new File("c"), 2, "a"); + index.add(new File("a"), 1L); + index.add(new File("b"), 1L); + index.add(new File("c"), 1L); + index.setName(new File("a"), 2L, "a"); + index.setName(new File("b"), 2L, "a"); + index.setName(new File("c"), 2L, "a"); index.beginUpdate(); - index.add(new File("b"), 1); - index.add(new File("c"), 2); - index.add(new File("d"), 2); + index.add(new File("b"), 1L); + index.add(new File("c"), 2L); + index.add(new File("d"), 2L); index.endUpdate(); - index.setName(new File("b"), 2, "a"); - index.setName(new File("c"), 2, "a"); - index.setName(new File("d"), 2, "a"); + index.setName(new File("b"), 2L, "a"); + index.setName(new File("c"), 2L, "a"); + index.setName(new File("d"), 2L, "a"); Assert.assertEquals("b,c,d", findPartialName(index, "a")); } @@ -115,25 +115,25 @@ final Listener listener = new Listener(); index.addIndexListener(listener); - index.add(new File("a"), 1); + index.add(new File("a"), 1L); Assert.assertEquals("add a\n" + "pending changed\n", listener.getAndClearEvents()); - index.add(new File("a"), 1); + index.add(new File("a"), 1L); Assert.assertEquals("", listener.getAndClearEvents()); - index.add(new File("a"), 2); + index.add(new File("a"), 2L); Assert.assertEquals("", listener.getAndClearEvents()); - index.add(new File("b"), 2); - index.add(new File("c"), 2); + index.add(new File("b"), 2L); + index.add(new File("c"), 2L); Assert.assertEquals("add b\n" + "add c\n", listener.getAndClearEvents()); index.remove(new File("b")); Assert.assertEquals("del b\n" + "name changed\n", listener.getAndClearEvents()); - index.setName(new File("a"), 2, "name1"); - index.setName(new File("b"), 2, "name2"); - index.setName(new File("c"), 2, "name3"); + index.setName(new File("a"), 2L, "name1"); + index.setName(new File("b"), 2L, "name2"); + index.setName(new File("c"), 2L, "name3"); Assert.assertEquals("name changed\n" + "name changed\n" + "name changed\n", listener.getAndClearEvents()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |