You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(103) |
Jun
(121) |
Jul
(16) |
Aug
(67) |
Sep
(126) |
Oct
(161) |
Nov
(164) |
Dec
(588) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(394) |
Feb
(181) |
Mar
(131) |
Apr
(180) |
May
(255) |
Jun
(11) |
Jul
(79) |
Aug
(70) |
Sep
(274) |
Oct
(138) |
Nov
(195) |
Dec
(8) |
2008 |
Jan
(3) |
Feb
(142) |
Mar
(162) |
Apr
(124) |
May
(148) |
Jun
(157) |
Jul
(425) |
Aug
(373) |
Sep
(264) |
Oct
(315) |
Nov
(225) |
Dec
(6) |
2009 |
Jan
(67) |
Feb
(78) |
Mar
(279) |
Apr
(294) |
May
(92) |
Jun
(65) |
Jul
(134) |
Aug
(41) |
Sep
(138) |
Oct
(125) |
Nov
(126) |
Dec
(122) |
2010 |
Jan
(15) |
Feb
(48) |
Mar
(9) |
Apr
(195) |
May
(373) |
Jun
(507) |
Jul
(42) |
Aug
(16) |
Sep
(38) |
Oct
(81) |
Nov
(64) |
Dec
(18) |
2011 |
Jan
(13) |
Feb
(12) |
Mar
(39) |
Apr
(1) |
May
(2) |
Jun
(27) |
Jul
(27) |
Aug
(31) |
Sep
(14) |
Oct
(102) |
Nov
(20) |
Dec
(37) |
2012 |
Jan
(22) |
Feb
(1) |
Mar
(1) |
Apr
(2) |
May
(2) |
Jun
(18) |
Jul
(6) |
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
(47) |
Jun
(7) |
Jul
(107) |
Aug
|
Sep
|
Oct
(112) |
Nov
(31) |
Dec
(17) |
2014 |
Jan
(29) |
Feb
(111) |
Mar
(34) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(18) |
Dec
(10) |
From: <aki...@us...> - 2010-06-26 07:20:53
|
Revision: 8485 http://gridarta.svn.sourceforge.net/gridarta/?rev=8485&view=rev Author: akirschbaum Date: 2010-06-26 07:20:47 +0000 (Sat, 26 Jun 2010) Log Message: ----------- Rename variable name. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java Modified: trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java 2010-06-26 07:19:45 UTC (rev 8484) +++ trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java 2010-06-26 07:20:47 UTC (rev 8485) @@ -520,7 +520,7 @@ } try { return pickmapChooserModel.get(selectedIndex); - } catch (final IndexOutOfBoundsException ex) { + } catch (final IndexOutOfBoundsException ignored) { return null; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-26 07:19:51
|
Revision: 8484 http://gridarta.svn.sourceforge.net/gridarta/?rev=8484&view=rev Author: akirschbaum Date: 2010-06-26 07:19:45 +0000 (Sat, 26 Jun 2010) Log Message: ----------- Add comments. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/script/ScriptExecutor.java Modified: trunk/src/app/net/sf/gridarta/script/ScriptExecutor.java =================================================================== --- trunk/src/app/net/sf/gridarta/script/ScriptExecutor.java 2010-06-26 07:18:41 UTC (rev 8483) +++ trunk/src/app/net/sf/gridarta/script/ScriptExecutor.java 2010-06-26 07:19:45 UTC (rev 8484) @@ -36,19 +36,27 @@ import org.jetbrains.annotations.NotNull; /** - * Allows execution of {@link Script}s. + * Allows execution of {@link Script Scripts}. * @author Andreas Kirschbaum */ public class ScriptExecutor<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> { + /** + * The {@link ScriptModel} to execute. + */ @NotNull private final ScriptModel<G, A, R> scriptModel; + /** + * The parameters to pass to the script. + */ @NotNull private final ScriptParameters scriptParameters; /** * Creates a new instance. + * @param scriptModel the script model to execute + * @param scriptParameters the parameters to pass to the script */ public ScriptExecutor(@NotNull final ScriptModel<G, A, R> scriptModel, @NotNull final ScriptParameters scriptParameters) { this.scriptModel = scriptModel; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-26 07:18:47
|
Revision: 8483 http://gridarta.svn.sourceforge.net/gridarta/?rev=8483&view=rev Author: akirschbaum Date: 2010-06-26 07:18:41 +0000 (Sat, 26 Jun 2010) Log Message: ----------- Do not ignore caught exceptions. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/script/ScriptExecException.java trunk/src/app/net/sf/gridarta/script/ScriptExecutor.java Modified: trunk/src/app/net/sf/gridarta/script/ScriptExecException.java =================================================================== --- trunk/src/app/net/sf/gridarta/script/ScriptExecException.java 2010-06-26 07:10:47 UTC (rev 8482) +++ trunk/src/app/net/sf/gridarta/script/ScriptExecException.java 2010-06-26 07:18:41 UTC (rev 8483) @@ -40,4 +40,13 @@ super(reason); } + /** + * Creates a new instance. + * @param reason the failure reason + * @param throwable the cause + */ + public ScriptExecException(@NotNull final String reason, @NotNull final Throwable throwable) { + super(reason, throwable); + } + } // class ScriptExecException Modified: trunk/src/app/net/sf/gridarta/script/ScriptExecutor.java =================================================================== --- trunk/src/app/net/sf/gridarta/script/ScriptExecutor.java 2010-06-26 07:10:47 UTC (rev 8482) +++ trunk/src/app/net/sf/gridarta/script/ScriptExecutor.java 2010-06-26 07:18:41 UTC (rev 8483) @@ -91,7 +91,7 @@ try { parameter = clonedScript.getParameter(index); } catch (final NoSuchParameterException ex) { - throw new AssertionError(); + throw new AssertionError(ex); } if (!parameter.setStringValue(tmp[1])) { throw new ScriptExecException("invalid value " + tmp[1] + " for parameter " + tmp[0]); @@ -163,21 +163,21 @@ for (final PluginParameter<G, A, R, ?, ?> parameter : script) { runner.set(parameter.getName(), parameter.getValue()); } - } catch (final TargetError e) { + } catch (final TargetError ex) { final CharArrayWriter charArrayWriter = new CharArrayWriter(); try { final PrintWriter printWriter = new PrintWriter(charArrayWriter); try { - e.getTarget().printStackTrace(printWriter); + ex.getTarget().printStackTrace(printWriter); } finally { printWriter.close(); } } finally { charArrayWriter.close(); } - throw new ScriptExecException("target error: " + charArrayWriter); - } catch (final EvalError e) { - throw new ScriptExecException("evaluation error: " + e.getMessage()); + throw new ScriptExecException("target error: " + charArrayWriter, ex); + } catch (final EvalError ex) { + throw new ScriptExecException("evaluation error: " + ex.getMessage(), ex); } final Thread scriptThread = new BshThread<G, A, R>(script.getName(), script, runner); scriptThread.start(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-26 07:10:53
|
Revision: 8482 http://gridarta.svn.sourceforge.net/gridarta/?rev=8482&view=rev Author: akirschbaum Date: 2010-06-26 07:10:47 +0000 (Sat, 26 Jun 2010) Log Message: ----------- Do not ignore caught exceptions. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java trunk/src/app/net/sf/gridarta/script/parameter/PluginParameter.java Modified: trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java 2010-06-26 07:05:33 UTC (rev 8481) +++ trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java 2010-06-26 07:10:47 UTC (rev 8482) @@ -439,7 +439,7 @@ try { mapFile = activeMapFolder.addPickmap(pickmapName, mapReaderFactory, pickmapManager); } catch (final InvalidNameException ex) { - throw new AssertionError(); // the name has been checked before + throw new AssertionError(ex); // the name has been checked before } view.setActivePickmap(mapFile); } Modified: trunk/src/app/net/sf/gridarta/script/parameter/PluginParameter.java =================================================================== --- trunk/src/app/net/sf/gridarta/script/parameter/PluginParameter.java 2010-06-26 07:05:33 UTC (rev 8481) +++ trunk/src/app/net/sf/gridarta/script/parameter/PluginParameter.java 2010-06-26 07:10:47 UTC (rev 8482) @@ -145,7 +145,7 @@ try { return pluginParameterFactory.createParameter(toXML()); } catch (final NoSuchParameterException ex) { - throw new AssertionError(); + throw new AssertionError(ex); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-26 07:05:39
|
Revision: 8481 http://gridarta.svn.sourceforge.net/gridarta/?rev=8481&view=rev Author: akirschbaum Date: 2010-06-26 07:05:33 +0000 (Sat, 26 Jun 2010) Log Message: ----------- Suppress warnings. Modified Paths: -------------- trunk/model/src/app/net/sf/gridarta/model/configsource/DefaultConfigSourceFactory.java trunk/src/app/net/sf/gridarta/maincontrol/DefaultMainControl.java Modified: trunk/model/src/app/net/sf/gridarta/model/configsource/DefaultConfigSourceFactory.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/configsource/DefaultConfigSourceFactory.java 2010-06-26 07:03:26 UTC (rev 8480) +++ trunk/model/src/app/net/sf/gridarta/model/configsource/DefaultConfigSourceFactory.java 2010-06-26 07:05:33 UTC (rev 8481) @@ -62,6 +62,7 @@ try { configSourceClass = Class.forName(configSourceClassName); } catch (final ClassNotFoundException ex) { + //noinspection ThrowInsideCatchBlockWhichIgnoresCaughtException throw new MissingResourceException("Class does not exist: " + configSourceClassName + ": " + ex.getMessage(), "net.sf.gridarta", CONFIG_SOURCES_KEY); } @@ -69,6 +70,7 @@ try { configSourceClass2 = configSourceClass.asSubclass(ConfigSource.class); } catch (final ClassCastException ex) { + //noinspection ThrowInsideCatchBlockWhichIgnoresCaughtException throw new MissingResourceException("Class does not implement ConfigSource: " + configSourceClassName + ": " + ex.getMessage(), "net.sf.gridarta", CONFIG_SOURCES_KEY); } @@ -76,8 +78,10 @@ try { configSource = configSourceClass2.newInstance(); } catch (final InstantiationException ex) { + //noinspection ThrowInsideCatchBlockWhichIgnoresCaughtException throw new MissingResourceException("Class cannot be instantiated: " + configSourceClassName + ": " + ex.getMessage(), "net.sf.gridarta", CONFIG_SOURCES_KEY); } catch (final IllegalAccessException ex) { + //noinspection ThrowInsideCatchBlockWhichIgnoresCaughtException throw new MissingResourceException("Class cannot be instantiated: " + configSourceClassName + ": " + ex.getMessage(), "net.sf.gridarta", CONFIG_SOURCES_KEY); } Modified: trunk/src/app/net/sf/gridarta/maincontrol/DefaultMainControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/DefaultMainControl.java 2010-06-26 07:03:26 UTC (rev 8480) +++ trunk/src/app/net/sf/gridarta/maincontrol/DefaultMainControl.java 2010-06-26 07:05:33 UTC (rev 8481) @@ -179,6 +179,7 @@ xmlHelper = new XmlHelper(); } catch (final ParserConfigurationException ex) { log.fatal("Cannot create XML parser: " + ex.getMessage()); + //noinspection ThrowInsideCatchBlockWhichIgnoresCaughtException throw new MissingResourceException("Cannot create XML parser: " + ex.getMessage(), null, null); } try { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-26 07:03:32
|
Revision: 8480 http://gridarta.svn.sourceforge.net/gridarta/?rev=8480&view=rev Author: akirschbaum Date: 2010-06-26 07:03:26 +0000 (Sat, 26 Jun 2010) Log Message: ----------- Rename variable name. Modified Paths: -------------- trunk/textedit/src/app/net/sf/gridarta/textedit/scripteditor/ScriptEditUndoActions.java Modified: trunk/textedit/src/app/net/sf/gridarta/textedit/scripteditor/ScriptEditUndoActions.java =================================================================== --- trunk/textedit/src/app/net/sf/gridarta/textedit/scripteditor/ScriptEditUndoActions.java 2010-06-26 07:02:47 UTC (rev 8479) +++ trunk/textedit/src/app/net/sf/gridarta/textedit/scripteditor/ScriptEditUndoActions.java 2010-06-26 07:03:26 UTC (rev 8480) @@ -139,7 +139,7 @@ undoManager.redo(); refresh(); } - } catch (final CannotRedoException ex) { + } catch (final CannotRedoException ignored) { } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-26 07:02:56
|
Revision: 8479 http://gridarta.svn.sourceforge.net/gridarta/?rev=8479&view=rev Author: akirschbaum Date: 2010-06-26 07:02:47 +0000 (Sat, 26 Jun 2010) Log Message: ----------- Remove redundant catch clause. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/script/ScriptManager.java Modified: trunk/src/app/net/sf/gridarta/gui/script/ScriptManager.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/script/ScriptManager.java 2010-06-26 07:01:16 UTC (rev 8478) +++ trunk/src/app/net/sf/gridarta/gui/script/ScriptManager.java 2010-06-26 07:02:47 UTC (rev 8479) @@ -145,11 +145,7 @@ @Nullable @Override public Object getElementAt(final int index) { - try { - return ScriptManager.this.scriptModel.getScript(index); - } catch (final Exception e) { - return null; - } + return ScriptManager.this.scriptModel.getScript(index); } @Override This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-26 07:01:23
|
Revision: 8478 http://gridarta.svn.sourceforge.net/gridarta/?rev=8478&view=rev Author: akirschbaum Date: 2010-06-26 07:01:16 +0000 (Sat, 26 Jun 2010) Log Message: ----------- Make field private. Modified Paths: -------------- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/AbstractFlatMapRenderer.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/FlatMapRenderer.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/SimpleFlatMapRenderer.java 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/AbstractFlatMapRenderer.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/AbstractFlatMapRenderer.java 2010-06-26 06:37:23 UTC (rev 8477) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/AbstractFlatMapRenderer.java 2010-06-26 07:01:16 UTC (rev 8478) @@ -68,7 +68,7 @@ * @serial */ @NotNull - protected final Point borderOffset = new Point(); + private final Point borderOffset = new Point(); /** * The {@link MapModel} to render. @@ -573,4 +573,20 @@ */ protected abstract void updateAll(); + /** + * Returns the x offset to map borders. + * @return the x offset + */ + protected int getBorderOffsetX() { + return borderOffset.x; + } + + /** + * Returns the y offset to map borders. + * @return the y offset + */ + protected int getBorderOffsetY() { + return borderOffset.y; + } + } // class AbstractFlatMapRenderer Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/FlatMapRenderer.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/FlatMapRenderer.java 2010-06-26 06:37:23 UTC (rev 8477) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/FlatMapRenderer.java 2010-06-26 07:01:16 UTC (rev 8478) @@ -176,7 +176,7 @@ } final Graphics g = backBuffer.getGraphics(); - paintSquare(g, borderOffset.x + point.x * IGUIConstants.SQUARE_WIDTH, borderOffset.y + point.y * IGUIConstants.SQUARE_HEIGHT, mapModel.getMapSquare(point)); + paintSquare(g, getBorderOffsetX() + point.x * IGUIConstants.SQUARE_WIDTH, getBorderOffsetY() + point.y * IGUIConstants.SQUARE_HEIGHT, mapModel.getMapSquare(point)); paintSquareGrid(g, point); paintSquareSelection(g, point); } @@ -273,6 +273,8 @@ } else { g.fillRect(x, y, IGUIConstants.SQUARE_WIDTH, IGUIConstants.SQUARE_HEIGHT); if (mapViewSettings.isSmoothing()) { + final int borderOffsetX = getBorderOffsetX(); + final int borderOffsetY = getBorderOffsetY(); int layer = -1; for (final GameObject node : square) { if (node.getAttributeInt("invisible", true) == 0) { @@ -282,11 +284,11 @@ if (filterControl.canShow(node) && mapViewSettings.isEditType(node)) { paintGameObject(g, x, y, node); if (node.getAttributeInt("smoothlevel", true) > 0) { - smoothingRenderer.paintSmooth(g, square.getMapX(), square.getMapY(), node.getAttributeInt("smoothlevel", true), layer, false, borderOffset); + smoothingRenderer.paintSmooth(g, square.getMapX(), square.getMapY(), node.getAttributeInt("smoothlevel", true), layer, false, borderOffsetX, borderOffsetY); } } if (layer > -1) { - smoothingRenderer.paintSmooth(g, square.getMapX(), square.getMapY(), 1, layer + 1, true, borderOffset); + smoothingRenderer.paintSmooth(g, square.getMapX(), square.getMapY(), 1, layer + 1, true, borderOffsetX, borderOffsetY); } } } else { Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/SimpleFlatMapRenderer.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/SimpleFlatMapRenderer.java 2010-06-26 06:37:23 UTC (rev 8477) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/SimpleFlatMapRenderer.java 2010-06-26 07:01:16 UTC (rev 8478) @@ -161,11 +161,11 @@ } graphics.drawImage(img.getImage(), point.x * IGUIConstants.SQUARE_WIDTH, point.y * IGUIConstants.SQUARE_HEIGHT, point.x * IGUIConstants.SQUARE_WIDTH + IGUIConstants.SQUARE_WIDTH, point.y * IGUIConstants.SQUARE_HEIGHT + IGUIConstants.SQUARE_HEIGHT, offset.x, offset.y, offset.x + IGUIConstants.SQUARE_WIDTH, offset.y + IGUIConstants.SQUARE_HEIGHT, this); if (node.getAttributeInt("smoothlevel", true) > 0) { - smoothingRenderer.paintSmooth(graphics, point.x, point.y, node.getAttributeInt("smoothlevel", true), layer, false, new Point(0, 0)); + smoothingRenderer.paintSmooth(graphics, point.x, point.y, node.getAttributeInt("smoothlevel", true), layer, false, 0, 0); } } if (layer > -1) { - smoothingRenderer.paintSmooth(graphics, point.x, point.y, 1, layer + 1, true, new Point(0, 0)); + smoothingRenderer.paintSmooth(graphics, point.x, point.y, 1, layer + 1, true, 0, 0); } } 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 2010-06-26 06:37:23 UTC (rev 8477) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/SmoothingRenderer.java 2010-06-26 07:01:16 UTC (rev 8478) @@ -82,9 +82,10 @@ * objects are supposed to not use a layer, to stay coherent with client * behavior * @param allLayers whether or not to draw also layers above current one - * @param borderOffset the border offset + * @param borderOffsetX the border x offset + * @param borderOffsetY the border y offset */ - public void paintSmooth(@NotNull final Graphics graphics, final int x, final int y, final int level, final int layer, final boolean allLayers, @NotNull final Point borderOffset) { + public void paintSmooth(@NotNull final Graphics graphics, final int x, final int y, final int level, final int layer, final boolean allLayers, final int borderOffsetX, final int borderOffsetY) { final net.sf.gridarta.model.gameobject.GameObject<?, ?, ?>[][] layerNode = { new net.sf.gridarta.model.gameobject.GameObject<?, ?, ?>[3], new net.sf.gridarta.model.gameobject.GameObject<?, ?, ?>[3], new net.sf.gridarta.model.gameobject.GameObject<?, ?, ?>[3] }; final MapArchObject mapArchObject = mapModel.getMapArchObject(); boolean foundLayer = false; @@ -183,17 +184,17 @@ if (weight > 0) { src.x = IGUIConstants.SQUARE_WIDTH * weight; src.y = 0; - graphics.drawImage(img.getImage(), borderOffset.x + x * IGUIConstants.SQUARE_WIDTH, borderOffset.y + y * IGUIConstants.SQUARE_HEIGHT, borderOffset.x + x * IGUIConstants.SQUARE_WIDTH + IGUIConstants.SQUARE_WIDTH, borderOffset.y + y * IGUIConstants.SQUARE_HEIGHT + IGUIConstants.SQUARE_HEIGHT, src.x, src.y, src.x + IGUIConstants.SQUARE_WIDTH, src.y + IGUIConstants.SQUARE_HEIGHT, null); + 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); } if (weightC > 0) { src.x = IGUIConstants.SQUARE_WIDTH * weightC; src.y = IGUIConstants.SQUARE_HEIGHT; - graphics.drawImage(img.getImage(), borderOffset.x + x * IGUIConstants.SQUARE_WIDTH, borderOffset.y + y * IGUIConstants.SQUARE_HEIGHT, borderOffset.x + x * IGUIConstants.SQUARE_WIDTH + IGUIConstants.SQUARE_WIDTH, borderOffset.y + y * IGUIConstants.SQUARE_HEIGHT + IGUIConstants.SQUARE_HEIGHT, src.x, src.y, src.x + IGUIConstants.SQUARE_WIDTH, src.y + IGUIConstants.SQUARE_HEIGHT, null); + 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); } } /*while there's some smooth to do*/ if (allLayers && foundLayer) { - paintSmooth(graphics, x, y, level, layer + 1, true, borderOffset); + paintSmooth(graphics, x, y, level, layer + 1, true, borderOffsetX, borderOffsetY); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-26 06:37:32
|
Revision: 8477 http://gridarta.svn.sourceforge.net/gridarta/?rev=8477&view=rev Author: akirschbaum Date: 2010-06-26 06:37:23 +0000 (Sat, 26 Jun 2010) Log Message: ----------- Move IntegerParameterView.TooltipSpinner to top-level class. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/script/parameter/IntegerParameterView.java Added Paths: ----------- trunk/src/app/net/sf/gridarta/gui/script/parameter/TooltipSpinner.java Modified: trunk/src/app/net/sf/gridarta/gui/script/parameter/IntegerParameterView.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/script/parameter/IntegerParameterView.java 2010-06-26 06:36:23 UTC (rev 8476) +++ trunk/src/app/net/sf/gridarta/gui/script/parameter/IntegerParameterView.java 2010-06-26 06:37:23 UTC (rev 8477) @@ -19,7 +19,6 @@ package net.sf.gridarta.gui.script.parameter; -import java.awt.Component; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.AbstractButton; @@ -103,43 +102,4 @@ } } - /** - * Extends JSpinner to work around it's tooltip bug This bug has been fixed - * since Java 5.0 but we need this workaround for java 4.x users. - * @author tchize - */ - private static class TooltipSpinner extends JSpinner { - - private static final long serialVersionUID = -797350272052837471L; - - private TooltipSpinner(final SpinnerModel model) { - super(model); - } - - /** - * This override the JSpinner method to force the tooltip in all - * sub-components. - * @param text the tooltip to show - */ - @Override - public void setToolTipText(final String text) { - forceTooltip(this, text); - } - - private void forceTooltip(final JComponent tooltipComponent, final String tooltip) { - if (tooltipComponent == this) { - super.setToolTipText(tooltip); - } else { - tooltipComponent.setToolTipText(tooltip); - } - final Component[] components = tooltipComponent.getComponents(); - for (final Component component : components) { - if (component instanceof JComponent) { - forceTooltip((JComponent) component, tooltip); - } - } - } - - } // class TooltipSpinner - } // class IntegerParameterView Added: trunk/src/app/net/sf/gridarta/gui/script/parameter/TooltipSpinner.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/script/parameter/TooltipSpinner.java (rev 0) +++ trunk/src/app/net/sf/gridarta/gui/script/parameter/TooltipSpinner.java 2010-06-26 06:37:23 UTC (rev 8477) @@ -0,0 +1,64 @@ +/* + * 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.script.parameter; + +import java.awt.Component; +import javax.swing.JComponent; +import javax.swing.JSpinner; +import javax.swing.SpinnerModel; + +/** + * Extends JSpinner to work around it's tooltip bug This bug has been fixed + * since Java 5.0 but we need this workaround for java 4.x users. + * @author tchize + */ +public class TooltipSpinner extends JSpinner { + + private static final long serialVersionUID = -797350272052837471L; + + public TooltipSpinner(final SpinnerModel model) { + super(model); + } + + /** + * This override the JSpinner method to force the tooltip in all + * sub-components. + * @param text the tooltip to show + */ + @Override + public void setToolTipText(final String text) { + forceTooltip(this, text); + } + + private void forceTooltip(final JComponent tooltipComponent, final String tooltip) { + if (tooltipComponent == this) { + super.setToolTipText(tooltip); + } else { + tooltipComponent.setToolTipText(tooltip); + } + final Component[] components = tooltipComponent.getComponents(); + for (final Component component : components) { + if (component instanceof JComponent) { + forceTooltip((JComponent) component, tooltip); + } + } + } + +} // class TooltipSpinner Property changes on: trunk/src/app/net/sf/gridarta/gui/script/parameter/TooltipSpinner.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-26 06:36:29
|
Revision: 8476 http://gridarta.svn.sourceforge.net/gridarta/?rev=8476&view=rev Author: akirschbaum Date: 2010-06-26 06:36:23 +0000 (Sat, 26 Jun 2010) Log Message: ----------- Rename variables. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/script/parameter/IntegerParameterView.java Modified: trunk/src/app/net/sf/gridarta/gui/script/parameter/IntegerParameterView.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/script/parameter/IntegerParameterView.java 2010-06-26 06:33:13 UTC (rev 8475) +++ trunk/src/app/net/sf/gridarta/gui/script/parameter/IntegerParameterView.java 2010-06-26 06:36:23 UTC (rev 8476) @@ -45,19 +45,19 @@ private final IntegerParameter<G, A, R> parameter; - public IntegerParameterView(final IntegerParameter<G, A, R> param) { - parameter = param; - final SpinnerModel mdl = new SpinnerNumberModel(0, param.getMin(), param.getMax(), 1); + public IntegerParameterView(final IntegerParameter<G, A, R> parameter) { + this.parameter = parameter; + final SpinnerModel mdl = new SpinnerNumberModel(0, parameter.getMin(), parameter.getMax(), 1); value = new TooltipSpinner(mdl); try { - value.setValue(param.getValue()); - } catch (final Exception e) { + value.setValue(parameter.getValue()); + } catch (final Exception ignored) { } value.addChangeListener(new ChangeListener() { @Override public void stateChanged(final ChangeEvent e) { try { - parameter.setValue((Integer) ((SpinnerNumberModel) value.getModel()).getNumber()); + IntegerParameterView.this.parameter.setValue((Integer) ((SpinnerNumberModel) value.getModel()).getNumber()); } catch (final Exception ex) { ex.printStackTrace(); } @@ -126,16 +126,16 @@ forceTooltip(this, text); } - private void forceTooltip(final JComponent c, final String tip) { - if (c == this) { - super.setToolTipText(tip); + private void forceTooltip(final JComponent tooltipComponent, final String tooltip) { + if (tooltipComponent == this) { + super.setToolTipText(tooltip); } else { - c.setToolTipText(tip); + tooltipComponent.setToolTipText(tooltip); } - final Component[] components = c.getComponents(); + final Component[] components = tooltipComponent.getComponents(); for (final Component component : components) { if (component instanceof JComponent) { - forceTooltip((JComponent) component, tip); + forceTooltip((JComponent) component, tooltip); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-26 06:33:20
|
Revision: 8475 http://gridarta.svn.sourceforge.net/gridarta/?rev=8475&view=rev Author: akirschbaum Date: 2010-06-26 06:33:13 +0000 (Sat, 26 Jun 2010) Log Message: ----------- Remove AbstractGameObjectAttributesTab.gameObjectAttributesModelListener. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/AbstractGameObjectAttributesTab.java Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/AbstractGameObjectAttributesTab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/AbstractGameObjectAttributesTab.java 2010-06-26 06:31:53 UTC (rev 8474) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/AbstractGameObjectAttributesTab.java 2010-06-26 06:33:13 UTC (rev 8475) @@ -55,26 +55,6 @@ private G selectedGameObject = null; /** - * The listener attached to the tracked model. - */ - private final GameObjectAttributesModelListener<G, A, R> gameObjectAttributesModelListener = new GameObjectAttributesModelListener<G, A, R>() { - - /** {@inheritDoc} */ - @Override - public void selectedGameObjectChanged(@Nullable final G selectedGameObject) { - AbstractGameObjectAttributesTab.this.selectedGameObject = selectedGameObject; - refresh(selectedGameObject); - } - - /** {@inheritDoc} */ - @Override - public void refreshSelectedGameObject() { - refresh(selectedGameObject); - } - - }; - - /** * The focus listener to implement auto-applying. See {@link * #addAutoApply(Component)}. */ @@ -99,6 +79,22 @@ * @param gameObjectAttributesModel the model to track */ protected AbstractGameObjectAttributesTab(@NotNull final GameObjectAttributesModel<G, A, R> gameObjectAttributesModel) { + final GameObjectAttributesModelListener<G, A, R> gameObjectAttributesModelListener = new GameObjectAttributesModelListener<G, A, R>() { + + /** {@inheritDoc} */ + @Override + public void selectedGameObjectChanged(@Nullable final G selectedGameObject) { + AbstractGameObjectAttributesTab.this.selectedGameObject = selectedGameObject; + refresh(selectedGameObject); + } + + /** {@inheritDoc} */ + @Override + public void refreshSelectedGameObject() { + refresh(selectedGameObject); + } + + }; gameObjectAttributesModel.addGameObjectAttributesModelListener(gameObjectAttributesModelListener); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-26 06:32:01
|
Revision: 8474 http://gridarta.svn.sourceforge.net/gridarta/?rev=8474&view=rev Author: akirschbaum Date: 2010-06-26 06:31:53 +0000 (Sat, 26 Jun 2010) Log Message: ----------- Suppress warnings. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapActions.java trunk/src/app/net/sf/gridarta/gui/script/parameter/ArchComboBoxModel.java trunk/src/app/net/sf/gridarta/gui/utils/borderpanel/BorderPanel.java trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/TabbedPanel.java trunk/utils/src/app/net/sf/gridarta/utils/ActionBuilderUtils.java Modified: trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapActions.java 2010-06-26 06:17:32 UTC (rev 8473) +++ trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapActions.java 2010-06-26 06:31:53 UTC (rev 8474) @@ -793,6 +793,7 @@ * @param newMapView the new map view * @param direction the direction to scroll * @return the new view position + * @noinspection TypeMayBeWeakened */ @NotNull private Point calculateNewViewPosition(@NotNull final JScrollPane oldMapView, @NotNull final JScrollPane newMapView, @NotNull final Direction direction) { Modified: trunk/src/app/net/sf/gridarta/gui/script/parameter/ArchComboBoxModel.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/script/parameter/ArchComboBoxModel.java 2010-06-26 06:17:32 UTC (rev 8473) +++ trunk/src/app/net/sf/gridarta/gui/script/parameter/ArchComboBoxModel.java 2010-06-26 06:31:53 UTC (rev 8474) @@ -107,6 +107,9 @@ // "abc" -> "abcd" } + /** + * @noinspection TypeMayBeWeakened + */ @NotNull public Archetype<G, A, R> getNearestMatch(@NotNull final String name) { int pos = Arrays.binarySearch(archList, name, new Comparator<Object>() { Modified: trunk/src/app/net/sf/gridarta/gui/utils/borderpanel/BorderPanel.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/borderpanel/BorderPanel.java 2010-06-26 06:17:32 UTC (rev 8473) +++ trunk/src/app/net/sf/gridarta/gui/utils/borderpanel/BorderPanel.java 2010-06-26 06:31:53 UTC (rev 8474) @@ -78,6 +78,7 @@ * @param component the component * @param size the size of the component; width or height, depending on * <code>location</code> + * @noinspection TypeMayBeWeakened */ public void setComponent(@NotNull final Location location, @NotNull final Component component, final int size) { splitPanes[location.ordinal()].setOptionalComponent(component, size); @@ -86,6 +87,7 @@ /** * Unsets the optional {@link Component} for a location. * @param location the location + * @noinspection TypeMayBeWeakened */ public void unsetComponent(@NotNull final Location location) { splitPanes[location.ordinal()].setOptionalComponent(null, 0); Modified: trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/TabbedPanel.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/TabbedPanel.java 2010-06-26 06:17:32 UTC (rev 8473) +++ trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/TabbedPanel.java 2010-06-26 06:31:53 UTC (rev 8474) @@ -160,6 +160,7 @@ * view. * @param location the location * @return the tab or <code>null</code> if no active tab exists + * @noinspection TypeMayBeWeakened */ @Nullable public Tab getActiveTab(@NotNull final Location location) { Modified: trunk/utils/src/app/net/sf/gridarta/utils/ActionBuilderUtils.java =================================================================== --- trunk/utils/src/app/net/sf/gridarta/utils/ActionBuilderUtils.java 2010-06-26 06:17:32 UTC (rev 8473) +++ trunk/utils/src/app/net/sf/gridarta/utils/ActionBuilderUtils.java 2010-06-26 06:31:53 UTC (rev 8474) @@ -98,6 +98,7 @@ * @param actionBuilder the action builder to query * @param key the resource key * @return the label + * @noinspection TypeMayBeWeakened */ @NotNull public static JLabel newLabel(@NotNull final ActionBuilder actionBuilder, @NotNull final String key) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-26 06:17:38
|
Revision: 8473 http://gridarta.svn.sourceforge.net/gridarta/?rev=8473&view=rev Author: akirschbaum Date: 2010-06-26 06:17:32 +0000 (Sat, 26 Jun 2010) Log Message: ----------- Whitespace changes. Modified Paths: -------------- trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeType.java trunk/model/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java Modified: trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeType.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeType.java 2010-06-26 06:15:48 UTC (rev 8472) +++ trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeType.java 2010-06-26 06:17:32 UTC (rev 8473) @@ -287,7 +287,7 @@ final String attributeValue = baseObject.getAttributeString(spec.substring(0, question)); final boolean attributeExists = attributeValue.length() != 0 && !attributeValue.equals("0"); if (attributeExists) { - value = spec.substring(question + 1, colon == -1 ? spec.length(): colon); + value = spec.substring(question + 1, colon == -1 ? spec.length() : colon); } else { value = colon == -1 ? "" : spec.substring(colon + 1); } Modified: trunk/model/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java 2010-06-26 06:15:48 UTC (rev 8472) +++ trunk/model/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java 2010-06-26 06:17:32 UTC (rev 8473) @@ -730,7 +730,7 @@ } final String title = getAttributeString(TITLE); - return title.isEmpty() ? baseName : baseName + " " +title; + return title.isEmpty() ? baseName : baseName + " " + title; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-26 06:15:55
|
Revision: 8472 http://gridarta.svn.sourceforge.net/gridarta/?rev=8472&view=rev Author: akirschbaum Date: 2010-06-26 06:15:48 +0000 (Sat, 26 Jun 2010) Log Message: ----------- Replace boolean flag with control flow. Modified Paths: -------------- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/io/MapArchObjectParser.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/io/MapArchObjectParser.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/io/MapArchObjectParser.java trunk/model/src/app/net/sf/gridarta/model/io/AbstractMapArchObjectParser.java trunk/model/src/test/net/sf/gridarta/model/io/TestMapArchObjectParser.java 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 2010-06-26 06:09:21 UTC (rev 8471) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/io/MapArchObjectParser.java 2010-06-26 06:15:48 UTC (rev 8472) @@ -19,6 +19,7 @@ package net.sf.gridarta.var.atrinik.model.io; +import java.io.BufferedReader; import java.io.IOException; import java.util.Formatter; import net.sf.gridarta.model.direction.Direction; @@ -129,7 +130,7 @@ * {@inheritDoc} */ @Override - protected boolean parseLine(@NotNull final String line, @NotNull final MapArchObject mapArchObject) { + protected boolean parseLine(@NotNull final String line, @NotNull final MapArchObject mapArchObject, @NotNull final BufferedReader reader) { if (line.startsWith("no_save ")) { mapArchObject.setNoSave(NumberUtils.parseInt(line.substring(8)) != 0); return true; Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/io/MapArchObjectParser.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/io/MapArchObjectParser.java 2010-06-26 06:09:21 UTC (rev 8471) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/io/MapArchObjectParser.java 2010-06-26 06:15:48 UTC (rev 8472) @@ -36,16 +36,10 @@ public class MapArchObjectParser extends AbstractMapArchObjectParser<MapArchObject> { /** - * Set to <code>true</code> while parsing a map lore section. - */ - private boolean loreflag = false; - - /** * {@inheritDoc} */ @Override public void load(@NotNull final BufferedReader reader, @NotNull final MapArchObject mapArchObject) throws IOException { - loreflag = false; super.load(reader, mapArchObject); } @@ -152,20 +146,7 @@ * {@inheritDoc} */ @Override - protected boolean parseLine(@NotNull final String line, @NotNull final MapArchObject mapArchObject) { - if (loreflag) { - // reading lore text: - if (line.equals("endmaplore")) { - loreflag = false; - } else { - if (mapArchObject.getLore().length() > 0) { - mapArchObject.addLore("\n"); - } - mapArchObject.addLore(line); - } - return true; - } - + protected boolean parseLine(@NotNull final String line, @NotNull final MapArchObject mapArchObject, @NotNull final BufferedReader reader) throws IOException { if (line.startsWith("region ")) { mapArchObject.setRegion(line.substring(7)); return true; @@ -242,7 +223,22 @@ } if (line.equals("maplore")) { - loreflag = true; + while (true) { + final String loreLine = reader.readLine(); + if (loreLine == null) { + throw new IOException("unexpected end of file in maplore..endmaplore field"); + } + + if (loreLine.equals("endmaplore")) { + break; + } + + if (mapArchObject.getLore().length() > 0) { + mapArchObject.addLore("\n"); + } + mapArchObject.addLore(loreLine); + } + return true; } Modified: trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/io/MapArchObjectParser.java =================================================================== --- trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/io/MapArchObjectParser.java 2010-06-26 06:09:21 UTC (rev 8471) +++ trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/io/MapArchObjectParser.java 2010-06-26 06:15:48 UTC (rev 8472) @@ -19,6 +19,7 @@ package net.sf.gridarta.var.daimonin.model.io; +import java.io.BufferedReader; import java.io.IOException; import java.util.Formatter; import net.sf.gridarta.model.direction.Direction; @@ -126,7 +127,7 @@ * {@inheritDoc} */ @Override - protected boolean parseLine(@NotNull final String line, @NotNull final MapArchObject mapArchObject) { + protected boolean parseLine(@NotNull final String line, @NotNull final MapArchObject mapArchObject, @NotNull final BufferedReader reader) { if (line.startsWith("no_save ")) { mapArchObject.setNoSave(NumberUtils.parseInt(line.substring(8)) != 0); return true; Modified: trunk/model/src/app/net/sf/gridarta/model/io/AbstractMapArchObjectParser.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/io/AbstractMapArchObjectParser.java 2010-06-26 06:09:21 UTC (rev 8471) +++ trunk/model/src/app/net/sf/gridarta/model/io/AbstractMapArchObjectParser.java 2010-06-26 06:15:48 UTC (rev 8472) @@ -31,8 +31,8 @@ /** * Abstract base class for classes implementing {@link MapArchObjectParser}s. * This class contains the common code for reading map arch objects. Subclasses - * can extend the parser ({@link #parseLine(String, MapArchObject)}. No support - * for writing is present. + * can extend the parser ({@link #parseLine(String, MapArchObject, + * BufferedReader)}. No support for writing is present. * @author Andreas Kirschbaum */ public abstract class AbstractMapArchObjectParser<A extends MapArchObject<A>> implements MapArchObjectParser<A> { @@ -63,7 +63,7 @@ final String trimmedLine = StringUtils.removeTrailingWhitespace(line); - if (parseLine(trimmedLine, mapArchObject)) { + if (parseLine(trimmedLine, mapArchObject, reader)) { // ignore } else if (trimmedLine.equals("msg")) { while (true) { @@ -136,8 +136,10 @@ * Parse a line for this editor type. * @param line The line to parse. * @param mapArchObject The map arch object to update. + * @param reader the reader for reading additional lines * @return Whether the line has been consumed. + * @throws IOException if an I/O error occurs */ - protected abstract boolean parseLine(@NotNull final String line, @NotNull final A mapArchObject); + protected abstract boolean parseLine(@NotNull final String line, @NotNull final A mapArchObject, @NotNull final BufferedReader reader) throws IOException; } // class AbstractMapArchObjectParser Modified: trunk/model/src/test/net/sf/gridarta/model/io/TestMapArchObjectParser.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/io/TestMapArchObjectParser.java 2010-06-26 06:09:21 UTC (rev 8471) +++ trunk/model/src/test/net/sf/gridarta/model/io/TestMapArchObjectParser.java 2010-06-26 06:15:48 UTC (rev 8472) @@ -19,6 +19,7 @@ package net.sf.gridarta.model.io; +import java.io.BufferedReader; import java.io.IOException; import java.util.Formatter; import net.sf.gridarta.model.direction.Direction; @@ -35,7 +36,7 @@ * {@inheritDoc} */ @Override - protected boolean parseLine(@NotNull final String line, @NotNull final TestMapArchObject mapArchObject) { + protected boolean parseLine(@NotNull final String line, @NotNull final TestMapArchObject mapArchObject, @NotNull final BufferedReader reader) { return false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-26 06:09:27
|
Revision: 8471 http://gridarta.svn.sourceforge.net/gridarta/?rev=8471&view=rev Author: akirschbaum Date: 2010-06-26 06:09:21 +0000 (Sat, 26 Jun 2010) Log Message: ----------- Make map parser case sensitive for 'msg', 'endmsg', and 'end' tags. Modified Paths: -------------- trunk/model/src/app/net/sf/gridarta/model/io/AbstractMapArchObjectParser.java Modified: trunk/model/src/app/net/sf/gridarta/model/io/AbstractMapArchObjectParser.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/io/AbstractMapArchObjectParser.java 2010-06-26 06:08:19 UTC (rev 8470) +++ trunk/model/src/app/net/sf/gridarta/model/io/AbstractMapArchObjectParser.java 2010-06-26 06:09:21 UTC (rev 8471) @@ -65,7 +65,7 @@ if (parseLine(trimmedLine, mapArchObject)) { // ignore - } else if (trimmedLine.equalsIgnoreCase("msg")) { + } else if (trimmedLine.equals("msg")) { while (true) { final String msgLine = reader.readLine(); if (msgLine == null) { @@ -74,7 +74,7 @@ final String trimmedMsgLine = StringUtils.removeTrailingWhitespace(msgLine); - if (trimmedMsgLine.equalsIgnoreCase("endmsg")) { + if (trimmedMsgLine.equals("endmsg")) { break; } @@ -83,7 +83,7 @@ } mapArchObject.addText(trimmedMsgLine); } - } else if (trimmedLine.equalsIgnoreCase("end")) { + } else if (trimmedLine.equals("end")) { break; } else if (trimmedLine.startsWith("name ")) { mapArchObject.setMapName(trimmedLine.substring(5)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-26 06:08:26
|
Revision: 8470 http://gridarta.svn.sourceforge.net/gridarta/?rev=8470&view=rev Author: akirschbaum Date: 2010-06-26 06:08:19 +0000 (Sat, 26 Jun 2010) Log Message: ----------- Rename variable names. Modified Paths: -------------- trunk/model/src/app/net/sf/gridarta/model/io/AbstractMapArchObjectParser.java Modified: trunk/model/src/app/net/sf/gridarta/model/io/AbstractMapArchObjectParser.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/io/AbstractMapArchObjectParser.java 2010-06-26 06:06:04 UTC (rev 8469) +++ trunk/model/src/app/net/sf/gridarta/model/io/AbstractMapArchObjectParser.java 2010-06-26 06:08:19 UTC (rev 8470) @@ -56,16 +56,16 @@ int width = 0; int height = 0; while (true) { - final String tmp = reader.readLine(); - if (tmp == null) { + final String line = reader.readLine(); + if (line == null) { throw new IOException("unexpected end of file in map header"); } - final String line = StringUtils.removeTrailingWhitespace(tmp); + final String trimmedLine = StringUtils.removeTrailingWhitespace(line); - if (parseLine(line, mapArchObject)) { + if (parseLine(trimmedLine, mapArchObject)) { // ignore - } else if (line.equalsIgnoreCase("msg")) { + } else if (trimmedLine.equalsIgnoreCase("msg")) { while (true) { final String msgLine = reader.readLine(); if (msgLine == null) { @@ -83,49 +83,49 @@ } mapArchObject.addText(trimmedMsgLine); } - } else if (line.equalsIgnoreCase("end")) { + } else if (trimmedLine.equalsIgnoreCase("end")) { break; - } else if (line.startsWith("name ")) { - mapArchObject.setMapName(line.substring(5)); - } else if (line.startsWith("width ")) { - width = NumberUtils.parseInt(line.substring(6)); - } else if (line.startsWith("height ")) { - height = NumberUtils.parseInt(line.substring(7)); - } else if (line.startsWith("enter_x ")) { - mapArchObject.setEnterX(NumberUtils.parseInt(line.substring(8))); - } else if (line.startsWith("enter_y ")) { - mapArchObject.setEnterY(NumberUtils.parseInt(line.substring(8))); - } else if (line.startsWith("reset_timeout ")) { - mapArchObject.setResetTimeout(NumberUtils.parseInt(line.substring(14))); - } else if (line.startsWith("swap_time ")) { - mapArchObject.setSwapTime(NumberUtils.parseInt(line.substring(10))); - } else if (line.startsWith("difficulty ")) { - mapArchObject.setDifficulty(NumberUtils.parseInt(line.substring(11))); - } else if (line.startsWith("darkness ")) { - mapArchObject.setDarkness(NumberUtils.parseInt(line.substring(9))); - } else if (line.startsWith("fixed_resettime ")) { - if (NumberUtils.parseInt(line.substring(16)) != 0) { + } else if (trimmedLine.startsWith("name ")) { + mapArchObject.setMapName(trimmedLine.substring(5)); + } else if (trimmedLine.startsWith("width ")) { + width = NumberUtils.parseInt(trimmedLine.substring(6)); + } else if (trimmedLine.startsWith("height ")) { + height = NumberUtils.parseInt(trimmedLine.substring(7)); + } else if (trimmedLine.startsWith("enter_x ")) { + mapArchObject.setEnterX(NumberUtils.parseInt(trimmedLine.substring(8))); + } else if (trimmedLine.startsWith("enter_y ")) { + mapArchObject.setEnterY(NumberUtils.parseInt(trimmedLine.substring(8))); + } else if (trimmedLine.startsWith("reset_timeout ")) { + mapArchObject.setResetTimeout(NumberUtils.parseInt(trimmedLine.substring(14))); + } else if (trimmedLine.startsWith("swap_time ")) { + mapArchObject.setSwapTime(NumberUtils.parseInt(trimmedLine.substring(10))); + } else if (trimmedLine.startsWith("difficulty ")) { + mapArchObject.setDifficulty(NumberUtils.parseInt(trimmedLine.substring(11))); + } else if (trimmedLine.startsWith("darkness ")) { + mapArchObject.setDarkness(NumberUtils.parseInt(trimmedLine.substring(9))); + } else if (trimmedLine.startsWith("fixed_resettime ")) { + if (NumberUtils.parseInt(trimmedLine.substring(16)) != 0) { mapArchObject.setFixedReset(true); } - } else if (line.startsWith("outdoor ")) { - if (NumberUtils.parseInt(line.substring(8)) != 0) { + } else if (trimmedLine.startsWith("outdoor ")) { + if (NumberUtils.parseInt(trimmedLine.substring(8)) != 0) { mapArchObject.setOutdoor(true); } - } else if (line.startsWith("tile_path_")) { + } else if (trimmedLine.startsWith("tile_path_")) { // get tile path try { - final int i = Integer.valueOf(line.substring(10, 11)); - if (i > 0 && i <= Direction.values().length && line.length() >= 12 && line.charAt(11) == ' ') { - mapArchObject.setTilePath(Direction.values()[i - 1], line.substring(12)); + final int index = Integer.valueOf(trimmedLine.substring(10, 11)); + if (index > 0 && index <= Direction.values().length && trimmedLine.length() >= 12 && trimmedLine.charAt(11) == ' ') { + mapArchObject.setTilePath(Direction.values()[index - 1], trimmedLine.substring(12)); } else { - throw new InvalidMapFormatException("unexpected map attribute: '" + line + "'"); + throw new InvalidMapFormatException("unexpected map attribute: '" + trimmedLine + "'"); } } catch (final NumberFormatException ignored) { //noinspection ThrowInsideCatchBlockWhichIgnoresCaughtException - throw new InvalidMapFormatException("unexpected map attribute: '" + line + "'"); + throw new InvalidMapFormatException("unexpected map attribute: '" + trimmedLine + "'"); } } else { - throw new InvalidMapFormatException("unexpected map attribute: '" + line + "'"); + throw new InvalidMapFormatException("unexpected map attribute: '" + trimmedLine + "'"); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-26 06:06:10
|
Revision: 8469 http://gridarta.svn.sourceforge.net/gridarta/?rev=8469&view=rev Author: akirschbaum Date: 2010-06-26 06:06:04 +0000 (Sat, 26 Jun 2010) Log Message: ----------- Merge duplicated code. Modified Paths: -------------- trunk/model/src/app/net/sf/gridarta/model/io/AbstractMapArchObjectParser.java Modified: trunk/model/src/app/net/sf/gridarta/model/io/AbstractMapArchObjectParser.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/io/AbstractMapArchObjectParser.java 2010-06-26 06:03:48 UTC (rev 8468) +++ trunk/model/src/app/net/sf/gridarta/model/io/AbstractMapArchObjectParser.java 2010-06-26 06:06:04 UTC (rev 8469) @@ -25,6 +25,7 @@ import net.sf.gridarta.model.map.maparchobject.MapArchObject; import net.sf.gridarta.utils.NumberUtils; import net.sf.gridarta.utils.Size2D; +import net.sf.gridarta.utils.StringUtils; import org.jetbrains.annotations.NotNull; /** @@ -46,11 +47,7 @@ throw new IOException("unexpected end of file in map header"); } - int endPos1 = firstLine.length(); - while (endPos1 > 0 && firstLine.charAt(endPos1 - 1) <= ' ') { - endPos1--; - } - final String trimmedFirstLine = firstLine.substring(0, endPos1); + final String trimmedFirstLine = StringUtils.removeTrailingWhitespace(firstLine); if (!trimmedFirstLine.equals("arch map")) { throw new InvalidMapFormatException("unexpected first line of map file: '" + trimmedFirstLine + "', expected 'arch map'"); @@ -64,11 +61,7 @@ throw new IOException("unexpected end of file in map header"); } - int endPos = tmp.length(); - while (endPos > 0 && tmp.charAt(endPos - 1) <= ' ') { - endPos--; - } - final String line = tmp.substring(0, endPos); + final String line = StringUtils.removeTrailingWhitespace(tmp); if (parseLine(line, mapArchObject)) { // ignore @@ -79,11 +72,7 @@ throw new IOException("unexpected end of file in msg...endmsg field"); } - int endPos2 = msgLine.length(); - while (endPos2 > 0 && msgLine.charAt(endPos2 - 1) <= ' ') { - endPos2--; - } - final String trimmedMsgLine = msgLine.substring(0, endPos2); + final String trimmedMsgLine = StringUtils.removeTrailingWhitespace(msgLine); if (trimmedMsgLine.equalsIgnoreCase("endmsg")) { break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-26 06:03:54
|
Revision: 8468 http://gridarta.svn.sourceforge.net/gridarta/?rev=8468&view=rev Author: akirschbaum Date: 2010-06-26 06:03:48 +0000 (Sat, 26 Jun 2010) Log Message: ----------- Replace boolean flag with control flow. Modified Paths: -------------- trunk/model/src/app/net/sf/gridarta/model/io/AbstractMapArchObjectParser.java Modified: trunk/model/src/app/net/sf/gridarta/model/io/AbstractMapArchObjectParser.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/io/AbstractMapArchObjectParser.java 2010-06-26 05:56:52 UTC (rev 8467) +++ trunk/model/src/app/net/sf/gridarta/model/io/AbstractMapArchObjectParser.java 2010-06-26 06:03:48 UTC (rev 8468) @@ -58,7 +58,6 @@ int width = 0; int height = 0; - boolean msgflag = false; // flag for map-message while (true) { final String tmp = reader.readLine(); if (tmp == null) { @@ -71,66 +70,73 @@ } final String line = tmp.substring(0, endPos); - // we are inside the map arch - if (msgflag) { - // reading the map message: - if (line.equalsIgnoreCase("endmsg")) { - msgflag = false; - } else { + if (parseLine(line, mapArchObject)) { + // ignore + } else if (line.equalsIgnoreCase("msg")) { + while (true) { + final String msgLine = reader.readLine(); + if (msgLine == null) { + throw new IOException("unexpected end of file in msg...endmsg field"); + } + + int endPos2 = msgLine.length(); + while (endPos2 > 0 && msgLine.charAt(endPos2 - 1) <= ' ') { + endPos2--; + } + final String trimmedMsgLine = msgLine.substring(0, endPos2); + + if (trimmedMsgLine.equalsIgnoreCase("endmsg")) { + break; + } + if (mapArchObject.getText().length() > 0) { mapArchObject.addText("\n"); } - mapArchObject.addText(line); + mapArchObject.addText(trimmedMsgLine); } - } else { - if (parseLine(line, mapArchObject)) { - // ignore - } else if (line.equalsIgnoreCase("msg")) { - msgflag = true; - } else if (line.equalsIgnoreCase("end")) { - break; - } else if (line.startsWith("name ")) { - mapArchObject.setMapName(line.substring(5)); - } else if (line.startsWith("width ")) { - width = NumberUtils.parseInt(line.substring(6)); - } else if (line.startsWith("height ")) { - height = NumberUtils.parseInt(line.substring(7)); - } else if (line.startsWith("enter_x ")) { - mapArchObject.setEnterX(NumberUtils.parseInt(line.substring(8))); - } else if (line.startsWith("enter_y ")) { - mapArchObject.setEnterY(NumberUtils.parseInt(line.substring(8))); - } else if (line.startsWith("reset_timeout ")) { - mapArchObject.setResetTimeout(NumberUtils.parseInt(line.substring(14))); - } else if (line.startsWith("swap_time ")) { - mapArchObject.setSwapTime(NumberUtils.parseInt(line.substring(10))); - } else if (line.startsWith("difficulty ")) { - mapArchObject.setDifficulty(NumberUtils.parseInt(line.substring(11))); - } else if (line.startsWith("darkness ")) { - mapArchObject.setDarkness(NumberUtils.parseInt(line.substring(9))); - } else if (line.startsWith("fixed_resettime ")) { - if (NumberUtils.parseInt(line.substring(16)) != 0) { - mapArchObject.setFixedReset(true); - } - } else if (line.startsWith("outdoor ")) { - if (NumberUtils.parseInt(line.substring(8)) != 0) { - mapArchObject.setOutdoor(true); - } - } else if (line.startsWith("tile_path_")) { - // get tile path - try { - final int i = Integer.valueOf(line.substring(10, 11)); - if (i > 0 && i <= Direction.values().length && line.length() >= 12 && line.charAt(11) == ' ') { - mapArchObject.setTilePath(Direction.values()[i - 1], line.substring(12)); - } else { - throw new InvalidMapFormatException("unexpected map attribute: '" + line + "'"); - } - } catch (final NumberFormatException ignored) { - //noinspection ThrowInsideCatchBlockWhichIgnoresCaughtException + } else if (line.equalsIgnoreCase("end")) { + break; + } else if (line.startsWith("name ")) { + mapArchObject.setMapName(line.substring(5)); + } else if (line.startsWith("width ")) { + width = NumberUtils.parseInt(line.substring(6)); + } else if (line.startsWith("height ")) { + height = NumberUtils.parseInt(line.substring(7)); + } else if (line.startsWith("enter_x ")) { + mapArchObject.setEnterX(NumberUtils.parseInt(line.substring(8))); + } else if (line.startsWith("enter_y ")) { + mapArchObject.setEnterY(NumberUtils.parseInt(line.substring(8))); + } else if (line.startsWith("reset_timeout ")) { + mapArchObject.setResetTimeout(NumberUtils.parseInt(line.substring(14))); + } else if (line.startsWith("swap_time ")) { + mapArchObject.setSwapTime(NumberUtils.parseInt(line.substring(10))); + } else if (line.startsWith("difficulty ")) { + mapArchObject.setDifficulty(NumberUtils.parseInt(line.substring(11))); + } else if (line.startsWith("darkness ")) { + mapArchObject.setDarkness(NumberUtils.parseInt(line.substring(9))); + } else if (line.startsWith("fixed_resettime ")) { + if (NumberUtils.parseInt(line.substring(16)) != 0) { + mapArchObject.setFixedReset(true); + } + } else if (line.startsWith("outdoor ")) { + if (NumberUtils.parseInt(line.substring(8)) != 0) { + mapArchObject.setOutdoor(true); + } + } else if (line.startsWith("tile_path_")) { + // get tile path + try { + final int i = Integer.valueOf(line.substring(10, 11)); + if (i > 0 && i <= Direction.values().length && line.length() >= 12 && line.charAt(11) == ' ') { + mapArchObject.setTilePath(Direction.values()[i - 1], line.substring(12)); + } else { throw new InvalidMapFormatException("unexpected map attribute: '" + line + "'"); } - } else { + } catch (final NumberFormatException ignored) { + //noinspection ThrowInsideCatchBlockWhichIgnoresCaughtException throw new InvalidMapFormatException("unexpected map attribute: '" + line + "'"); } + } else { + throw new InvalidMapFormatException("unexpected map attribute: '" + line + "'"); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-26 05:56:59
|
Revision: 8467 http://gridarta.svn.sourceforge.net/gridarta/?rev=8467&view=rev Author: akirschbaum Date: 2010-06-26 05:56:52 +0000 (Sat, 26 Jun 2010) Log Message: ----------- Replace boolean flag with control flow. Modified Paths: -------------- trunk/model/src/app/net/sf/gridarta/model/io/AbstractMapArchObjectParser.java Modified: trunk/model/src/app/net/sf/gridarta/model/io/AbstractMapArchObjectParser.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/io/AbstractMapArchObjectParser.java 2010-06-25 21:46:12 UTC (rev 8466) +++ trunk/model/src/app/net/sf/gridarta/model/io/AbstractMapArchObjectParser.java 2010-06-26 05:56:52 UTC (rev 8467) @@ -41,9 +41,23 @@ */ @Override public void load(@NotNull final BufferedReader reader, @NotNull final A mapArchObject) throws IOException { + final String firstLine = reader.readLine(); + if (firstLine == null) { + throw new IOException("unexpected end of file in map header"); + } + + int endPos1 = firstLine.length(); + while (endPos1 > 0 && firstLine.charAt(endPos1 - 1) <= ' ') { + endPos1--; + } + final String trimmedFirstLine = firstLine.substring(0, endPos1); + + if (!trimmedFirstLine.equals("arch map")) { + throw new InvalidMapFormatException("unexpected first line of map file: '" + trimmedFirstLine + "', expected 'arch map'"); + } + int width = 0; int height = 0; - boolean archflag = false; // flag for arch<->end boolean msgflag = false; // flag for map-message while (true) { final String tmp = reader.readLine(); @@ -57,74 +71,65 @@ } final String line = tmp.substring(0, endPos); - if (archflag) { - // we are inside the map arch - if (msgflag) { - // reading the map message: - if (line.equalsIgnoreCase("endmsg")) { - msgflag = false; - } else { - if (mapArchObject.getText().length() > 0) { - mapArchObject.addText("\n"); - } - mapArchObject.addText(line); + // we are inside the map arch + if (msgflag) { + // reading the map message: + if (line.equalsIgnoreCase("endmsg")) { + msgflag = false; + } else { + if (mapArchObject.getText().length() > 0) { + mapArchObject.addText("\n"); } - } else { - if (parseLine(line, mapArchObject)) { - // ignore - } else if (line.equalsIgnoreCase("msg")) { - msgflag = true; - } else if (line.equalsIgnoreCase("end")) { - break; - } else if (line.startsWith("name ")) { - mapArchObject.setMapName(line.substring(5)); - } else if (line.startsWith("width ")) { - width = NumberUtils.parseInt(line.substring(6)); - } else if (line.startsWith("height ")) { - height = NumberUtils.parseInt(line.substring(7)); - } else if (line.startsWith("enter_x ")) { - mapArchObject.setEnterX(NumberUtils.parseInt(line.substring(8))); - } else if (line.startsWith("enter_y ")) { - mapArchObject.setEnterY(NumberUtils.parseInt(line.substring(8))); - } else if (line.startsWith("reset_timeout ")) { - mapArchObject.setResetTimeout(NumberUtils.parseInt(line.substring(14))); - } else if (line.startsWith("swap_time ")) { - mapArchObject.setSwapTime(NumberUtils.parseInt(line.substring(10))); - } else if (line.startsWith("difficulty ")) { - mapArchObject.setDifficulty(NumberUtils.parseInt(line.substring(11))); - } else if (line.startsWith("darkness ")) { - mapArchObject.setDarkness(NumberUtils.parseInt(line.substring(9))); - } else if (line.startsWith("fixed_resettime ")) { - if (NumberUtils.parseInt(line.substring(16)) != 0) { - mapArchObject.setFixedReset(true); - } - } else if (line.startsWith("outdoor ")) { - if (NumberUtils.parseInt(line.substring(8)) != 0) { - mapArchObject.setOutdoor(true); - } - } else if (line.startsWith("tile_path_")) { - // get tile path - try { - final int i = Integer.valueOf(line.substring(10, 11)); - if (i > 0 && i <= Direction.values().length && line.length() >= 12 && line.charAt(11) == ' ') { - mapArchObject.setTilePath(Direction.values()[i - 1], line.substring(12)); - } else { - throw new InvalidMapFormatException("unexpected map attribute: '" + line + "'"); - } - } catch (final NumberFormatException ignored) { - //noinspection ThrowInsideCatchBlockWhichIgnoresCaughtException + mapArchObject.addText(line); + } + } else { + if (parseLine(line, mapArchObject)) { + // ignore + } else if (line.equalsIgnoreCase("msg")) { + msgflag = true; + } else if (line.equalsIgnoreCase("end")) { + break; + } else if (line.startsWith("name ")) { + mapArchObject.setMapName(line.substring(5)); + } else if (line.startsWith("width ")) { + width = NumberUtils.parseInt(line.substring(6)); + } else if (line.startsWith("height ")) { + height = NumberUtils.parseInt(line.substring(7)); + } else if (line.startsWith("enter_x ")) { + mapArchObject.setEnterX(NumberUtils.parseInt(line.substring(8))); + } else if (line.startsWith("enter_y ")) { + mapArchObject.setEnterY(NumberUtils.parseInt(line.substring(8))); + } else if (line.startsWith("reset_timeout ")) { + mapArchObject.setResetTimeout(NumberUtils.parseInt(line.substring(14))); + } else if (line.startsWith("swap_time ")) { + mapArchObject.setSwapTime(NumberUtils.parseInt(line.substring(10))); + } else if (line.startsWith("difficulty ")) { + mapArchObject.setDifficulty(NumberUtils.parseInt(line.substring(11))); + } else if (line.startsWith("darkness ")) { + mapArchObject.setDarkness(NumberUtils.parseInt(line.substring(9))); + } else if (line.startsWith("fixed_resettime ")) { + if (NumberUtils.parseInt(line.substring(16)) != 0) { + mapArchObject.setFixedReset(true); + } + } else if (line.startsWith("outdoor ")) { + if (NumberUtils.parseInt(line.substring(8)) != 0) { + mapArchObject.setOutdoor(true); + } + } else if (line.startsWith("tile_path_")) { + // get tile path + try { + final int i = Integer.valueOf(line.substring(10, 11)); + if (i > 0 && i <= Direction.values().length && line.length() >= 12 && line.charAt(11) == ' ') { + mapArchObject.setTilePath(Direction.values()[i - 1], line.substring(12)); + } else { throw new InvalidMapFormatException("unexpected map attribute: '" + line + "'"); } - } else { + } catch (final NumberFormatException ignored) { + //noinspection ThrowInsideCatchBlockWhichIgnoresCaughtException throw new InvalidMapFormatException("unexpected map attribute: '" + line + "'"); } - } - } else { - // looking for the map arch - if (line.equals("arch map")) { - archflag = true; } else { - throw new InvalidMapFormatException("unexpected first line of map file: '" + line + "', expected 'arch map'"); + throw new InvalidMapFormatException("unexpected map attribute: '" + line + "'"); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-25 21:46:18
|
Revision: 8466 http://gridarta.svn.sourceforge.net/gridarta/?rev=8466&view=rev Author: akirschbaum Date: 2010-06-25 21:46:12 +0000 (Fri, 25 Jun 2010) Log Message: ----------- Add @NotNull annotations. Modified Paths: -------------- trunk/utils/src/app/net/sf/gridarta/utils/ActionBuilderUtils.java Modified: trunk/utils/src/app/net/sf/gridarta/utils/ActionBuilderUtils.java =================================================================== --- trunk/utils/src/app/net/sf/gridarta/utils/ActionBuilderUtils.java 2010-06-25 21:42:34 UTC (rev 8465) +++ trunk/utils/src/app/net/sf/gridarta/utils/ActionBuilderUtils.java 2010-06-25 21:46:12 UTC (rev 8466) @@ -100,7 +100,7 @@ * @return the label */ @NotNull - public static JLabel newLabel(final ActionBuilder actionBuilder, final String key) { + public static JLabel newLabel(@NotNull final ActionBuilder actionBuilder, @NotNull final String key) { return new JLabel(getString(actionBuilder, key)); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-25 21:42:40
|
Revision: 8465 http://gridarta.svn.sourceforge.net/gridarta/?rev=8465&view=rev Author: akirschbaum Date: 2010-06-25 21:42:34 +0000 (Fri, 25 Jun 2010) Log Message: ----------- Remove unused libraries from gridarta module. Modified Paths: -------------- trunk/gridarta.iml Modified: trunk/gridarta.iml =================================================================== --- trunk/gridarta.iml 2010-06-25 21:38:46 UTC (rev 8464) +++ trunk/gridarta.iml 2010-06-25 21:42:34 UTC (rev 8465) @@ -134,42 +134,6 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/bsh-commands-2.0b4.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/bsh-classgen-2.0b4.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-lang-0.1.0.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-swing-extlib-0.1.0.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> <root url="jar://$MODULE_DIR$/lib/java-getopt-1.0.13.jar!/" /> </CLASSES> <JAVADOC /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-25 21:38:53
|
Revision: 8464 http://gridarta.svn.sourceforge.net/gridarta/?rev=8464&view=rev Author: akirschbaum Date: 2010-06-25 21:38:46 +0000 (Fri, 25 Jun 2010) Log Message: ----------- Add nullable annotations. Modified Paths: -------------- trunk/model/src/app/net/sf/gridarta/model/baseobject/GameObjectContainer.java trunk/src/app/net/sf/gridarta/gui/utils/DirectionLayout.java Modified: trunk/model/src/app/net/sf/gridarta/model/baseobject/GameObjectContainer.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/baseobject/GameObjectContainer.java 2010-06-25 21:34:46 UTC (rev 8463) +++ trunk/model/src/app/net/sf/gridarta/model/baseobject/GameObjectContainer.java 2010-06-25 21:38:46 UTC (rev 8464) @@ -116,9 +116,11 @@ return new Iterator<G>() { /** The basic iterator. */ + @NotNull private final Iterator<G> delegate = contents.iterator(); /** Current element (last element returned by {@link #next()}). */ + @Nullable private G current = null; /** {@inheritDoc} */ Modified: trunk/src/app/net/sf/gridarta/gui/utils/DirectionLayout.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/DirectionLayout.java 2010-06-25 21:34:46 UTC (rev 8463) +++ trunk/src/app/net/sf/gridarta/gui/utils/DirectionLayout.java 2010-06-25 21:38:46 UTC (rev 8464) @@ -26,6 +26,7 @@ import java.awt.LayoutManager2; import java.io.Serializable; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** * This class implements a layout that is similar to {@link @@ -50,6 +51,7 @@ * static itself, so referencing this from an enum constructor would be * illegal if this were declared inside the enum. */ + @NotNull private static final Direction[] daimoninToDirectionMap = new Direction[8]; //private static Map<Integer,Direction> daimoninToDirectionMap = new HashMap<Integer,Direction>(); @@ -144,54 +146,63 @@ * NorthWest Component. * @serial include */ + @Nullable private Component cNW = null; /** * North Component. * @serial include */ + @Nullable private Component cN = null; /** * NorthEast Component. * @serial include */ + @Nullable private Component cNE = null; /** * East Component. * @serial include */ + @Nullable private Component cE = null; /** * SouthEast Component. * @serial include */ + @Nullable private Component cSE = null; /** * South Component. * @serial include */ + @Nullable private Component cS = null; /** * SouthWest Component. * @serial include */ + @Nullable private Component cSW = null; /** * West Component. * @serial include */ + @Nullable private Component cW = null; /** * Center Component. * @serial include */ + @Nullable private Component cC = null; /** @@ -248,7 +259,7 @@ */ @SuppressWarnings({ "ChainOfInstanceofChecks" }) @Override - public void addLayoutComponent(final Component comp, final Object constraints) { + public void addLayoutComponent(@NotNull final Component comp, @Nullable final Object constraints) { if (constraints == null) { cC = comp; return; @@ -301,7 +312,7 @@ * {@inheritDoc} */ @Override - public void addLayoutComponent(final String name, final Component comp) { + public void addLayoutComponent(@NotNull final String name, @NotNull final Component comp) { throw new IllegalArgumentException("DirectionLayout does not support String constraints."); } @@ -310,7 +321,7 @@ */ @Override @SuppressWarnings({ "ObjectEquality", "AssignmentToNull" }) - public void removeLayoutComponent(final Component comp) { + public void removeLayoutComponent(@NotNull final Component comp) { synchronized (comp.getTreeLock()) { if (cC == comp) { cC = null; @@ -337,8 +348,9 @@ /** * {@inheritDoc} */ + @NotNull @Override - public Dimension minimumLayoutSize(final Container parent) { + public Dimension minimumLayoutSize(@NotNull final Container parent) { synchronized (parent.getTreeLock()) { final Dimension dim = new Dimension(0, 0); // return dimension final Dimension empty = new Dimension(0, 0); // fallback if null component @@ -363,6 +375,7 @@ /** * {@inheritDoc} */ + @NotNull @Override public Dimension preferredLayoutSize(final Container parent) { synchronized (parent.getTreeLock()) { @@ -389,8 +402,9 @@ /** * {@inheritDoc} */ + @NotNull @Override - public Dimension maximumLayoutSize(final Container target) { + public Dimension maximumLayoutSize(@NotNull final Container target) { return new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE); } @@ -398,7 +412,7 @@ * {@inheritDoc} */ @Override - public float getLayoutAlignmentX(final Container target) { + public float getLayoutAlignmentX(@NotNull final Container target) { return 0.5f; } @@ -406,7 +420,7 @@ * {@inheritDoc} */ @Override - public float getLayoutAlignmentY(final Container target) { + public float getLayoutAlignmentY(@NotNull final Container target) { return 0.5f; } @@ -414,7 +428,7 @@ * {@inheritDoc} */ @Override - public void invalidateLayout(final Container target) { + public void invalidateLayout(@NotNull final Container target) { /* Do Nothing, like BorderLayout. */ } @@ -422,7 +436,7 @@ * {@inheritDoc} */ @Override - public void layoutContainer(final Container parent) { + public void layoutContainer(@NotNull final Container parent) { synchronized (parent.getTreeLock()) { final Dimension size = parent.getSize(); final Insets padding = parent.getInsets(); @@ -494,6 +508,7 @@ /** * {@inheritDoc} */ + @NotNull @Override public String toString() { return getClass().getName() + "[hGap=" + hGap + ",vGap=" + vGap + ']'; @@ -507,7 +522,7 @@ * @return maximum of numbers, which is {@link Integer#MIN_VALUE} in case no * number was supplied. */ - private static int max(final int... numbers) { + private static int max(@NotNull final int... numbers) { int ret = Integer.MIN_VALUE; for (final int number : numbers) { if (number > ret) { @@ -522,6 +537,7 @@ * @param daimoninDirection direction from Daimonin * @return Direction enum for <var>daimoninDirection</var> */ + @NotNull private static Direction getDirectionFromDaimonin(final int daimoninDirection) { return daimoninToDirectionMap[daimoninDirection]; //return daimoninToDirectionMap.get(daimoninDirection); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-25 21:34:52
|
Revision: 8463 http://gridarta.svn.sourceforge.net/gridarta/?rev=8463&view=rev Author: akirschbaum Date: 2010-06-25 21:34:46 +0000 (Fri, 25 Jun 2010) Log Message: ----------- Explicitly initialize fields. Modified Paths: -------------- trunk/model/src/app/net/sf/gridarta/model/baseobject/GameObjectContainer.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/DialogAttributeBitmask.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java trunk/src/app/net/sf/gridarta/gui/map/tools/DeletionTool.java trunk/src/app/net/sf/gridarta/gui/scripts/DefaultScriptArchEditor.java trunk/src/app/net/sf/gridarta/gui/utils/DirectionLayout.java trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/InputHandler.java trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/tokenmarker/HTMLTokenMarker.java Modified: trunk/model/src/app/net/sf/gridarta/model/baseobject/GameObjectContainer.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/baseobject/GameObjectContainer.java 2010-06-25 21:29:58 UTC (rev 8462) +++ trunk/model/src/app/net/sf/gridarta/model/baseobject/GameObjectContainer.java 2010-06-25 21:34:46 UTC (rev 8463) @@ -119,7 +119,7 @@ private final Iterator<G> delegate = contents.iterator(); /** Current element (last element returned by {@link #next()}). */ - private G current; + private G current = null; /** {@inheritDoc} */ @Override Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/DialogAttributeBitmask.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/DialogAttributeBitmask.java 2010-06-25 21:29:58 UTC (rev 8462) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/DialogAttributeBitmask.java 2010-06-25 21:34:46 UTC (rev 8463) @@ -54,7 +54,7 @@ /** * Active bitmask value. */ - private int value; + private int value = 0; /** * Reference to the bitmask data. Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java 2010-06-25 21:29:58 UTC (rev 8462) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java 2010-06-25 21:34:46 UTC (rev 8463) @@ -1537,7 +1537,7 @@ * The latest deselected item. */ @Nullable - private String deselected; + private String deselected = null; /** * While <code>true</code>, this listener ignores all events. Modified: trunk/src/app/net/sf/gridarta/gui/map/tools/DeletionTool.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/tools/DeletionTool.java 2010-06-25 21:29:58 UTC (rev 8462) +++ trunk/src/app/net/sf/gridarta/gui/map/tools/DeletionTool.java 2010-06-25 21:34:46 UTC (rev 8463) @@ -161,17 +161,17 @@ /** * Whether "ignore walls" is enabled. */ - private boolean deletionToolExceptionsIgnoreWalls; + private boolean deletionToolExceptionsIgnoreWalls = false; /** * Whether "ignore floors" is enabled. */ - private boolean deletionToolExceptionsIgnoreFloors; + private boolean deletionToolExceptionsIgnoreFloors = false; /** * Whether "ignore monsters" is enabled. */ - private boolean deletionToolExceptionsIgnoreMonsters; + private boolean deletionToolExceptionsIgnoreMonsters = false; /** * The {@link JComboBox} for selecting the objects to delete. Modified: trunk/src/app/net/sf/gridarta/gui/scripts/DefaultScriptArchEditor.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/scripts/DefaultScriptArchEditor.java 2010-06-25 21:29:58 UTC (rev 8462) +++ trunk/src/app/net/sf/gridarta/gui/scripts/DefaultScriptArchEditor.java 2010-06-25 21:34:46 UTC (rev 8463) @@ -120,7 +120,7 @@ // popup frame for new scripts: @Nullable - private JDialog newScriptFrame; + private JDialog newScriptFrame = null; @NotNull private JLabel headingLabel; Modified: trunk/src/app/net/sf/gridarta/gui/utils/DirectionLayout.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/DirectionLayout.java 2010-06-25 21:29:58 UTC (rev 8462) +++ trunk/src/app/net/sf/gridarta/gui/utils/DirectionLayout.java 2010-06-25 21:34:46 UTC (rev 8463) @@ -144,55 +144,55 @@ * NorthWest Component. * @serial include */ - private Component cNW; + private Component cNW = null; /** * North Component. * @serial include */ - private Component cN; + private Component cN = null; /** * NorthEast Component. * @serial include */ - private Component cNE; + private Component cNE = null; /** * East Component. * @serial include */ - private Component cE; + private Component cE = null; /** * SouthEast Component. * @serial include */ - private Component cSE; + private Component cSE = null; /** * South Component. * @serial include */ - private Component cS; + private Component cS = null; /** * SouthWest Component. * @serial include */ - private Component cSW; + private Component cSW = null; /** * West Component. * @serial include */ - private Component cW; + private Component cW = null; /** * Center Component. * @serial include */ - private Component cC; + private Component cC = null; /** * Creates a DirectionLayout with zero gaps. Modified: trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/InputHandler.java =================================================================== --- trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/InputHandler.java 2010-06-25 21:29:58 UTC (rev 8462) +++ trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/InputHandler.java 2010-06-25 21:34:46 UTC (rev 8463) @@ -40,11 +40,11 @@ private static final Category log = Logger.getLogger(InputHandler.class); @Nullable - protected ActionListener grabAction; + protected ActionListener grabAction = null; - private boolean repeat; + private boolean repeat = false; - protected int repeatCount; + protected int repeatCount = 0; /** * Adds the default key bindings to this input handler. This should not be Modified: trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/tokenmarker/HTMLTokenMarker.java =================================================================== --- trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/tokenmarker/HTMLTokenMarker.java 2010-06-25 21:29:58 UTC (rev 8462) +++ trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/tokenmarker/HTMLTokenMarker.java 2010-06-25 21:34:46 UTC (rev 8463) @@ -26,9 +26,9 @@ private final boolean js; - private int lastOffset; + private int lastOffset = 0; - private int lastKeyword; + private int lastKeyword = 0; public HTMLTokenMarker() { this(true); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-25 21:30:07
|
Revision: 8462 http://gridarta.svn.sourceforge.net/gridarta/?rev=8462&view=rev Author: akirschbaum Date: 2010-06-25 21:29:58 +0000 (Fri, 25 Jun 2010) Log Message: ----------- Remove raw types. Modified Paths: -------------- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/archetype/ArchetypeParser.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/resource/CollectedResourcesReader.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/resource/FilesResourcesReader.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/resource/CollectedResourcesReader.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/resource/FilesResourcesReader.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/archetype/ArchetypeParser.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/resource/CollectedResourcesReader.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/resource/FilesResourcesReader.java trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeParser.java trunk/model/src/app/net/sf/gridarta/model/io/AnimationObjectsReader.java trunk/model/src/app/net/sf/gridarta/model/resource/AbstractFilesResourcesReader.java trunk/model/src/app/net/sf/gridarta/model/resource/AbstractResourcesReader.java trunk/model/src/test/net/sf/gridarta/model/archetype/TestArchetypeParser.java trunk/model/src/test/net/sf/gridarta/model/resource/TestFilesResourcesReader.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialogFactory.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/FaceTab.java trunk/src/app/net/sf/gridarta/gui/utils/AnimationComponent.java Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/archetype/ArchetypeParser.java =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/archetype/ArchetypeParser.java 2010-06-25 21:17:43 UTC (rev 8461) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/archetype/ArchetypeParser.java 2010-06-25 21:29:58 UTC (rev 8462) @@ -78,7 +78,7 @@ * @param multiPositionData the multi position data to query for multi-part * objects */ - public ArchetypeParser(@NotNull final GameObjectParser<GameObject, MapArchObject, Archetype> gameObjectParser, @NotNull final AnimationObjects animationObjects, @NotNull final ArchetypeSet<GameObject, MapArchObject, Archetype> archetypeSet, @NotNull final GameObjectFactory<GameObject, MapArchObject, Archetype> gameObjectFactory, @NotNull final MultiPositionData multiPositionData) { + public ArchetypeParser(@NotNull final GameObjectParser<GameObject, MapArchObject, Archetype> gameObjectParser, @NotNull final AnimationObjects<GameObject, MapArchObject, Archetype> animationObjects, @NotNull final ArchetypeSet<GameObject, MapArchObject, Archetype> archetypeSet, @NotNull final GameObjectFactory<GameObject, MapArchObject, Archetype> gameObjectFactory, @NotNull final MultiPositionData multiPositionData) { super(new DefaultArchetypeBuilder(gameObjectFactory), animationObjects, archetypeSet); this.gameObjectParser = gameObjectParser; this.multiPositionData = multiPositionData; Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/resource/CollectedResourcesReader.java =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/resource/CollectedResourcesReader.java 2010-06-25 21:17:43 UTC (rev 8461) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/resource/CollectedResourcesReader.java 2010-06-25 21:29:58 UTC (rev 8462) @@ -80,7 +80,7 @@ * The {@link FaceObjects} instance. */ @NotNull - private final FaceObjects faceObjects; + private final FaceObjects<GameObject, MapArchObject, Archetype> faceObjects; /** * Creates a new instance. @@ -90,7 +90,7 @@ * @param faceObjects the face objects instance * @param animationObjects the animation objects instance */ - public CollectedResourcesReader(@NotNull final File collectedDirectory, @NotNull final ArchetypeSet<GameObject, MapArchObject, Archetype> archetypeSet, @NotNull final AbstractArchetypeParser<GameObject, MapArchObject, Archetype, ?> archetypeParser, @NotNull final FaceObjects faceObjects, @NotNull final AnimationObjects animationObjects) { + public CollectedResourcesReader(@NotNull final File collectedDirectory, @NotNull final ArchetypeSet<GameObject, MapArchObject, Archetype> archetypeSet, @NotNull final AbstractArchetypeParser<GameObject, MapArchObject, Archetype, ?> archetypeParser, @NotNull final FaceObjects<GameObject, MapArchObject, Archetype> faceObjects, @NotNull final AnimationObjects<GameObject, MapArchObject, Archetype> animationObjects) { super(collectedDirectory, null, animationObjects, faceObjects); this.collectedDirectory = collectedDirectory; this.archetypeSet = archetypeSet; Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/resource/FilesResourcesReader.java =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/resource/FilesResourcesReader.java 2010-06-25 21:17:43 UTC (rev 8461) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/resource/FilesResourcesReader.java 2010-06-25 21:29:58 UTC (rev 8462) @@ -62,7 +62,7 @@ * @param animationObjects the animation objects instance * @param archFaceProvider the arch face provider to use */ - public FilesResourcesReader(@NotNull final File archDirectory, @NotNull final File collectedDirectory, @NotNull final ArchetypeSet<GameObject, MapArchObject, Archetype> archetypeSet, @NotNull final AbstractArchetypeParser<GameObject, MapArchObject, Archetype, ?> archetypeParser, @NotNull final FaceObjects faceObjects, @NotNull final AnimationObjects animationObjects, @NotNull final ArchFaceProvider archFaceProvider) { + public FilesResourcesReader(@NotNull final File archDirectory, @NotNull final File collectedDirectory, @NotNull final ArchetypeSet<GameObject, MapArchObject, Archetype> archetypeSet, @NotNull final AbstractArchetypeParser<GameObject, MapArchObject, Archetype, ?> archetypeParser, @NotNull final FaceObjects<GameObject, MapArchObject, Archetype> faceObjects, @NotNull final AnimationObjects<GameObject, MapArchObject, Archetype> animationObjects, @NotNull final ArchFaceProvider archFaceProvider) { super(archDirectory, archetypeSet, archetypeParser, archFaceProvider, collectedDirectory, null, animationObjects, faceObjects); this.archDirectory = archDirectory; this.archFaceProvider = archFaceProvider; Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/resource/CollectedResourcesReader.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/resource/CollectedResourcesReader.java 2010-06-25 21:17:43 UTC (rev 8461) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/resource/CollectedResourcesReader.java 2010-06-25 21:29:58 UTC (rev 8462) @@ -88,7 +88,7 @@ * The face objects to update. */ @NotNull - private final FaceObjects faceObjects; + private final FaceObjects<GameObject, MapArchObject, Archetype> faceObjects; /** * The smooth faces to update. @@ -106,7 +106,7 @@ * @param animationObjects the animation objects instance * @param smoothFaces the smooth faces to update */ - public CollectedResourcesReader(@NotNull final File configurationDirectory, @NotNull final File collectedDirectory, @NotNull final ArchetypeSet<GameObject, MapArchObject, Archetype> archetypeSet, @NotNull final AbstractArchetypeParser<GameObject, MapArchObject, Archetype, ?> archetypeParser, @NotNull final FaceObjects faceObjects, @NotNull final AnimationObjects animationObjects, @NotNull final SmoothFaces smoothFaces) { + public CollectedResourcesReader(@NotNull final File configurationDirectory, @NotNull final File collectedDirectory, @NotNull final ArchetypeSet<GameObject, MapArchObject, Archetype> archetypeSet, @NotNull final AbstractArchetypeParser<GameObject, MapArchObject, Archetype, ?> archetypeParser, @NotNull final FaceObjects<GameObject, MapArchObject, Archetype> faceObjects, @NotNull final AnimationObjects<GameObject, MapArchObject, Archetype> animationObjects, @NotNull final SmoothFaces smoothFaces) { super(collectedDirectory, archetypeSet.getImageSet(), animationObjects, faceObjects); this.configurationDirectory = configurationDirectory; this.collectedDirectory = collectedDirectory; Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/resource/FilesResourcesReader.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/resource/FilesResourcesReader.java 2010-06-25 21:17:43 UTC (rev 8461) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/resource/FilesResourcesReader.java 2010-06-25 21:29:58 UTC (rev 8462) @@ -47,7 +47,7 @@ * @param animationObjects the animation objects instance * @param archFaceProvider the arch face provider to use */ - public FilesResourcesReader(@NotNull final File archDirectory, @NotNull final File collectedDirectory, @NotNull final ArchetypeSet<GameObject, MapArchObject, Archetype> archetypeSet, @NotNull final AbstractArchetypeParser<GameObject, MapArchObject, Archetype, ?> archetypeParser, @NotNull final FaceObjects faceObjects, @NotNull final AnimationObjects animationObjects, @NotNull final ArchFaceProvider archFaceProvider) { + public FilesResourcesReader(@NotNull final File archDirectory, @NotNull final File collectedDirectory, @NotNull final ArchetypeSet<GameObject, MapArchObject, Archetype> archetypeSet, @NotNull final AbstractArchetypeParser<GameObject, MapArchObject, Archetype, ?> archetypeParser, @NotNull final FaceObjects<GameObject, MapArchObject, Archetype> faceObjects, @NotNull final AnimationObjects<GameObject, MapArchObject, Archetype> animationObjects, @NotNull final ArchFaceProvider archFaceProvider) { super(archDirectory, archetypeSet, archetypeParser, archFaceProvider, collectedDirectory, archetypeSet.getImageSet(), animationObjects, faceObjects); } Modified: trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/archetype/ArchetypeParser.java =================================================================== --- trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/archetype/ArchetypeParser.java 2010-06-25 21:17:43 UTC (rev 8461) +++ trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/archetype/ArchetypeParser.java 2010-06-25 21:29:58 UTC (rev 8462) @@ -69,7 +69,7 @@ * @param multiPositionData the multi position data to query for multi-part * objects */ - public ArchetypeParser(@NotNull final AnimationObjects animationObjects, @NotNull final ArchetypeSet<GameObject, MapArchObject, Archetype> archetypeSet, @NotNull final GameObjectFactory<GameObject, MapArchObject, Archetype> gameObjectFactory, @NotNull final MultiPositionData multiPositionData) { + public ArchetypeParser(@NotNull final AnimationObjects<GameObject, MapArchObject, Archetype> animationObjects, @NotNull final ArchetypeSet<GameObject, MapArchObject, Archetype> archetypeSet, @NotNull final GameObjectFactory<GameObject, MapArchObject, Archetype> gameObjectFactory, @NotNull final MultiPositionData multiPositionData) { super(new DefaultArchetypeBuilder(gameObjectFactory), animationObjects, archetypeSet); this.multiPositionData = multiPositionData; } Modified: trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/resource/CollectedResourcesReader.java =================================================================== --- trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/resource/CollectedResourcesReader.java 2010-06-25 21:17:43 UTC (rev 8461) +++ trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/resource/CollectedResourcesReader.java 2010-06-25 21:29:58 UTC (rev 8462) @@ -80,7 +80,7 @@ * The {@link FaceObjects} instance. */ @NotNull - private final FaceObjects faceObjects; + private final FaceObjects<GameObject, MapArchObject, Archetype> faceObjects; /** * Creates a new instance. @@ -90,7 +90,7 @@ * @param faceObjects the face objects instance * @param animationObjects the animation objects instance */ - public CollectedResourcesReader(@NotNull final File collectedDirectory, @NotNull final ArchetypeSet<GameObject, MapArchObject, Archetype> archetypeSet, @NotNull final AbstractArchetypeParser<GameObject, MapArchObject, Archetype, ?> archetypeParser, @NotNull final FaceObjects faceObjects, @NotNull final AnimationObjects animationObjects) { + public CollectedResourcesReader(@NotNull final File collectedDirectory, @NotNull final ArchetypeSet<GameObject, MapArchObject, Archetype> archetypeSet, @NotNull final AbstractArchetypeParser<GameObject, MapArchObject, Archetype, ?> archetypeParser, @NotNull final FaceObjects<GameObject, MapArchObject, Archetype> faceObjects, @NotNull final AnimationObjects<GameObject, MapArchObject, Archetype> animationObjects) { super(collectedDirectory, null, animationObjects, faceObjects); this.collectedDirectory = collectedDirectory; this.archetypeSet = archetypeSet; Modified: trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/resource/FilesResourcesReader.java =================================================================== --- trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/resource/FilesResourcesReader.java 2010-06-25 21:17:43 UTC (rev 8461) +++ trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/resource/FilesResourcesReader.java 2010-06-25 21:29:58 UTC (rev 8462) @@ -62,7 +62,7 @@ * @param animationObjects the animation objects instance * @param archFaceProvider the arch face provider to use */ - public FilesResourcesReader(@NotNull final File archDirectory, @NotNull final File collectedDirectory, @NotNull final ArchetypeSet<GameObject, MapArchObject, Archetype> archetypeSet, @NotNull final AbstractArchetypeParser<GameObject, MapArchObject, Archetype, ?> archetypeParser, @NotNull final FaceObjects faceObjects, @NotNull final AnimationObjects animationObjects, @NotNull final ArchFaceProvider archFaceProvider) { + public FilesResourcesReader(@NotNull final File archDirectory, @NotNull final File collectedDirectory, @NotNull final ArchetypeSet<GameObject, MapArchObject, Archetype> archetypeSet, @NotNull final AbstractArchetypeParser<GameObject, MapArchObject, Archetype, ?> archetypeParser, @NotNull final FaceObjects<GameObject, MapArchObject, Archetype> faceObjects, @NotNull final AnimationObjects<GameObject, MapArchObject, Archetype> animationObjects, @NotNull final ArchFaceProvider archFaceProvider) { super(archDirectory, archetypeSet, archetypeParser, archFaceProvider, collectedDirectory, null, animationObjects, faceObjects); this.archDirectory = archDirectory; this.archFaceProvider = archFaceProvider; Modified: trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeParser.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeParser.java 2010-06-25 21:17:43 UTC (rev 8461) +++ trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeParser.java 2010-06-25 21:29:58 UTC (rev 8462) @@ -55,7 +55,7 @@ /** * The animation objects instance. */ - private final AnimationObjects animationObjects; + private final AnimationObjects<G, A, R> animationObjects; /** * The {@link ArchetypeSet} to use. @@ -69,7 +69,7 @@ * @param animationObjects the animation objects instance to use * @param archetypeSet the archetype set */ - protected AbstractArchetypeParser(@NotNull final B archetypeBuilder, @NotNull final AnimationObjects animationObjects, @NotNull final ArchetypeSet<G, A, R> archetypeSet) { + protected AbstractArchetypeParser(@NotNull final B archetypeBuilder, @NotNull final AnimationObjects<G, A, R> animationObjects, @NotNull final ArchetypeSet<G, A, R> archetypeSet) { this.archetypeBuilder = archetypeBuilder; this.animationObjects = animationObjects; this.archetypeSet = archetypeSet; Modified: trunk/model/src/app/net/sf/gridarta/model/io/AnimationObjectsReader.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/io/AnimationObjectsReader.java 2010-06-25 21:17:43 UTC (rev 8461) +++ trunk/model/src/app/net/sf/gridarta/model/io/AnimationObjectsReader.java 2010-06-25 21:29:58 UTC (rev 8462) @@ -65,7 +65,7 @@ * @throws AnimationParseException in case parsing the animation reveals * errors */ - public static void loadAnimations(@NotNull final AnimationObjects animationObjects, @NotNull final ErrorViewCollector errorViewCollector, @NotNull final String path, @NotNull final File animFile, @NotNull final String startKey, final boolean ignoreOtherText) throws IOException, AnimationParseException { + public static void loadAnimations(@NotNull final AnimationObjects<?, ?, ?> animationObjects, @NotNull final ErrorViewCollector errorViewCollector, @NotNull final String path, @NotNull final File animFile, @NotNull final String startKey, final boolean ignoreOtherText) throws IOException, AnimationParseException { final FileInputStream fileInputStream = new FileInputStream(animFile); try { final Reader inputStreamReader = new InputStreamReader(fileInputStream, IOUtils.MAP_ENCODING); @@ -100,7 +100,7 @@ * errors * @throws IOException in case of I/O errors */ - public static void loadAnimations(@NotNull final AnimationObjects animationObjects, @NotNull final ErrorViewCollector errorViewCollector, final Reader reader, @NotNull final String startKey, final boolean ignoreOtherText, @Nullable final String path, @Nullable final Map<String, String> animations) throws AnimationParseException, IOException { + public static void loadAnimations(@NotNull final AnimationObjects<?, ?, ?> animationObjects, @NotNull final ErrorViewCollector errorViewCollector, final Reader reader, @NotNull final String startKey, final boolean ignoreOtherText, @Nullable final String path, @Nullable final Map<String, String> animations) throws AnimationParseException, IOException { if (path == null && animations == null) { throw new IllegalArgumentException(); } @@ -151,7 +151,7 @@ * errors * @throws IOException in case of I/O errors */ - private static int processAnimation(@NotNull final String animName, final int startLineNumber, @NotNull final BufferedReader in, @NotNull final String startKey, @NotNull final AnimationObjects animationObjects, @NotNull final ErrorViewCollector errorViewCollector, @Nullable final String path, @Nullable final Map<String, String> animations) throws AnimationParseException, IOException { + private static int processAnimation(@NotNull final String animName, final int startLineNumber, @NotNull final BufferedReader in, @NotNull final String startKey, @NotNull final AnimationObjects<?, ?, ?> animationObjects, @NotNull final ErrorViewCollector errorViewCollector, @Nullable final String path, @Nullable final Map<String, String> animations) throws AnimationParseException, IOException { int lineNumber = startLineNumber; final StringBuilder animText = new StringBuilder(); while (true) { @@ -187,7 +187,7 @@ * @param animName the name of this animation * @param animText the contents of the anim..mina block without comments */ - private static void processAnimationLine(@NotNull final AnimationObjects animationObjects, @NotNull final ErrorViewCollector errorViewCollector, @Nullable final String path, @Nullable final Map<String, String> animations, @NotNull final String animName, @NotNull final String animText) { + private static void processAnimationLine(@NotNull final AnimationObjects<?, ?, ?> animationObjects, @NotNull final ErrorViewCollector errorViewCollector, @Nullable final String path, @Nullable final Map<String, String> animations, @NotNull final String animName, @NotNull final String animText) { if (path == null && animations == null) { throw new IllegalArgumentException(); } Modified: trunk/model/src/app/net/sf/gridarta/model/resource/AbstractFilesResourcesReader.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/resource/AbstractFilesResourcesReader.java 2010-06-25 21:17:43 UTC (rev 8461) +++ trunk/model/src/app/net/sf/gridarta/model/resource/AbstractFilesResourcesReader.java 2010-06-25 21:29:58 UTC (rev 8462) @@ -84,7 +84,7 @@ * The {@link AnimationObjects} to use. */ @NotNull - private final AnimationObjects animationObjects; + private final AnimationObjects<G, A, R> animationObjects; /** * The {@link ArchFaceProvider} to use. @@ -103,7 +103,7 @@ * @param animationObjects the animation objects instance * @param faceObjects the face objects instance */ - protected AbstractFilesResourcesReader(@NotNull final File archDirectory, @NotNull final ArchetypeSet<G, A, R> archetypeSet, @NotNull final AbstractArchetypeParser<G, A, R, ?> archetypeParser, @NotNull final ArchFaceProvider archFaceProvider, @NotNull final File collectedDirectory, @Nullable final String imageSet, @NotNull final AnimationObjects animationObjects, @NotNull final FaceObjects faceObjects) { + protected AbstractFilesResourcesReader(@NotNull final File archDirectory, @NotNull final ArchetypeSet<G, A, R> archetypeSet, @NotNull final AbstractArchetypeParser<G, A, R, ?> archetypeParser, @NotNull final ArchFaceProvider archFaceProvider, @NotNull final File collectedDirectory, @Nullable final String imageSet, @NotNull final AnimationObjects<G, A, R> animationObjects, @NotNull final FaceObjects<G, A, R> faceObjects) { super(collectedDirectory, imageSet, animationObjects, faceObjects); this.archDirectory = archDirectory; this.archetypeSet = archetypeSet; Modified: trunk/model/src/app/net/sf/gridarta/model/resource/AbstractResourcesReader.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/resource/AbstractResourcesReader.java 2010-06-25 21:17:43 UTC (rev 8461) +++ trunk/model/src/app/net/sf/gridarta/model/resource/AbstractResourcesReader.java 2010-06-25 21:29:58 UTC (rev 8462) @@ -88,13 +88,13 @@ * The animation objects instance. */ @NotNull - private final AnimationObjects animationObjects; + private final AnimationObjects<G, A, R> animationObjects; /** * The face objects instance. */ @NotNull - private final FaceObjects faceObjects; + private final FaceObjects<G, A, R> faceObjects; /** * Creates a new instance. @@ -103,7 +103,7 @@ * @param animationObjects the animation objects instance * @param faceObjects the face objects instance */ - protected AbstractResourcesReader(@NotNull final File collectedDirectory, @Nullable final String imageSet, @NotNull final AnimationObjects animationObjects, @NotNull final FaceObjects faceObjects) { + protected AbstractResourcesReader(@NotNull final File collectedDirectory, @Nullable final String imageSet, @NotNull final AnimationObjects<G, A, R> animationObjects, @NotNull final FaceObjects<G, A, R> faceObjects) { this.collectedDirectory = collectedDirectory; this.imageSet = imageSet; this.animationObjects = animationObjects; Modified: trunk/model/src/test/net/sf/gridarta/model/archetype/TestArchetypeParser.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/archetype/TestArchetypeParser.java 2010-06-25 21:17:43 UTC (rev 8461) +++ trunk/model/src/test/net/sf/gridarta/model/archetype/TestArchetypeParser.java 2010-06-25 21:29:58 UTC (rev 8462) @@ -41,7 +41,7 @@ * @param animationObjects the animation objects instance to use * @param archetypeSet the archetype set */ - public TestArchetypeParser(@NotNull final TestArchetypeBuilder archetypeBuilder, @NotNull final AnimationObjects animationObjects, @NotNull final ArchetypeSet<TestGameObject, TestMapArchObject, TestArchetype> archetypeSet) { + public TestArchetypeParser(@NotNull final TestArchetypeBuilder archetypeBuilder, @NotNull final AnimationObjects<TestGameObject, TestMapArchObject, TestArchetype> animationObjects, @NotNull final ArchetypeSet<TestGameObject, TestMapArchObject, TestArchetype> archetypeSet) { super(archetypeBuilder, animationObjects, archetypeSet); } Modified: trunk/model/src/test/net/sf/gridarta/model/resource/TestFilesResourcesReader.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/resource/TestFilesResourcesReader.java 2010-06-25 21:17:43 UTC (rev 8461) +++ trunk/model/src/test/net/sf/gridarta/model/resource/TestFilesResourcesReader.java 2010-06-25 21:29:58 UTC (rev 8462) @@ -48,7 +48,7 @@ * @param animationObjects the animation objects instance * @param faceObjects the face objects instance */ - public TestFilesResourcesReader(@NotNull final File archDirectory, @NotNull final ArchetypeSet<TestGameObject, TestMapArchObject, TestArchetype> archetypeSet, @NotNull final AbstractArchetypeParser<TestGameObject, TestMapArchObject, TestArchetype, ?> archetypeParser, @NotNull final ArchFaceProvider archFaceProvider, @NotNull final File collectedDirectory, @Nullable final String imageSet, @NotNull final AnimationObjects animationObjects, @NotNull final FaceObjects faceObjects) { + public TestFilesResourcesReader(@NotNull final File archDirectory, @NotNull final ArchetypeSet<TestGameObject, TestMapArchObject, TestArchetype> archetypeSet, @NotNull final AbstractArchetypeParser<TestGameObject, TestMapArchObject, TestArchetype, ?> archetypeParser, @NotNull final ArchFaceProvider archFaceProvider, @NotNull final File collectedDirectory, @Nullable final String imageSet, @NotNull final AnimationObjects<TestGameObject, TestMapArchObject, TestArchetype> animationObjects, @NotNull final FaceObjects<TestGameObject, TestMapArchObject, TestArchetype> faceObjects) { super(archDirectory, archetypeSet, archetypeParser, archFaceProvider, collectedDirectory, imageSet, animationObjects, faceObjects); } Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java 2010-06-25 21:17:43 UTC (rev 8461) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java 2010-06-25 21:29:58 UTC (rev 8462) @@ -215,7 +215,7 @@ * @serial */ @NotNull - private final AnimationObjects animationObjects; + private final AnimationObjects<G, A, R> animationObjects; /** * The {@link GlobalSettings} instance. @@ -240,7 +240,7 @@ * @serial */ @NotNull - private final FaceObjects faceObjects; + private final FaceObjects<G, A, R> faceObjects; /** * The game object spells to use. @@ -824,7 +824,7 @@ * @param textAreaDefaults the text area defaults for text fields * @param mapManager the map manager instance */ - public GameObjectAttributesDialog(@NotNull final GameObjectAttributesDialogFactory<G, A, R> gameObjectAttributesDialogFactory, final ArchetypeTypeSet archetypeTypeSet, @NotNull final G gameObject, @NotNull final JFrame parent, @NotNull final CFTreasureListTree<G, A, R> treasureListTree, @NotNull final FaceObjectProviders faceObjectProviders, @NotNull final AnimationObjects animationObjects, @NotNull final GlobalSettings globalSettings, @NotNull final FileFilter mapFileFilter, @NotNull final FileFilter scriptFileFilter, @NotNull final FaceObjects faceObjects, @NotNull final Spells<GameObjectSpell<G, A, R>> gameObjectSpells, @NotNull final Spells<NumberSpell> numberSpells, final int undefinedSpellIndex, @NotNull final TreasureTree treasureTree, @NotNull final ImageIcon noFaceSquareIcon, @NotNull final ImageIcon unknownSquareIcon, @NotNull final GameObjectMatchers gameObjectMatchers, @NotNull final TextAreaDefaults textAreaDefaults, @NotNull final MapManager<G, A, R> mapManager) { + public GameObjectAttributesDialog(@NotNull final GameObjectAttributesDialogFactory<G, A, R> gameObjectAttributesDialogFactory, final ArchetypeTypeSet archetypeTypeSet, @NotNull final G gameObject, @NotNull final JFrame parent, @NotNull final CFTreasureListTree<G, A, R> treasureListTree, @NotNull final FaceObjectProviders faceObjectProviders, @NotNull final AnimationObjects<G, A, R> animationObjects, @NotNull final GlobalSettings globalSettings, @NotNull final FileFilter mapFileFilter, @NotNull final FileFilter scriptFileFilter, @NotNull final FaceObjects<G, A, R> faceObjects, @NotNull final Spells<GameObjectSpell<G, A, R>> gameObjectSpells, @NotNull final Spells<NumberSpell> numberSpells, final int undefinedSpellIndex, @NotNull final TreasureTree treasureTree, @NotNull final ImageIcon noFaceSquareIcon, @NotNull final ImageIcon unknownSquareIcon, @NotNull final GameObjectMatchers gameObjectMatchers, @NotNull final TextAreaDefaults textAreaDefaults, @NotNull final MapManager<G, A, R> mapManager) { this.gameObjectAttributesDialogFactory = gameObjectAttributesDialogFactory; this.archetypeTypeSet = archetypeTypeSet; this.gameObject = gameObject; @@ -962,7 +962,7 @@ * @return Face for the supplied GameObject. */ @NotNull - private ImageIcon getFace(@NotNull final BaseObject<?, ?, ?, ?> gameObject) { + private ImageIcon getFace(@NotNull final BaseObject<G, A, R, ?> gameObject) { return faceObjectProviders.getFace(gameObject); } Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialogFactory.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialogFactory.java 2010-06-25 21:17:43 UTC (rev 8461) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialogFactory.java 2010-06-25 21:29:58 UTC (rev 8462) @@ -87,7 +87,7 @@ * The {@link AnimationObjects} instance for choosing animation names. */ @NotNull - private final AnimationObjects animationObjects; + private final AnimationObjects<G, A, R> animationObjects; /** * The {@link GlobalSettings} instance. @@ -111,7 +111,7 @@ * The {@link FaceObjects} instance for choosing face names. */ @NotNull - private final FaceObjects faceObjects; + private final FaceObjects<G, A, R> faceObjects; /** * The game object spells to use. @@ -188,7 +188,7 @@ * @param gameObjectMatchers the game object matchers to use * @param mapManager the map manager instance */ - public GameObjectAttributesDialogFactory(@NotNull final ArchetypeTypeSet archetypeTypeSet, @NotNull final JFrame parent, @NotNull final CFTreasureListTree<G, A, R> treasureListTree, @NotNull final FaceObjectProviders faceObjectProviders, @NotNull final AnimationObjects animationObjects, @NotNull final GlobalSettings globalSettings, @NotNull final FileFilter mapFileFilter, @NotNull final FileFilter scriptFileFilter, @NotNull final FaceObjects faceObjects, @NotNull final Spells<GameObjectSpell<G, A, R>> gameObjectSpells, @NotNull final Spells<NumberSpell> numberSpells, final int undefinedSpellIndex, @NotNull final TreasureTree treasureTree, @NotNull final ImageIcon noFaceSquareIcon, @NotNull final ImageIcon unknownSquareIcon, @NotNull final GameObjectMatchers gameObjectMatchers, @NotNull final MapManager<G, A, R> mapManager) { + public GameObjectAttributesDialogFactory(@NotNull final ArchetypeTypeSet archetypeTypeSet, @NotNull final JFrame parent, @NotNull final CFTreasureListTree<G, A, R> treasureListTree, @NotNull final FaceObjectProviders faceObjectProviders, @NotNull final AnimationObjects<G, A, R> animationObjects, @NotNull final GlobalSettings globalSettings, @NotNull final FileFilter mapFileFilter, @NotNull final FileFilter scriptFileFilter, @NotNull final FaceObjects<G, A, R> faceObjects, @NotNull final Spells<GameObjectSpell<G, A, R>> gameObjectSpells, @NotNull final Spells<NumberSpell> numberSpells, final int undefinedSpellIndex, @NotNull final TreasureTree treasureTree, @NotNull final ImageIcon noFaceSquareIcon, @NotNull final ImageIcon unknownSquareIcon, @NotNull final GameObjectMatchers gameObjectMatchers, @NotNull final MapManager<G, A, R> mapManager) { this.archetypeTypeSet = archetypeTypeSet; this.parent = parent; this.treasureListTree = treasureListTree; Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/FaceTab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/FaceTab.java 2010-06-25 21:17:43 UTC (rev 8461) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/FaceTab.java 2010-06-25 21:29:58 UTC (rev 8462) @@ -163,7 +163,7 @@ * @param noFaceSquareIcon the image icon for no animations * @param unknownSquareIcon the image icon for undefined animations */ - public FaceTab(@NotNull final GameObjectAttributesModel<G, A, R> gameObjectAttributesModel, @NotNull final FaceObjects faceObjects, @NotNull final FaceObjectProviders faceObjectProviders, @NotNull final AnimationObjects animationObjects, @NotNull final ImageIcon noFaceSquareIcon, @NotNull final ImageIcon unknownSquareIcon) { + public FaceTab(@NotNull final GameObjectAttributesModel<G, A, R> gameObjectAttributesModel, @NotNull final FaceObjects<G, A, R> faceObjects, @NotNull final FaceObjectProviders faceObjectProviders, @NotNull final AnimationObjects<G, A, R> animationObjects, @NotNull final ImageIcon noFaceSquareIcon, @NotNull final ImageIcon unknownSquareIcon) { super(gameObjectAttributesModel); this.faceObjects = faceObjects; this.animationObjects = animationObjects; Modified: trunk/src/app/net/sf/gridarta/gui/utils/AnimationComponent.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/AnimationComponent.java 2010-06-25 21:17:43 UTC (rev 8461) +++ trunk/src/app/net/sf/gridarta/gui/utils/AnimationComponent.java 2010-06-25 21:29:58 UTC (rev 8462) @@ -66,7 +66,7 @@ * @param noFaceSquareIcon the image icon for no animations * @param unknownSquareIcon the image icon for undefined animations */ - public AnimationComponent(@NotNull final String animationName, @NotNull final AnimationObjects animationObjects, @NotNull final FaceObjectProviders faceObjectProviders, @NotNull final ImageIcon noFaceSquareIcon, @NotNull final ImageIcon unknownSquareIcon) { + public AnimationComponent(@NotNull final String animationName, @NotNull final AnimationObjects<?, ?, ?> animationObjects, @NotNull final FaceObjectProviders faceObjectProviders, @NotNull final ImageIcon noFaceSquareIcon, @NotNull final ImageIcon unknownSquareIcon) { super(new GridBagLayout()); textField.setText(animationName); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-06-25 21:17:49
|
Revision: 8461 http://gridarta.svn.sourceforge.net/gridarta/?rev=8461&view=rev Author: akirschbaum Date: 2010-06-25 21:17:43 +0000 (Fri, 25 Jun 2010) Log Message: ----------- Rename variable name. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java 2010-06-25 21:16:48 UTC (rev 8460) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java 2010-06-25 21:17:43 UTC (rev 8461) @@ -1245,12 +1245,12 @@ private boolean applySettings() { final MapSquare<G, A, R> mapSquare = gameObject.getMapSquare(); assert mapSquare != null; - final MapModel<G, A, R> mapModel = mapSquare.getMapModel(); - mapModel.beginTransaction("Change object attributes"); + final MapModel<G, A, R> tmpMapModel = mapSquare.getMapModel(); + tmpMapModel.beginTransaction("Change object attributes"); try { return applySettings2(); } finally { - mapModel.endTransaction(); + tmpMapModel.endTransaction(); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |