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-09-25 21:45:06
|
Revision: 8660 http://gridarta.svn.sourceforge.net/gridarta/?rev=8660&view=rev Author: akirschbaum Date: 2010-09-25 21:44:59 +0000 (Sat, 25 Sep 2010) Log Message: ----------- Correctly update archetypes when undoing/redoing operations involving autojoining. Modified Paths: -------------- branches/0.8/atrinik/ChangeLog branches/0.8/crossfire/ChangeLog branches/0.8/daimonin/ChangeLog branches/0.8/model/src/app/net/sf/gridarta/model/gameobject/AbstractGameObject.java Modified: branches/0.8/atrinik/ChangeLog =================================================================== --- branches/0.8/atrinik/ChangeLog 2010-09-25 21:38:50 UTC (rev 8659) +++ branches/0.8/atrinik/ChangeLog 2010-09-25 21:44:59 UTC (rev 8660) @@ -1,3 +1,8 @@ +2010-09-25 Andreas Kirschbaum + + * Correctly update archetypes when undoing/redoing operations + involving autojoining. + 2010-08-26 Andreas Kirschbaum * Fix memory leak when browsing maps. Modified: branches/0.8/crossfire/ChangeLog =================================================================== --- branches/0.8/crossfire/ChangeLog 2010-09-25 21:38:50 UTC (rev 8659) +++ branches/0.8/crossfire/ChangeLog 2010-09-25 21:44:59 UTC (rev 8660) @@ -1,3 +1,8 @@ +2010-09-25 Andreas Kirschbaum + + * Correctly update archetypes when undoing/redoing operations + involving autojoining. + 2010-08-26 Andreas Kirschbaum * Fix memory leak when browsing maps. Modified: branches/0.8/daimonin/ChangeLog =================================================================== --- branches/0.8/daimonin/ChangeLog 2010-09-25 21:38:50 UTC (rev 8659) +++ branches/0.8/daimonin/ChangeLog 2010-09-25 21:44:59 UTC (rev 8660) @@ -1,3 +1,8 @@ +2010-09-25 Andreas Kirschbaum + + * Correctly update archetypes when undoing/redoing operations + involving autojoining. + 2010-08-26 Andreas Kirschbaum * Fix memory leak when browsing maps. Modified: branches/0.8/model/src/app/net/sf/gridarta/model/gameobject/AbstractGameObject.java =================================================================== --- branches/0.8/model/src/app/net/sf/gridarta/model/gameobject/AbstractGameObject.java 2010-09-25 21:38:50 UTC (rev 8659) +++ branches/0.8/model/src/app/net/sf/gridarta/model/gameobject/AbstractGameObject.java 2010-09-25 21:44:59 UTC (rev 8660) @@ -362,9 +362,14 @@ return; } - this.archetype = archetype; - setArchetypeName(archetype.getArchetypeName()); - updateArchetype(); + beginGameObjectChange(); + try { + this.archetype = archetype; + setArchetypeName(archetype.getArchetypeName()); + updateArchetype(); + } finally { + endGameObjectChange(); + } } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-09-25 21:38:57
|
Revision: 8659 http://gridarta.svn.sourceforge.net/gridarta/?rev=8659&view=rev Author: akirschbaum Date: 2010-09-25 21:38:50 +0000 (Sat, 25 Sep 2010) Log Message: ----------- Correctly update archetypes when undoing/redoing operations involving autojoining. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/crossfire/ChangeLog trunk/daimonin/ChangeLog trunk/model/src/app/net/sf/gridarta/model/gameobject/AbstractGameObject.java trunk/src/test/net/sf/gridarta/gui/map/test/TestMapControlCreator.java Added Paths: ----------- trunk/src/test/net/sf/gridarta/actions/ trunk/src/test/net/sf/gridarta/actions/UndoActionsTest.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2010-09-25 20:25:08 UTC (rev 8658) +++ trunk/atrinik/ChangeLog 2010-09-25 21:38:50 UTC (rev 8659) @@ -1,3 +1,8 @@ +2010-09-25 Andreas Kirschbaum + + * Correctly update archetypes when undoing/redoing operations + involving autojoining. + 2010-09-08 Andreas Kirschbaum * Retain tab locations in main window across editor restarts. Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2010-09-25 20:25:08 UTC (rev 8658) +++ trunk/crossfire/ChangeLog 2010-09-25 21:38:50 UTC (rev 8659) @@ -1,3 +1,8 @@ +2010-09-25 Andreas Kirschbaum + + * Correctly update archetypes when undoing/redoing operations + involving autojoining. + 2010-09-08 Andreas Kirschbaum * Retain tab locations in main window across editor restarts. Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2010-09-25 20:25:08 UTC (rev 8658) +++ trunk/daimonin/ChangeLog 2010-09-25 21:38:50 UTC (rev 8659) @@ -1,3 +1,8 @@ +2010-09-25 Andreas Kirschbaum + + * Correctly update archetypes when undoing/redoing operations + involving autojoining. + 2010-09-08 Andreas Kirschbaum * Retain tab locations in main window across editor restarts. Modified: trunk/model/src/app/net/sf/gridarta/model/gameobject/AbstractGameObject.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/gameobject/AbstractGameObject.java 2010-09-25 20:25:08 UTC (rev 8658) +++ trunk/model/src/app/net/sf/gridarta/model/gameobject/AbstractGameObject.java 2010-09-25 21:38:50 UTC (rev 8659) @@ -339,8 +339,13 @@ return; } - this.archetype = archetype; - updateArchetype(); + beginGameObjectChange(); + try { + this.archetype = archetype; + updateArchetype(); + } finally { + endGameObjectChange(); + } } /** Added: trunk/src/test/net/sf/gridarta/actions/UndoActionsTest.java =================================================================== --- trunk/src/test/net/sf/gridarta/actions/UndoActionsTest.java (rev 0) +++ trunk/src/test/net/sf/gridarta/actions/UndoActionsTest.java 2010-09-25 21:38:50 UTC (rev 8659) @@ -0,0 +1,119 @@ +/* + * 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.actions; + +import java.awt.Point; +import net.sf.gridarta.gui.map.test.TestMapControlCreator; +import net.sf.gridarta.gui.undo.UndoControl; +import net.sf.gridarta.mapmanager.MapManager; +import net.sf.gridarta.model.archetype.DuplicateArchetypeException; +import net.sf.gridarta.model.archetype.TestArchetype; +import net.sf.gridarta.model.autojoin.AutojoinListsHelper; +import net.sf.gridarta.model.autojoin.IllegalAutojoinListException; +import net.sf.gridarta.model.baseobject.BaseObject; +import net.sf.gridarta.model.gameobject.TestGameObject; +import net.sf.gridarta.model.maparchobject.TestMapArchObject; +import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.model.mapmodel.CannotInsertGameObjectException; +import net.sf.gridarta.model.mapmodel.MapModel; +import net.sf.gridarta.model.mapmodel.MapSquare; +import net.sf.gridarta.model.mapmodel.TestMapModelCreator; +import net.sf.gridarta.model.mapmodel.TestMapModelHelper; +import net.sf.gridarta.utils.Size2D; +import org.jetbrains.annotations.NotNull; +import org.junit.Assert; +import org.junit.Test; + +/** + * Regression tests for {@link UndoActions}. + * @author Andreas Kirschbaum + */ +public class UndoActionsTest { + + /** + * Checks that undo correctly sets the "face" attribute. + * @throws IllegalAutojoinListException if the test fails + * @throws DuplicateArchetypeException if the test fails + * @throws CannotInsertGameObjectException if the test fails + */ + @Test + public void testInsert1() throws CannotInsertGameObjectException, DuplicateArchetypeException, IllegalAutojoinListException { + final TestMapControlCreator mapControlCreator = new TestMapControlCreator(); + final TestMapModelCreator mapModelCreator = mapControlCreator.getMapModelCreator(); + final AutojoinListsHelper autojoinListsHelper = mapControlCreator.newAutojoinListsHelper(); + for (int i = 0; i < 16; i++) { + final TestArchetype a = mapModelCreator.getArchetype("a" + i); + a.setAttributeString("face", "face" + i); + } + autojoinListsHelper.newAutojoinLists("a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "a10", "a11", "a12", "a13", "a14", "a15"); + + final MapManager<TestGameObject, TestMapArchObject, TestArchetype> mapManager = mapControlCreator.newMapManager(); + final UndoControl<TestGameObject, TestMapArchObject, TestArchetype> undoControl = new UndoControl<TestGameObject, TestMapArchObject, TestArchetype>(mapManager, mapModelCreator.getGameObjectFactory(), mapModelCreator.getGameObjectMatchers()); + + final TestMapArchObject mapArchObject = new TestMapArchObject(); + mapArchObject.setMapSize(new Size2D(2, 1)); + final MapControl<TestGameObject, TestMapArchObject, TestArchetype> mapControl = mapManager.newMap(null, mapArchObject, null, true); + final MapModel<TestGameObject, TestMapArchObject, TestArchetype> mapModel = mapControl.getMapModel(); + final TestMapModelHelper testMapModelHelper = mapModelCreator.newTestMapModelHelper(); + + final TestArchetype a0 = mapModelCreator.getArchetype("a0"); + + mapModelCreator.getMapViewSettings().setAutojoin(true); + mapModel.beginTransaction("TEST"); + try { + testMapModelHelper.insertArchetype(mapModel, 0, 0, a0, false); + } finally { + mapModel.endTransaction(); + } + + TestMapModelHelper.checkMapContents(mapModel, "a0|"); + checkFace(mapModel, 0, 0, "face0"); + + mapModel.beginTransaction("TEST"); + try { + testMapModelHelper.insertArchetype(mapModel, 1, 0, a0, true); + } finally { + mapModel.endTransaction(); + } + + TestMapModelHelper.checkMapContents(mapModel, "a2|a8"); + checkFace(mapModel, 0, 0, "face2"); + checkFace(mapModel, 1, 0, "face8"); + + undoControl.undo(); + TestMapModelHelper.checkMapContents(mapModel, "a0|"); + checkFace(mapModel, 0, 0, "face0"); + } + + /** + * Checks the face name of the first object in a map square. + * @param mapModel the map model to check + * @param x the x coordinate of the map square to check + * @param y the y coordinate of the map square to check + * @param face the expected face name + */ + private static void checkFace(@NotNull final MapModel<TestGameObject, TestMapArchObject, TestArchetype> mapModel, final int x, final int y, @NotNull final String face) { + final MapSquare<?, ?, ?> mapSquare = mapModel.getMapSquare(new Point(x, y)); + final BaseObject<?, ?, ?, ?> object = mapSquare.getFirst(); + Assert.assertNotNull(object); + Assert.assertEquals(face, object.getAttributeString("face")); + } + +} // class UndoActionsTest Property changes on: trunk/src/test/net/sf/gridarta/actions/UndoActionsTest.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Modified: trunk/src/test/net/sf/gridarta/gui/map/test/TestMapControlCreator.java =================================================================== --- trunk/src/test/net/sf/gridarta/gui/map/test/TestMapControlCreator.java 2010-09-25 20:25:08 UTC (rev 8658) +++ trunk/src/test/net/sf/gridarta/gui/map/test/TestMapControlCreator.java 2010-09-25 21:38:50 UTC (rev 8659) @@ -42,6 +42,7 @@ import net.sf.gridarta.model.archetype.DuplicateArchetypeException; import net.sf.gridarta.model.archetype.TestArchetype; import net.sf.gridarta.model.archetypechooser.ArchetypeChooserModel; +import net.sf.gridarta.model.autojoin.AutojoinListsHelper; import net.sf.gridarta.model.exitconnector.ExitMatcher; import net.sf.gridarta.model.gameobject.TestGameObject; import net.sf.gridarta.model.io.CacheFiles; @@ -103,6 +104,12 @@ private final ExitMatcher<TestGameObject, TestMapArchObject, TestArchetype> exitMatcher; /** + * The {@link MapReaderFactory} instance. + */ + @NotNull + private final MapReaderFactory<TestGameObject, TestMapArchObject> mapReaderFactory; + + /** * The {@link GlobalSettings} instance. */ @NotNull @@ -127,6 +134,12 @@ private final MapModelFactory<TestGameObject, TestMapArchObject, TestArchetype> mapModelFactory; /** + * The {@link MapControlFactory} instance. + */ + @NotNull + private final MapControlFactory<TestGameObject, TestMapArchObject, TestArchetype> mapControlFactory; + + /** * The {@link TestMapModelCreator} instance. */ @NotNull @@ -140,13 +153,13 @@ exitMatcher = new ExitMatcher<TestGameObject, TestMapArchObject, TestArchetype>(exitGameObjectMatcher); final MapArchObjectParserFactory<TestMapArchObject> mapArchObjectParserFactory = new TestMapArchObjectParserFactory(); final GameObjectParser<TestGameObject, TestMapArchObject, TestArchetype> gameObjectParser = mapModelCreator.newGameObjectParser(); - final MapReaderFactory<TestGameObject, TestMapArchObject> mapReaderFactory = new TestMapReaderFactory(mapArchObjectParserFactory, mapArchObjectFactory, gameObjectParser, mapModelCreator.getMapViewSettings()); + mapReaderFactory = new TestMapReaderFactory(mapArchObjectParserFactory, mapArchObjectFactory, gameObjectParser, mapModelCreator.getMapViewSettings()); globalSettings = new TestGlobalSettings(); final MapWriter<TestGameObject, TestMapArchObject, TestArchetype> mapWriter = new DefaultMapWriter<TestGameObject, TestMapArchObject, TestArchetype>(mapArchObjectParserFactory, gameObjectParser); final ArchetypeChooserModel<TestGameObject, TestMapArchObject, TestArchetype> archetypeChooserModel = new ArchetypeChooserModel<TestGameObject, TestMapArchObject, TestArchetype>(); pathManager = new PathManager(globalSettings); mapModelFactory = new MapModelFactory<TestGameObject, TestMapArchObject, TestArchetype>(archetypeChooserModel, mapModelCreator.getAutojoinLists(), mapModelCreator.getMapViewSettings(), mapModelCreator.getGameObjectFactory(), mapModelCreator.getGameObjectMatchers(), mapModelCreator.getTopmostInsertionMode()); - final MapControlFactory<TestGameObject, TestMapArchObject, TestArchetype> mapControlFactory = new TestMapControlFactory(mapWriter, globalSettings, mapModelFactory); + mapControlFactory = new TestMapControlFactory(mapWriter, globalSettings, mapModelFactory); final AbstractMapManager<TestGameObject, TestMapArchObject, TestArchetype> tmpMapManager = new DefaultMapManager<TestGameObject, TestMapArchObject, TestArchetype>(mapReaderFactory, mapControlFactory, globalSettings, mapModelCreator.getFaceObjectProviders()); tmpMapManager.setFileControl(fileControl); mapManager = tmpMapManager; @@ -286,4 +299,31 @@ return fileControl; } + /** + * Returns a new {@link AutojoinListsHelper} instance. + * @return the autojoin lists helper instance + */ + @NotNull + public AutojoinListsHelper newAutojoinListsHelper() { + return new AutojoinListsHelper(mapModelCreator); + } + + /** + * Returns the {@link TestMapModelCreator} instance. + * @return the test map model creator instance + */ + @NotNull + public TestMapModelCreator getMapModelCreator() { + return mapModelCreator; + } + + /** + * Returns a new {@link MapManager} instance. + * @return the map manager instance + */ + @NotNull + public MapManager<TestGameObject, TestMapArchObject, TestArchetype> newMapManager() { + return new DefaultMapManager<TestGameObject, TestMapArchObject, TestArchetype>(mapReaderFactory, mapControlFactory, globalSettings, mapModelCreator.getFaceObjectProviders()); + } + } // class TestMapControlCreator This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-09-25 20:25:14
|
Revision: 8658 http://gridarta.svn.sourceforge.net/gridarta/?rev=8658&view=rev Author: akirschbaum Date: 2010-09-25 20:25:08 +0000 (Sat, 25 Sep 2010) Log Message: ----------- Move AutojoinListsTest.AutojoinListsHelper to top-level class. Modified Paths: -------------- trunk/model/src/test/net/sf/gridarta/model/autojoin/AutojoinListsTest.java Added Paths: ----------- trunk/model/src/test/net/sf/gridarta/model/autojoin/AutojoinListsHelper.java Added: trunk/model/src/test/net/sf/gridarta/model/autojoin/AutojoinListsHelper.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/autojoin/AutojoinListsHelper.java (rev 0) +++ trunk/model/src/test/net/sf/gridarta/model/autojoin/AutojoinListsHelper.java 2010-09-25 20:25:08 UTC (rev 8658) @@ -0,0 +1,99 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.model.autojoin; + +import java.util.ArrayList; +import java.util.List; +import net.sf.gridarta.model.archetype.TestArchetype; +import net.sf.gridarta.model.gameobject.TestGameObject; +import net.sf.gridarta.model.maparchobject.TestMapArchObject; +import net.sf.gridarta.model.mapmodel.TestMapModelCreator; +import org.jetbrains.annotations.NotNull; +import org.junit.Assert; + +/** + * Implements {@link AutojoinList} related functions. + * @author Andreas Kirschbaum + */ +public class AutojoinListsHelper { + + /** + * The {@link TestMapModelCreator} instance. + */ + @NotNull + private final TestMapModelCreator mapModelCreator; + + /** + * The {@link AutojoinLists} instance. + */ + @NotNull + private final AutojoinLists<TestGameObject, TestMapArchObject, TestArchetype> autojoinLists; + + /** + * Creates a new instance. + */ + public AutojoinListsHelper() { + this(new TestMapModelCreator(false)); + } + + /** + * Creates a new instance. + * @param mapModelCreator the map model creator instance + */ + public AutojoinListsHelper(@NotNull final TestMapModelCreator mapModelCreator) { + this.mapModelCreator = mapModelCreator; + autojoinLists = mapModelCreator.getAutojoinLists(); + } + + /** + * Creates a new {@link AutojoinLists} instance. + * @param archetypeNames the names of the archetypes + * @throws IllegalAutojoinListException if the autojoin lists instance + * cannot be created + */ + public void newAutojoinLists(@NotNull final String... archetypeNames) throws IllegalAutojoinListException { + final List<List<TestArchetype>> archetypes = new ArrayList<List<TestArchetype>>(); + for (final String archetypeNameList : archetypeNames) { + final List<TestArchetype> archetypeList = new ArrayList<TestArchetype>(); + if (!archetypeNameList.isEmpty()) { + for (final String archetypeName : archetypeNameList.split("\\|", -1)) { + archetypeList.add(mapModelCreator.getArchetype(archetypeName)); + } + } + archetypes.add(archetypeList); + } + autojoinLists.addAutojoinList(new AutojoinList<TestGameObject, TestMapArchObject, TestArchetype>(archetypes)); + } + + /** + * Creates a new {@link AutojoinLists} instance and expects an error. + * @param expectedException the expected error message + * @param archetypeNames the archetype names + */ + public void newAutojoinListsFail(@NotNull final String expectedException, @NotNull final String... archetypeNames) { + try { + newAutojoinLists(archetypeNames); + Assert.fail(); + } catch (final IllegalAutojoinListException ex) { + Assert.assertEquals(expectedException, ex.getMessage()); + } + } + +} // class AutojoinListsHelper Property changes on: trunk/model/src/test/net/sf/gridarta/model/autojoin/AutojoinListsHelper.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Modified: trunk/model/src/test/net/sf/gridarta/model/autojoin/AutojoinListsTest.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/autojoin/AutojoinListsTest.java 2010-09-25 20:23:25 UTC (rev 8657) +++ trunk/model/src/test/net/sf/gridarta/model/autojoin/AutojoinListsTest.java 2010-09-25 20:25:08 UTC (rev 8658) @@ -19,8 +19,6 @@ package net.sf.gridarta.model.autojoin; -import java.util.ArrayList; -import java.util.List; import net.sf.gridarta.model.archetype.DuplicateArchetypeException; import net.sf.gridarta.model.archetype.TestArchetype; import net.sf.gridarta.model.archetype.UndefinedArchetypeException; @@ -30,7 +28,6 @@ import net.sf.gridarta.model.mapmodel.MapModel; import net.sf.gridarta.model.mapmodel.TestMapModelCreator; import net.sf.gridarta.model.mapmodel.TestMapModelHelper; -import org.jetbrains.annotations.NotNull; import org.junit.Assert; import org.junit.Test; @@ -453,73 +450,4 @@ TestMapModelHelper.checkMapContents(mapModel, "a10|a10|a10", "a10|b10|a10", "a10|a10|a10"); } - /** - * Implements {@link AutojoinList} related functions. - */ - private static class AutojoinListsHelper { - - /** - * The {@link TestMapModelCreator} instance. - */ - @NotNull - private final TestMapModelCreator mapModelCreator; - - /** - * The {@link AutojoinLists} instance. - */ - @NotNull - private final AutojoinLists<TestGameObject, TestMapArchObject, TestArchetype> autojoinLists; - - /** - * Creates a new instance. - */ - private AutojoinListsHelper() { - this(new TestMapModelCreator(false)); - } - - /** - * Creates a new instance. - * @param mapModelCreator the map model creator instance - */ - private AutojoinListsHelper(@NotNull final TestMapModelCreator mapModelCreator) { - this.mapModelCreator = mapModelCreator; - autojoinLists = mapModelCreator.getAutojoinLists(); - } - - /** - * Creates a new {@link AutojoinLists} instance. - * @param archetypeNames the names of the archetypes - * @throws IllegalAutojoinListException if the autojoin lists instance - * cannot be created - */ - public void newAutojoinLists(@NotNull final String... archetypeNames) throws IllegalAutojoinListException { - final List<List<TestArchetype>> archetypes = new ArrayList<List<TestArchetype>>(); - for (final String archetypeNameList : archetypeNames) { - final List<TestArchetype> archetypeList = new ArrayList<TestArchetype>(); - if (!archetypeNameList.isEmpty()) { - for (final String archetypeName : archetypeNameList.split("\\|", -1)) { - archetypeList.add(mapModelCreator.getArchetype(archetypeName)); - } - } - archetypes.add(archetypeList); - } - autojoinLists.addAutojoinList(new AutojoinList<TestGameObject, TestMapArchObject, TestArchetype>(archetypes)); - } - - /** - * Creates a new {@link AutojoinLists} instance and expects an error. - * @param expectedException the expected error message - * @param archetypeNames the archetype names - */ - public void newAutojoinListsFail(@NotNull final String expectedException, @NotNull final String... archetypeNames) { - try { - newAutojoinLists(archetypeNames); - Assert.fail(); - } catch (final IllegalAutojoinListException ex) { - Assert.assertEquals(expectedException, ex.getMessage()); - } - } - - } - } // class AutojoinListsTest This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-09-25 20:23:32
|
Revision: 8657 http://gridarta.svn.sourceforge.net/gridarta/?rev=8657&view=rev Author: akirschbaum Date: 2010-09-25 20:23:25 +0000 (Sat, 25 Sep 2010) Log Message: ----------- Merge duplicated code. Modified Paths: -------------- trunk/model/src/test/net/sf/gridarta/model/mapmodel/TestMapModelCreator.java trunk/src/test/net/sf/gridarta/gui/map/test/TestMapControlCreator.java Modified: trunk/model/src/test/net/sf/gridarta/model/mapmodel/TestMapModelCreator.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/mapmodel/TestMapModelCreator.java 2010-09-23 18:33:03 UTC (rev 8656) +++ trunk/model/src/test/net/sf/gridarta/model/mapmodel/TestMapModelCreator.java 2010-09-25 20:23:25 UTC (rev 8657) @@ -41,6 +41,8 @@ import net.sf.gridarta.model.gameobject.GameObjectFactory; import net.sf.gridarta.model.gameobject.TestGameObject; import net.sf.gridarta.model.gameobject.TestGameObjectFactory; +import net.sf.gridarta.model.io.GameObjectParser; +import net.sf.gridarta.model.io.TestGameObjectParser; import net.sf.gridarta.model.maparchobject.TestMapArchObject; import net.sf.gridarta.model.mapviewsettings.MapViewSettings; import net.sf.gridarta.model.mapviewsettings.TestMapViewSettings; @@ -206,6 +208,15 @@ } /** + * Returns the "topmost" insertion mode. + * @return the "topmost" insertion mode + */ + @NotNull + public InsertionMode<TestGameObject, TestMapArchObject, TestArchetype> getTopmostInsertionMode() { + return topmostInsertionMode; + } + + /** * Returns an archetype. * @param archetypeName the archetype name * @return the archetype @@ -283,4 +294,39 @@ return archetypeChooserModel; } + /** + * Returns the {@link GameObjectMatchers} instance. + * @return the game object matchers instance + */ + @NotNull + public GameObjectMatchers getGameObjectMatchers() { + return gameObjectMatchers; + } + + /** + * Returns the {@link ArchetypeSet}. + * @return the archetype set + */ + @NotNull + public ArchetypeSet<TestGameObject, TestMapArchObject, TestArchetype> getArchetypeSet() { + return archetypeSet; + } + + /** + * Creates a new {@link GameObjectParser} instance. + * @return the new game object parser instance + */ + public GameObjectParser<TestGameObject, TestMapArchObject, TestArchetype> newGameObjectParser() { + return new TestGameObjectParser(gameObjectFactory, gameObjectMatchers, archetypeSet); + } + + /** + * Returns the {@link FaceObjectProviders} instance. + * @return the face object providers instance + */ + @NotNull + public FaceObjectProviders getFaceObjectProviders() { + return faceObjectProviders; + } + } // class TestMapModelCreator Modified: trunk/src/test/net/sf/gridarta/gui/map/test/TestMapControlCreator.java =================================================================== --- trunk/src/test/net/sf/gridarta/gui/map/test/TestMapControlCreator.java 2010-09-23 18:33:03 UTC (rev 8656) +++ trunk/src/test/net/sf/gridarta/gui/map/test/TestMapControlCreator.java 2010-09-25 20:23:25 UTC (rev 8657) @@ -38,23 +38,12 @@ import net.sf.gridarta.mapmanager.FileControl; import net.sf.gridarta.mapmanager.MapManager; import net.sf.gridarta.mapmanager.TestFileControl; -import net.sf.gridarta.model.anim.AnimationObjects; -import net.sf.gridarta.model.anim.DefaultAnimationObjects; -import net.sf.gridarta.model.archetype.ArchetypeFactory; import net.sf.gridarta.model.archetype.ArchetypeSet; import net.sf.gridarta.model.archetype.DuplicateArchetypeException; import net.sf.gridarta.model.archetype.TestArchetype; -import net.sf.gridarta.model.archetype.TestArchetypeFactory; -import net.sf.gridarta.model.archetype.TestArchetypeSet; import net.sf.gridarta.model.archetypechooser.ArchetypeChooserModel; -import net.sf.gridarta.model.autojoin.AutojoinLists; import net.sf.gridarta.model.exitconnector.ExitMatcher; -import net.sf.gridarta.model.face.FaceObjectProviders; -import net.sf.gridarta.model.face.FaceObjects; -import net.sf.gridarta.model.face.TestFaceObjects; -import net.sf.gridarta.model.gameobject.GameObjectFactory; import net.sf.gridarta.model.gameobject.TestGameObject; -import net.sf.gridarta.model.gameobject.TestGameObjectFactory; import net.sf.gridarta.model.io.CacheFiles; import net.sf.gridarta.model.io.DefaultMapWriter; import net.sf.gridarta.model.io.GameObjectParser; @@ -63,7 +52,6 @@ import net.sf.gridarta.model.io.MapWriter; import net.sf.gridarta.model.io.PathManager; import net.sf.gridarta.model.io.TestCacheFiles; -import net.sf.gridarta.model.io.TestGameObjectParser; import net.sf.gridarta.model.io.TestMapArchObjectParserFactory; import net.sf.gridarta.model.io.TestMapReaderFactory; import net.sf.gridarta.model.maparchobject.MapArchObjectFactory; @@ -72,21 +60,15 @@ import net.sf.gridarta.model.mapcontrol.MapControl; import net.sf.gridarta.model.mapcontrol.MapControlFactory; import net.sf.gridarta.model.mapcontrol.TestMapControlFactory; -import net.sf.gridarta.model.mapmodel.InsertionMode; import net.sf.gridarta.model.mapmodel.InsertionModeSet; import net.sf.gridarta.model.mapmodel.MapModelFactory; +import net.sf.gridarta.model.mapmodel.TestMapModelCreator; import net.sf.gridarta.model.mapmodel.TestMapModelHelper; -import net.sf.gridarta.model.mapmodel.TopmostInsertionMode; -import net.sf.gridarta.model.mapviewsettings.MapViewSettings; -import net.sf.gridarta.model.mapviewsettings.TestMapViewSettings; import net.sf.gridarta.model.match.GameObjectMatcher; -import net.sf.gridarta.model.match.GameObjectMatchers; import net.sf.gridarta.model.match.TypeNrsGameObjectMatcher; import net.sf.gridarta.model.settings.GlobalSettings; import net.sf.gridarta.model.settings.TestGlobalSettings; -import net.sf.gridarta.utils.GUIUtils; import net.sf.gridarta.utils.Size2D; -import net.sf.gridarta.utils.SystemIcons; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -97,12 +79,6 @@ public class TestMapControlCreator { /** - * The {@link AnimationObjects} instance. - */ - @NotNull - private final AnimationObjects<TestGameObject, TestMapArchObject, TestArchetype> animationObjects; - - /** * The {@link MapManager} instance. */ @NotNull @@ -115,54 +91,24 @@ private final MapManager<TestGameObject, TestMapArchObject, TestArchetype> pickmapManager; /** - * The {@link GameObjectFactory} instance. - */ - @NotNull - private final GameObjectFactory<TestGameObject, TestMapArchObject, TestArchetype> gameObjectFactory; - - /** * The {@link PathManager} instance. */ @NotNull private final PathManager pathManager; /** - * The "topmost" {@link InsertionMode} instance. - */ - @NotNull - private final InsertionMode<TestGameObject, TestMapArchObject, TestArchetype> topmostInsertionMode; - - /** * The {@link ExitMatcher} instance. */ @NotNull private final ExitMatcher<TestGameObject, TestMapArchObject, TestArchetype> exitMatcher; /** - * The {@link FaceObjectProviders} instance. - */ - @NotNull - private final FaceObjectProviders faceObjectProviders; - - /** - * The {@link ArchetypeSet} instance. - */ - @NotNull - private final ArchetypeSet<TestGameObject, TestMapArchObject, TestArchetype> archetypeSet; - - /** * The {@link GlobalSettings} instance. */ @NotNull private final GlobalSettings globalSettings; /** - * The {@link MapViewSettings} instance. - */ - @NotNull - private final MapViewSettings mapViewSettings; - - /** * The {@link MapArchObjectFactory} instance. */ @NotNull @@ -181,44 +127,30 @@ private final MapModelFactory<TestGameObject, TestMapArchObject, TestArchetype> mapModelFactory; /** - * The {@link InsertionModeSet} instance. + * The {@link TestMapModelCreator} instance. */ @NotNull - private final InsertionModeSet<TestGameObject, TestMapArchObject, TestArchetype> insertionModeSet; + private final TestMapModelCreator mapModelCreator = new TestMapModelCreator(false); /** * Creates a new instance. */ public TestMapControlCreator() { - final GUIUtils guiUtils = new GUIUtils(); - final SystemIcons systemIcons = new SystemIcons(guiUtils); - animationObjects = new DefaultAnimationObjects<TestGameObject, TestMapArchObject, TestArchetype>("anim"); final GameObjectMatcher exitGameObjectMatcher = new TypeNrsGameObjectMatcher(TestMapModelHelper.EXIT_TYPE); exitMatcher = new ExitMatcher<TestGameObject, TestMapArchObject, TestArchetype>(exitGameObjectMatcher); - final ArchetypeFactory<TestGameObject, TestMapArchObject, TestArchetype> archetypeFactory = new TestArchetypeFactory(); - final FaceObjects<TestGameObject, TestMapArchObject, TestArchetype> faceObjects = new TestFaceObjects(); - faceObjectProviders = new FaceObjectProviders(0, faceObjects, systemIcons); - archetypeSet = new TestArchetypeSet(archetypeFactory, "archetypes", faceObjectProviders); final MapArchObjectParserFactory<TestMapArchObject> mapArchObjectParserFactory = new TestMapArchObjectParserFactory(); - mapViewSettings = new TestMapViewSettings(); - gameObjectFactory = new TestGameObjectFactory(faceObjectProviders, animationObjects); - final GameObjectMatchers gameObjectMatchers = new GameObjectMatchers(); - final GameObjectParser<TestGameObject, TestMapArchObject, TestArchetype> gameObjectParser = new TestGameObjectParser(gameObjectFactory, gameObjectMatchers, archetypeSet); - final MapReaderFactory<TestGameObject, TestMapArchObject> mapReaderFactory = new TestMapReaderFactory(mapArchObjectParserFactory, mapArchObjectFactory, gameObjectParser, mapViewSettings); + final GameObjectParser<TestGameObject, TestMapArchObject, TestArchetype> gameObjectParser = mapModelCreator.newGameObjectParser(); + final MapReaderFactory<TestGameObject, TestMapArchObject> mapReaderFactory = new TestMapReaderFactory(mapArchObjectParserFactory, mapArchObjectFactory, gameObjectParser, mapModelCreator.getMapViewSettings()); globalSettings = new TestGlobalSettings(); final MapWriter<TestGameObject, TestMapArchObject, TestArchetype> mapWriter = new DefaultMapWriter<TestGameObject, TestMapArchObject, TestArchetype>(mapArchObjectParserFactory, gameObjectParser); - final AutojoinLists<TestGameObject, TestMapArchObject, TestArchetype> autojoinLists = new AutojoinLists<TestGameObject, TestMapArchObject, TestArchetype>(mapViewSettings); final ArchetypeChooserModel<TestGameObject, TestMapArchObject, TestArchetype> archetypeChooserModel = new ArchetypeChooserModel<TestGameObject, TestMapArchObject, TestArchetype>(); pathManager = new PathManager(globalSettings); - topmostInsertionMode = new TopmostInsertionMode<TestGameObject, TestMapArchObject, TestArchetype>(); - insertionModeSet = new InsertionModeSet<TestGameObject, TestMapArchObject, TestArchetype>(topmostInsertionMode); - insertionModeSet.init(new TypeNrsGameObjectMatcher(), new TypeNrsGameObjectMatcher(), new TypeNrsGameObjectMatcher()); - mapModelFactory = new MapModelFactory<TestGameObject, TestMapArchObject, TestArchetype>(archetypeChooserModel, autojoinLists, mapViewSettings, gameObjectFactory, gameObjectMatchers, topmostInsertionMode); + mapModelFactory = new MapModelFactory<TestGameObject, TestMapArchObject, TestArchetype>(archetypeChooserModel, mapModelCreator.getAutojoinLists(), mapModelCreator.getMapViewSettings(), mapModelCreator.getGameObjectFactory(), mapModelCreator.getGameObjectMatchers(), mapModelCreator.getTopmostInsertionMode()); final MapControlFactory<TestGameObject, TestMapArchObject, TestArchetype> mapControlFactory = new TestMapControlFactory(mapWriter, globalSettings, mapModelFactory); - final AbstractMapManager<TestGameObject, TestMapArchObject, TestArchetype> tmpMapManager = new DefaultMapManager<TestGameObject, TestMapArchObject, TestArchetype>(mapReaderFactory, mapControlFactory, globalSettings, faceObjectProviders); + final AbstractMapManager<TestGameObject, TestMapArchObject, TestArchetype> tmpMapManager = new DefaultMapManager<TestGameObject, TestMapArchObject, TestArchetype>(mapReaderFactory, mapControlFactory, globalSettings, mapModelCreator.getFaceObjectProviders()); tmpMapManager.setFileControl(fileControl); mapManager = tmpMapManager; - final AbstractMapManager<TestGameObject, TestMapArchObject, TestArchetype> tmpPickmapManager = new DefaultMapManager<TestGameObject, TestMapArchObject, TestArchetype>(mapReaderFactory, mapControlFactory, globalSettings, faceObjectProviders); + final AbstractMapManager<TestGameObject, TestMapArchObject, TestArchetype> tmpPickmapManager = new DefaultMapManager<TestGameObject, TestMapArchObject, TestArchetype>(mapReaderFactory, mapControlFactory, globalSettings, mapModelCreator.getFaceObjectProviders()); tmpPickmapManager.setFileControl(fileControl); pickmapManager = tmpPickmapManager; } @@ -229,7 +161,7 @@ * @throws DuplicateArchetypeException if an internal error occurs */ public TestMapModelHelper newMapModelCreator() throws DuplicateArchetypeException { - return new TestMapModelHelper(topmostInsertionMode, gameObjectFactory, archetypeSet, faceObjectProviders, animationObjects); + return mapModelCreator.newMapModelCreator(); } /** @@ -280,7 +212,7 @@ */ @NotNull public ArchetypeSet<TestGameObject, TestMapArchObject, TestArchetype> getArchetypeSet() { - return archetypeSet; + return mapModelCreator.getArchetypeSet(); } /** @@ -298,7 +230,7 @@ */ @NotNull public InsertionModeSet<TestGameObject, TestMapArchObject, TestArchetype> getInsertionModeSet() { - return insertionModeSet; + return mapModelCreator.getInsertionModeSet(); } /** @@ -319,7 +251,7 @@ */ @NotNull public CopyBuffer<TestGameObject, TestMapArchObject, TestArchetype> newCopyBuffer() { - return new CopyBuffer<TestGameObject, TestMapArchObject, TestArchetype>(mapViewSettings, gameObjectFactory, mapArchObjectFactory, mapModelFactory, insertionModeSet); + return new CopyBuffer<TestGameObject, TestMapArchObject, TestArchetype>(mapModelCreator.getMapViewSettings(), mapModelCreator.getGameObjectFactory(), mapArchObjectFactory, mapModelFactory, mapModelCreator.getInsertionModeSet()); } /** @@ -329,7 +261,7 @@ @NotNull public MapViewsManager<TestGameObject, TestMapArchObject, TestArchetype> newMapViewsManager() { final MapViewFactory<TestGameObject, TestMapArchObject, TestArchetype> mapViewFactory = new TestMapViewFactory(); - return new MapViewsManager<TestGameObject, TestMapArchObject, TestArchetype>(mapViewSettings, mapViewFactory, mapManager, pickmapManager); + return new MapViewsManager<TestGameObject, TestMapArchObject, TestArchetype>(mapModelCreator.getMapViewSettings(), mapViewFactory, mapManager, pickmapManager); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ryo...@us...> - 2010-09-23 18:33:10
|
Revision: 8656 http://gridarta.svn.sourceforge.net/gridarta/?rev=8656&view=rev Author: ryo_saeba Date: 2010-09-23 18:33:03 +0000 (Thu, 23 Sep 2010) Log Message: ----------- Add and update spell-related fields. Modified Paths: -------------- trunk/crossfire/resource/resource/conf/types.xml Modified: trunk/crossfire/resource/resource/conf/types.xml =================================================================== --- trunk/crossfire/resource/resource/conf/types.xml 2010-09-11 11:07:34 UTC (rev 8655) +++ trunk/crossfire/resource/resource/conf/types.xml 2010-09-23 18:33:03 UTC (rev 8656) @@ -4712,13 +4712,37 @@ The <spell type> defines the basic type of spell. Some of these types are of a more generic nature than others. </attribute> - <attribute arch="level" editor="spell level" type="int" min="-32768" max="32767" check_min="1" check_max="115"></attribute> - <attribute arch="casting_time" editor="casting time" type="int"></attribute> - <attribute arch="duration" editor="duration" type="int"></attribute> - <attribute arch="other_arch" editor="create object" type="string"></attribute> - <attribute arch="sp" editor="cost spellpoints" type="int" min="0" max="32767"></attribute> - <attribute arch="grace" editor="cost grace" type="int" min="0" max="32767"></attribute> - <attribute arch="maxsp" editor="double cost per level" type="int" min="0" max="32767"></attribute> + <attribute arch="level" editor="spell level" type="int" min="-32768" max="32767" check_min="1" check_max="115"> + The level, without taking into account spellpath attenuation, required to cast this spell. + </attribute> + <attribute arch="path_attuned" editor="attuned paths" type="bitmask_spellpath"> + Spellpath for this spell. A player needs to not be denied this path to cast the spell. + </attribute> + <attribute arch="casting_time" editor="casting time" type="int"> + If the server uses spell casting times, this is the base number of ticks required + for casting this spell. + </attribute> + <attribute arch="duration" editor="duration" type="int"> + Base spell effect duration. The actual duration will depend on the effective + casting level. + </attribute> + <attribute arch="other_arch" editor="create object" type="string"> + For spells creating or launching things, the archetype to use. + </attribute> + <attribute arch="sp" editor="spellpoint cost" type="int" min="0" max="32767"> + How many base spell points this spell costs to cast. + The effective cost can be based on the casting level, depending on server settings. + </attribute> + <attribute arch="maxsp" editor="double sp cost per level" type="int" min="0" max="32767"> + If non zero, the spellpoint cost will increase <spellpoint cost> per this value levels. + </attribute> + <attribute arch="grace" editor="cost grace" type="int" min="0" max="32767"> + How many base grace points this spell costs to cast. + The effective cost can be based on the casting level, depending on server settings. + </attribute> + <attribute arch="maxgrace" editor="double grace cost per level" type="int" min="0" max="32767"> + If non zero, the grace cost will increase <grace cost> per this value levels. + </attribute> <attribute arch="casting_requirements" editor="consumed items" type="string"> If set, this is a comma-separated list of items the spell will require and consume to be cast by players and monsters. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ryo...@us...> - 2010-09-11 11:07:41
|
Revision: 8655 http://gridarta.svn.sourceforge.net/gridarta/?rev=8655&view=rev Author: ryo_saeba Date: 2010-09-11 11:07:34 +0000 (Sat, 11 Sep 2010) Log Message: ----------- Add 'anim_suffix' attribute. Modified Paths: -------------- trunk/crossfire/resource/resource/conf/types.xml Modified: trunk/crossfire/resource/resource/conf/types.xml =================================================================== --- trunk/crossfire/resource/resource/conf/types.xml 2010-09-11 10:43:01 UTC (rev 8654) +++ trunk/crossfire/resource/resource/conf/types.xml 2010-09-11 11:07:34 UTC (rev 8655) @@ -1195,6 +1195,10 @@ <attribute arch="randomitems" editor="class items" type="treasurelist"> This entry determines which initial items the character receives. </attribute> + <attribute arch="anim_suffix" editor="animation suffix" type="string"> + If set, the animation of the player being changed will be set to the + animation with name <race_animation_suffix>, if it exists. + </attribute> <section name="stats"> <attribute arch="Str" editor="strength" type="int" min="-128" max="127"> The player's strength will rise by the given value if he chooses @@ -4589,6 +4593,10 @@ <attribute arch="wc_increase_rate" editor="levels per wc point" type="int"> For combat skills, players will get 1 wc point per this many levels. </attribute> + <attribute arch="anim_suffix" editor="animation suffix" type="string"> + If set, will apply a compound animation to the player or monster + using this skill. + </attribute> </type> <!--####################################################################--> @@ -4719,6 +4727,10 @@ - 'water' will make the spell use one water per casting. - ' 2 diamonds' will make the spell use 2 diamonds per casting. </attribute> + <attribute arch="anim_suffix" editor="animation suffix" type="string"> + If set, will apply a compound animation to the player or monster + casting this spell. + </attribute> </type> <!--####################################################################--> @@ -5536,6 +5548,11 @@ If this is set to a : separated (with leading and trailing :) list of races, only players of this race will be able to apply the item. </attribute> + <attribute arch="anim_suffix" editor="animation suffix" type="string"> + If set, will apply a compound animation to the player or monster when + attacking with this weapon. + </attribute> + <section name="resistance"> <attribute arch="resist_physical" editor="resist physical %" length="15" type="int"> This adds physical resistance to the weapon (= armor value). The This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ryo...@us...> - 2010-09-11 10:43:07
|
Revision: 8654 http://gridarta.svn.sourceforge.net/gridarta/?rev=8654&view=rev Author: ryo_saeba Date: 2010-09-11 10:43:01 +0000 (Sat, 11 Sep 2010) Log Message: ----------- Add turn undead resistance to various dialogs. Modified Paths: -------------- trunk/crossfire/resource/resource/conf/types.xml Modified: trunk/crossfire/resource/resource/conf/types.xml =================================================================== --- trunk/crossfire/resource/resource/conf/types.xml 2010-09-11 10:25:49 UTC (rev 8653) +++ trunk/crossfire/resource/resource/conf/types.xml 2010-09-11 10:43:01 UTC (rev 8654) @@ -830,6 +830,11 @@ percent-value in the range 0-100. Depletion resistance is little effective unless the value is 100 (= perfect immunity). </attribute> + <attribute arch="resist_turn_undead" editor="resist turn undead %" length="15" type="int"> + This adds turn undead resistance to the weapon. The number is a + percent-value in the range 0-100. This is mostly useful for + undead monsters or players. + </attribute> <attribute arch="resist_death" editor="resist death-attack %" length="15" type="int"> This adds death-attack resistance to the item. The number is a percent-value in the range 0-100. Death-attack resistance is @@ -2035,6 +2040,13 @@ resistance should only be set for flesh items in a monster's inventory. </attribute> + <attribute arch="resist_turn_undead" editor="resist turn undead %" length="15" type="int"> + Resistances on flesh items make them more durable against + spellcraft of the appropriate kind. It also allows dragon + players to eventually gain resistance by eating it. Usually + resistance should only be set for flesh items in a monster's + inventory. + </attribute> <attribute arch="resist_death" editor="resist death-attack %" length="15" type="int"> Resistances on flesh items make them more durable against spellcraft of the appropriate kind. It also allows dragon @@ -5611,6 +5623,11 @@ percent-value in the range 0-100. Depletion resistance is little effective unless the value is 100 (= perfect immunity). </attribute> + <attribute arch="resist_turn_undead" editor="resist turn undead %" length="15" type="int"> + This adds turn undead resistance to the weapon. The number is a + percent-value in the range 0-100. This is mostly useful for + undead monsters. + </attribute> <attribute arch="resist_death" editor="resist death-attack %" length="15" type="int"> This adds death-attack resistance to the weapon. The number is a percent-value in the range 0-100. Death-attack resistance is This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ryo...@us...> - 2010-09-11 10:25:55
|
Revision: 8653 http://gridarta.svn.sourceforge.net/gridarta/?rev=8653&view=rev Author: ryo_saeba Date: 2010-09-11 10:25:49 +0000 (Sat, 11 Sep 2010) Log Message: ----------- Remove obsolete attribute. Modified Paths: -------------- trunk/crossfire/resource/resource/conf/types.xml Modified: trunk/crossfire/resource/resource/conf/types.xml =================================================================== --- trunk/crossfire/resource/resource/conf/types.xml 2010-09-11 09:44:07 UTC (rev 8652) +++ trunk/crossfire/resource/resource/conf/types.xml 2010-09-11 10:25:49 UTC (rev 8653) @@ -2552,7 +2552,6 @@ alchemical recipes. By themselves, they have no special functionality. ]]> </description> - <attribute arch="is_dust" editor="is dust" type="bool"></attribute> <section name="resistance"> <attribute arch="resist_physical" editor="resist physical %" length="15" type="int"></attribute> <attribute arch="resist_magic" editor="resist magic %" length="15" type="int"></attribute> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ryo...@us...> - 2010-09-11 09:44:14
|
Revision: 8652 http://gridarta.svn.sourceforge.net/gridarta/?rev=8652&view=rev Author: ryo_saeba Date: 2010-09-11 09:44:07 +0000 (Sat, 11 Sep 2010) Log Message: ----------- Add 'drink' type. Modified Paths: -------------- trunk/crossfire/resource/resource/conf/types.xml Modified: trunk/crossfire/resource/resource/conf/types.xml =================================================================== --- trunk/crossfire/resource/resource/conf/types.xml 2010-09-11 09:42:37 UTC (rev 8651) +++ trunk/crossfire/resource/resource/conf/types.xml 2010-09-11 09:44:07 UTC (rev 8652) @@ -1717,6 +1717,29 @@ </type> <!--####################################################################--> + <type number="54" name="Drink"> + <description><![CDATA[ + By eating/drinking food-objects, the player can fill his + stomach and gain a little health. ]]> + </description> + <attribute arch="food" editor="food points" type="int" min="0" max="32767"> + The player's stomach will get filled with this amount of food points. + The player's health will increase by <food points>/50 hp. + </attribute> + <attribute arch="startequip" editor="godgiven item" type="bool"> + A godgiven item vanishes as soon as the player drops it to the + ground. + </attribute> + <attribute arch="race_restriction" editor="race restriction" type="string"> + If this is set to a : separated (with leading and trailing :) list + of races, only players of this race will be able to apply the item. + </attribute> + <attribute arch="on_use_yield" editor="garbage generated when eaten" type="string"> + If set to an archetype, this archetype will replace the eaten item. + </attribute> + </type> + + <!--####################################################################--> <type number="83" name="Duplicator"> <ignore> <ignore_list name="system_object"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ryo...@us...> - 2010-09-11 09:42:43
|
Revision: 8651 http://gridarta.svn.sourceforge.net/gridarta/?rev=8651&view=rev Author: ryo_saeba Date: 2010-09-11 09:42:37 +0000 (Sat, 11 Sep 2010) Log Message: ----------- Add 'on_use_yield' attribute. Modified Paths: -------------- trunk/crossfire/resource/resource/conf/types.xml Modified: trunk/crossfire/resource/resource/conf/types.xml =================================================================== --- trunk/crossfire/resource/resource/conf/types.xml 2010-09-11 08:42:23 UTC (rev 8650) +++ trunk/crossfire/resource/resource/conf/types.xml 2010-09-11 09:42:37 UTC (rev 8651) @@ -1903,6 +1903,9 @@ If this is set to a : separated (with leading and trailing :) list of races, only players of this race will be able to apply the item. </attribute> + <attribute arch="on_use_yield" editor="garbage generated when eaten" type="string"> + If set to an archetype, this archetype will replace the eaten item. + </attribute> <section name="resistance"> <attribute arch="resist_physical" editor="resist physical %" length="15" type="int"> Resistances on flesh items make them more durable against @@ -2168,6 +2171,9 @@ If this is set to a : separated (with leading and trailing :) list of races, only players of this race will be able to apply the item. </attribute> + <attribute arch="on_use_yield" editor="garbage generated when eaten" type="string"> + If set to an archetype, this archetype will replace the eaten item. + </attribute> </type> <!--####################################################################--> @@ -3680,6 +3686,9 @@ If this is set to a : separated (with leading and trailing :) list of races, only players of this race will be able to apply the item. </attribute> + <attribute arch="on_use_yield" editor="garbage generated when eaten" type="string"> + If set to an archetype, this archetype will replace the eaten item. + </attribute> </type> <!--####################################################################--> @@ -3720,6 +3729,9 @@ If this is set to a : separated (with leading and trailing :) list of races, only players of this race will be able to apply the item. </attribute> + <attribute arch="on_use_yield" editor="garbage generated when eaten" type="string"> + If set to an archetype, this archetype will replace the eaten item. + </attribute> <section name="stats"> <attribute arch="Str" editor="strength" type="int" min="-128" max="127"> The player's strength will rise/fall by the given value for This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ryo...@us...> - 2010-09-11 08:42:29
|
Revision: 8650 http://gridarta.svn.sourceforge.net/gridarta/?rev=8650&view=rev Author: ryo_saeba Date: 2010-09-11 08:42:23 +0000 (Sat, 11 Sep 2010) Log Message: ----------- Add 'death_animation' attribute. Modified Paths: -------------- trunk/crossfire/resource/resource/conf/types.xml Modified: trunk/crossfire/resource/resource/conf/types.xml =================================================================== --- trunk/crossfire/resource/resource/conf/types.xml 2010-09-11 08:38:37 UTC (rev 8649) +++ trunk/crossfire/resource/resource/conf/types.xml 2010-09-11 08:42:23 UTC (rev 8650) @@ -3125,6 +3125,10 @@ If set, this monster is not affected by spells like 'charm monster' and such. </attribute> + <attribute arch="death_animation" editor="death animation" type="string"> + If set to an archetype name, this item will be inserted in the map + when the monster dies. + </attribute> <section name="melee"> <attribute arch="attacktype" editor="attacktype" type="bitmask_attacktype"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ryo...@us...> - 2010-09-11 08:38:43
|
Revision: 8649 http://gridarta.svn.sourceforge.net/gridarta/?rev=8649&view=rev Author: ryo_saeba Date: 2010-09-11 08:38:37 +0000 (Sat, 11 Sep 2010) Log Message: ----------- Add 'accept_living' attribute to altars. Modified Paths: -------------- trunk/crossfire/resource/resource/conf/types.xml Modified: trunk/crossfire/resource/resource/conf/types.xml =================================================================== --- trunk/crossfire/resource/resource/conf/types.xml 2010-09-11 08:34:40 UTC (rev 8648) +++ trunk/crossfire/resource/resource/conf/types.xml 2010-09-11 08:38:37 UTC (rev 8649) @@ -588,6 +588,10 @@ This text will be displayed to the player in the exact moment when the altar is activated. </attribute> + <attribute arch="accept_alive" editor="accept alive things" type="bool"> + If set, this altar will accept living things as sacrifice. + Else they will be ignored. + </attribute> </type> <!--####################################################################--> @@ -663,6 +667,10 @@ This text will be displayed to the player in the exact moment when the altar is activated. </attribute> + <attribute arch="accept_alive" editor="accept alive things" type="bool"> + If set, this altar will accept living things as sacrifice. + Else they will be ignored. + </attribute> </type> <!--####################################################################--> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ryo...@us...> - 2010-09-11 08:34:46
|
Revision: 8648 http://gridarta.svn.sourceforge.net/gridarta/?rev=8648&view=rev Author: ryo_saeba Date: 2010-09-11 08:34:40 +0000 (Sat, 11 Sep 2010) Log Message: ----------- Add the 'price_adjustement' fields. Modified Paths: -------------- trunk/crossfire/resource/resource/conf/types.xml Modified: trunk/crossfire/resource/resource/conf/types.xml =================================================================== --- trunk/crossfire/resource/resource/conf/types.xml 2010-09-11 08:31:07 UTC (rev 8647) +++ trunk/crossfire/resource/resource/conf/types.xml 2010-09-11 08:34:40 UTC (rev 8648) @@ -495,6 +495,17 @@ is decreased by one. I suggest you don't mess with this value - leave the default in place. </attribute> + <attribute arch="price_adjustment" editor="price adjustment" type="float"> + If set, this is the buy and sell price adjustment ratio for the item. + </attribute> + <attribute arch="price_adjustment_buy" editor="price adjustment for buying" type="float"> + If set, this is the adjustment ratio when buying the item. Ignored if + <price> adjustment is set. + </attribute> + <attribute arch="price_adjustment_sell" editor="price adjustment for selling" type="float"> + If set, this is the adjustment ratio when selling the item. Ignored if + <price> adjustment is set. + </attribute> </default_type> <!--####################################################################--> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ryo...@us...> - 2010-09-11 08:31:13
|
Revision: 8647 http://gridarta.svn.sourceforge.net/gridarta/?rev=8647&view=rev Author: ryo_saeba Date: 2010-09-11 08:31:07 +0000 (Sat, 11 Sep 2010) Log Message: ----------- Add 'wc_increase_rate'. Modified Paths: -------------- trunk/crossfire/resource/resource/conf/types.xml Modified: trunk/crossfire/resource/resource/conf/types.xml =================================================================== --- trunk/crossfire/resource/resource/conf/types.xml 2010-09-11 08:27:12 UTC (rev 8646) +++ trunk/crossfire/resource/resource/conf/types.xml 2010-09-11 08:31:07 UTC (rev 8647) @@ -4517,6 +4517,9 @@ <attribute arch="move_type" editor="movement type" type="bitmask_movement"> Determines which movement types this skill grants. </attribute> + <attribute arch="wc_increase_rate" editor="levels per wc point" type="int"> + For combat skills, players will get 1 wc point per this many levels. + </attribute> </type> <!--####################################################################--> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ryo...@us...> - 2010-09-11 08:27:18
|
Revision: 8646 http://gridarta.svn.sourceforge.net/gridarta/?rev=8646&view=rev Author: ryo_saeba Date: 2010-09-11 08:27:12 +0000 (Sat, 11 Sep 2010) Log Message: ----------- Add 'generator_radius'. Modified Paths: -------------- trunk/crossfire/resource/resource/conf/types.xml Modified: trunk/crossfire/resource/resource/conf/types.xml =================================================================== --- trunk/crossfire/resource/resource/conf/types.xml 2010-09-11 08:18:27 UTC (rev 8645) +++ trunk/crossfire/resource/resource/conf/types.xml 2010-09-11 08:27:12 UTC (rev 8646) @@ -3049,6 +3049,11 @@ effect. If enabled, you must also set <breed monster> or check <template generation> and put other monsters in the inventory. </attribute> + <attribute arch="generator_radius" editor="multiply radius" type="int" min="0" max="10"> + If <multiply> is enabled, this is the radius, in square, + in which the generator will try to put a new monster. Default value + is 1. + </attribute> <attribute arch="generator_limit" editor="multiply limit" type="int"> If <multiply> is enabled, this limits how many <breed monster> are created. When the maximum is reached, the generator This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ryo...@us...> - 2010-09-11 08:18:33
|
Revision: 8645 http://gridarta.svn.sourceforge.net/gridarta/?rev=8645&view=rev Author: ryo_saeba Date: 2010-09-11 08:18:27 +0000 (Sat, 11 Sep 2010) Log Message: ----------- Add 'casting_requirements' attribute. Modified Paths: -------------- trunk/crossfire/resource/resource/conf/types.xml Modified: trunk/crossfire/resource/resource/conf/types.xml =================================================================== --- trunk/crossfire/resource/resource/conf/types.xml 2010-09-11 08:12:43 UTC (rev 8644) +++ trunk/crossfire/resource/resource/conf/types.xml 2010-09-11 08:18:27 UTC (rev 8645) @@ -4634,6 +4634,14 @@ <attribute arch="sp" editor="cost spellpoints" type="int" min="0" max="32767"></attribute> <attribute arch="grace" editor="cost grace" type="int" min="0" max="32767"></attribute> <attribute arch="maxsp" editor="double cost per level" type="int" min="0" max="32767"></attribute> + <attribute arch="casting_requirements" editor="consumed items" type="string"> + If set, this is a comma-separated list of items the spell will require and consume to + be cast by players and monsters. + The format is '<optional count> item's name, etc.'. + Examples: + - 'water' will make the spell use one water per casting. + - ' 2 diamonds' will make the spell use 2 diamonds per casting. + </attribute> </type> <!--####################################################################--> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ryo...@us...> - 2010-09-11 08:12:50
|
Revision: 8644 http://gridarta.svn.sourceforge.net/gridarta/?rev=8644&view=rev Author: ryo_saeba Date: 2010-09-11 08:12:43 +0000 (Sat, 11 Sep 2010) Log Message: ----------- Add more generator fields. Modified Paths: -------------- trunk/crossfire/resource/resource/conf/types.xml Modified: trunk/crossfire/resource/resource/conf/types.xml =================================================================== --- trunk/crossfire/resource/resource/conf/types.xml 2010-09-11 08:03:21 UTC (rev 8643) +++ trunk/crossfire/resource/resource/conf/types.xml 2010-09-11 08:12:43 UTC (rev 8644) @@ -3054,6 +3054,14 @@ monster> are created. When the maximum is reached, the generator is destroyed. </attribute> + <attribute arch="generator_max_map" editor="multiply map limit" type="int"> + If <multiply> is enabled, this limits how many alive monsters at + the same time will be on the map. + </attribute> + <attribute arch="generator_code" editor="multiply map code" type="string"> + If <multiply map limit> is set, this groups generators for counting + purposes. If not set, defaults to the generator's name. + </attribute> <attribute arch="maxsp" editor="multiply speed" type="int" min="0" max="32767"> If <multiply> is enabled and <friendly> is not enabled, this limits how often <breed monster> are created. It is This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ryo...@us...> - 2010-09-11 08:03:28
|
Revision: 8643 http://gridarta.svn.sourceforge.net/gridarta/?rev=8643&view=rev Author: ryo_saeba Date: 2010-09-11 08:03:21 +0000 (Sat, 11 Sep 2010) Log Message: ----------- Add 'no_mood_change' flag. Modified Paths: -------------- trunk/crossfire/resource/resource/conf/types.xml Modified: trunk/crossfire/resource/resource/conf/types.xml =================================================================== --- trunk/crossfire/resource/resource/conf/types.xml 2010-09-08 20:27:57 UTC (rev 8642) +++ trunk/crossfire/resource/resource/conf/types.xml 2010-09-11 08:03:21 UTC (rev 8643) @@ -3089,6 +3089,10 @@ If a monster has something in the inventory, this value can be set to reflect the slowdown due to the carried weight. </attribute> + <attribute arch="no_mood_change" editor="no mood change" type="bool"> + If set, this monster is not affected by spells like 'charm monster' + and such. + </attribute> <section name="melee"> <attribute arch="attacktype" editor="attacktype" type="bitmask_attacktype"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-09-08 20:28:03
|
Revision: 8642 http://gridarta.svn.sourceforge.net/gridarta/?rev=8642&view=rev Author: akirschbaum Date: 2010-09-08 20:27:57 +0000 (Wed, 08 Sep 2010) Log Message: ----------- Extract ButtonLists from TabbedPanel. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/TabbedPanel.java Added Paths: ----------- trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/ButtonLists.java trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/ButtonListsListener.java Added: trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/ButtonLists.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/ButtonLists.java (rev 0) +++ trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/ButtonLists.java 2010-09-08 20:27:57 UTC (rev 8642) @@ -0,0 +1,139 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.gui.utils.tabbedpanel; + +import java.util.IdentityHashMap; +import java.util.Map; +import javax.swing.AbstractButton; +import net.sf.gridarta.gui.utils.borderpanel.Location; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * Maintains a set of {@link ButtonLists} for {@link Location Locations} of + * {@link Tab Tabs}. + * @author Andreas Kirschbaum + */ +public class ButtonLists { + + /** + * The list of buttons for each {@link Location}. + */ + @NotNull + private final ButtonList[] buttonLists = new ButtonList[Location.values().length]; + + /** + * Maps button instance to {@link Tab} instance. + */ + @NotNull + private final Map<AbstractButton, Tab> tabs = new IdentityHashMap<AbstractButton, Tab>(); + + /** + * Creates a new instance. + * @param buttonListsListener the listener to notify + */ + public ButtonLists(@NotNull final ButtonListsListener buttonListsListener) { + for (final Location location : Location.values()) { + final ButtonList buttonList = new ButtonList(location); + buttonLists[location.ordinal()] = buttonList; + final ButtonListListener buttonListListener = new ButtonListListener() { + + /** + * {@inheritDoc} + */ + @Override + public void selectedButtonChanged(@Nullable final AbstractButton prevSelectedButton, @Nullable final AbstractButton selectedButton) { + final Tab prevTab = tabs.get(prevSelectedButton); + final Tab tab = tabs.get(selectedButton); + if (prevTab == tab) { + return; + } + buttonListsListener.tabChanged(prevTab, tab); + } + + }; + + buttonList.addButtonListListener(buttonListListener); + } + } + + /** + * Adds a {@link Tab} to the button list associated with the tab's + * location. + * @param tab the tab to add + * @return the button list the tab was added to + */ + @NotNull + public ButtonList addTab(@NotNull final Tab tab) { + final ButtonList buttonList = buttonLists[tab.getLocation().ordinal()]; + final AbstractButton button = tab.getButton(); + buttonList.addButton(button); + tabs.put(button, tab); + return buttonList; + } + + /** + * Moves a {@link Tab} to a new location. + * @param tab the tab to move + * @param location the new location + * @return an array consisting of two button lists the old button from which + * the tab has been removed from and the new button list to which + * the tab was added to + */ + @NotNull + public ButtonList[] moveTab(@NotNull final Tab tab, @NotNull final Location location) { + if (tabs.get(tab.getButton()) == null) { + throw new IllegalArgumentException(); + } + + final ButtonList oldButtonList = buttonLists[tab.getLocation().ordinal()]; + final ButtonList newButtonList = buttonLists[location.ordinal()]; + final AbstractButton oldButton = tab.getButton(); + oldButtonList.removeButton(oldButton); + oldButton.setSelected(false); + tab.setLocation(location); + final AbstractButton newButton = tab.getButton(); + newButtonList.addButton(newButton); + tabs.remove(oldButton); + tabs.put(newButton, tab); + return new ButtonList[] { oldButtonList, newButtonList, }; + } + + /** + * Returns the active {@link Tab} on a given {@link Location} of the main + * 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) { + final ButtonList buttonList = buttonLists[location.ordinal()]; + final AbstractButton selectedButton = buttonList.getSelectedButton(); + if (selectedButton == null) { + return null; + } + + final Tab tab = tabs.get(selectedButton); + assert tab != null; + return tab; + } + +} // class ButtonLists Property changes on: trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/ButtonLists.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/ButtonListsListener.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/ButtonListsListener.java (rev 0) +++ trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/ButtonListsListener.java 2010-09-08 20:27:57 UTC (rev 8642) @@ -0,0 +1,37 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.gui.utils.tabbedpanel; + +import org.jetbrains.annotations.Nullable; + +/** + * Interface for listeners interested in {@link ButtonLists} related events. + * @author Andreas Kirschbaum + */ +public interface ButtonListsListener { + + /** + * Called whenever thee selected tab has changed. + * @param prevTab the previously selected tab + * @param tab the newly selected tab + */ + void tabChanged(@Nullable Tab prevTab, @Nullable Tab tab); + +} // interface ButtonListsListener Property changes on: trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/ButtonListsListener.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Modified: trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/TabbedPanel.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/TabbedPanel.java 2010-09-08 17:12:59 UTC (rev 8641) +++ trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/TabbedPanel.java 2010-09-08 20:27:57 UTC (rev 8642) @@ -24,7 +24,6 @@ import java.awt.Container; import java.util.IdentityHashMap; import java.util.Map; -import javax.swing.AbstractButton; import javax.swing.JMenu; import net.sf.gridarta.gui.utils.MenuUtils; import net.sf.gridarta.gui.utils.borderpanel.BorderPanel; @@ -68,16 +67,31 @@ private final Map<Component, Tab> openTabs = new IdentityHashMap<Component, Tab>(); /** - * The list of buttons for each {@link Location}. + * The {@link ButtonListsListener} attached to {@link #buttonLists}. */ @NotNull - private final ButtonList[] buttonLists = new ButtonList[Location.values().length]; + private final ButtonListsListener buttonListsListener = new ButtonListsListener() { + /** + * {@inheritDoc} + */ + @Override + public void tabChanged(@Nullable final Tab prevTab, @Nullable final Tab tab) { + if (prevTab != null) { + close(prevTab); + } + if (tab != null) { + open(tab); + } + } + + }; + /** - * Maps button instance to {@link Tab} instance. + * The list of buttons for each {@link Location}. */ @NotNull - private final Map<AbstractButton, Tab> tabs = new IdentityHashMap<AbstractButton, Tab>(); + private final ButtonLists buttonLists = new ButtonLists(buttonListsListener); /** * Creates a new instance. @@ -101,33 +115,6 @@ borderPanel = new BorderPanel(centerComponent, borderPanelListener); setLayout(new BorderLayout()); add(borderPanel, BorderLayout.CENTER); - for (final Location location : Location.values()) { - final ButtonList buttonList = new ButtonList(location); - buttonLists[location.ordinal()] = buttonList; - final ButtonListListener buttonListListener = new ButtonListListener() { - - /** - * {@inheritDoc} - */ - @Override - public void selectedButtonChanged(@Nullable final AbstractButton prevSelectedButton, @Nullable final AbstractButton selectedButton) { - final Tab prevTab = tabs.get(prevSelectedButton); - final Tab tab = tabs.get(selectedButton); - if (prevTab == tab) { - return; - } - if (prevTab != null) { - close(prevTab); - } - if (tab != null) { - open(tab); - } - } - - }; - - buttonList.addButtonListListener(buttonListListener); - } } /** @@ -135,23 +122,9 @@ * @param tab the tab to add */ public void addTab(@NotNull final Tab tab) { - final ButtonList buttonList = buttonLists[tab.getLocation().ordinal()]; - final AbstractButton button = tab.getButton(); - buttonList.addButton(button); - tabs.put(button, tab); - + final ButtonList buttonList = buttonLists.addTab(tab); fillContextMenu(tab); - - final Container buttons = buttonList.getButtons(); - if (buttons.getComponentCount() == 1) { - add(buttons, tab.getLocation().getBorderLocation()); - validate(); - repaint(); - } - - if (tab.isOpen()) { - buttonList.selectButton(button); - } + tabAdded(tab, buttonList, tab.isOpen()); } /** @@ -163,15 +136,7 @@ */ @Nullable public Tab getActiveTab(@NotNull final Location location) { - final ButtonList buttonList = buttonLists[location.ordinal()]; - final AbstractButton selectedButton = buttonList.getSelectedButton(); - if (selectedButton == null) { - return null; - } - - final Tab tab = tabs.get(selectedButton); - assert tab != null; - return tab; + return buttonLists.getActiveTab(location); } /** @@ -180,45 +145,52 @@ * @param location the location */ public void moveTab(@NotNull final Tab tab, @NotNull final Location location) { - if (tabs.get(tab.getButton()) == null) { - throw new IllegalArgumentException(); - } - if (tab.getLocation() == location) { return; } final boolean open = tab.isOpen(); - final ButtonList oldButtonList = buttonLists[tab.getLocation().ordinal()]; - final ButtonList newButtonList = buttonLists[location.ordinal()]; - final AbstractButton oldButton = tab.getButton(); - oldButtonList.removeButton(oldButton); - oldButton.setSelected(false); - tab.setLocation(location); - final AbstractButton newButton = tab.getButton(); - newButtonList.addButton(newButton); - tabs.remove(oldButton); - tabs.put(newButton, tab); + final ButtonList[] result = buttonLists.moveTab(tab, location); + final ButtonList oldButtonList = result[0]; + final ButtonList newButtonList = result[1]; fillContextMenu(tab); + tabRemoved(oldButtonList); + tabAdded(tab, newButtonList, open); + } - final Container oldButtons = oldButtonList.getButtons(); - if (oldButtons.getComponentCount() == 0) { - remove(oldButtons); + /** + * Called whenever a {@link Tab} has been added to a {@link ButtonList}. + * Shows the button list component if the first tab has been added. + * @param tab the tab + * @param buttonList the button list + * @param open whether the tab is open + */ + private void tabAdded(@NotNull final Tab tab, @NotNull final ButtonList buttonList, final boolean open) { + final Container buttons = buttonList.getButtons(); + if (buttons.getComponentCount() == 1) { + add(buttons, tab.getLocation().getBorderLocation()); validate(); repaint(); } - final Container newButtons = newButtonList.getButtons(); - if (newButtons.getComponentCount() == 1) { - add(newButtons, tab.getLocation().getBorderLocation()); + if (open) { + buttonList.selectButton(tab.getButton()); + } + } + + /** + * Called whenever a {@link Tab} has been added from a {@link ButtonList}. + * Hides the button list component if the last tab has been removed. + * @param buttonList the button list + */ + private void tabRemoved(final ButtonList buttonList) { + final Container buttons = buttonList.getButtons(); + if (buttons.getComponentCount() == 0) { + remove(buttons); validate(); repaint(); } - - if (open) { - newButtonList.selectButton(newButton); - } } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ryo...@us...> - 2010-09-08 17:13:06
|
Revision: 8641 http://gridarta.svn.sourceforge.net/gridarta/?rev=8641&view=rev Author: ryo_saeba Date: 2010-09-08 17:12:59 +0000 (Wed, 08 Sep 2010) Log Message: ----------- Some translations. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/messages_fr.properties Modified: trunk/src/app/net/sf/gridarta/messages_fr.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages_fr.properties 2010-09-08 17:02:41 UTC (rev 8640) +++ trunk/src/app/net/sf/gridarta/messages_fr.properties 2010-09-08 17:12:59 UTC (rev 8641) @@ -20,7 +20,7 @@ # Warning: This file MUST be ISO-8859-1 # See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding -#chooseNamedObject.title= +chooseNamedObject.title=S\u00e9lection {0} #archCollectTitle= #archCollectArches= #archCollectImages= @@ -28,10 +28,10 @@ #archCollectBmaps= #archCollectErrorIOException.title= #archCollectErrorIOException.message= -#nameOfAnimationObject= +nameOfAnimationObject=d'animation #archCollectAnimations= #archCollectAnimTree= -#nameOfFaceObject= +nameOfFaceObject=d'image # Menus @@ -241,9 +241,9 @@ # Resources -viewTreasurelists.text=Afficher listes de tr\u00e9sors +viewTreasurelists.text=Listes de tr\u00e9sors viewTreasurelists.mnemonic=T -#viewTreasurelists.shortdescription= +viewTreasurelists.shortdescription=Affiche toutes les listes de tr\u00e9sors. collectSpells.text=Rassembler Sorts collectSpells.mnemonic=S @@ -564,13 +564,13 @@ #replaceCancel.text= #attribute dialog -#attribTitle= -#attribHelp.text= -#attribSummary.text= +attribTitle=Attributs de l'objet +attribHelp.text=Aide +attribSummary.text=R\u00e9sum\u00e9 #attribEdit.text= -#attribOk.text= -#attribApply.text= -#attribCancel.text= +attribOk.text=Valider +attribApply.text=Appliquer +attribCancel.text=Annuler fileDialog.filter.maps=Fichier carte fileDialog.filter.png=Images PNG @@ -850,12 +850,12 @@ about.mnemonic=P about.shortdescription=Affiche des informations sur Gridarta. -#aboutTab.title= -#aboutRuntimeProperties.title= +aboutTab.title=\u00c0 propos +aboutRuntimeProperties.title=Param\u00e8tres d'ex\u00e9cution #license.text= #license.mnemonic= -#license.title= +license.title=Licence #license.missing= @@ -869,7 +869,7 @@ mapArchAddInv.shortdescription=Ajoute un objet dans l'inventaire de l'objet courant. mapArchAddEnv.text=Ajout env. -mapArchAddEnv.shortdescription=Ajoute un objet dans l'environnement. +mapArchAddEnv.shortdescription=Ajoute un objet comme conteneur de l'objet courant. #eventAddNew.text= #eventEditData.text= @@ -1012,8 +1012,8 @@ ############### # File Dialogs -#autoGeneratePreviews.text= -#genPreview.text= +autoGeneratePreviews.text=G\u00e9n\u00e9rer les pr\u00e9visualisations ? +genPreview.text=Pr\u00e9visualisation ##################### This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-09-08 17:02:48
|
Revision: 8640 http://gridarta.svn.sourceforge.net/gridarta/?rev=8640&view=rev Author: akirschbaum Date: 2010-09-08 17:02:41 +0000 (Wed, 08 Sep 2010) Log Message: ----------- Retain tab locations in main window across editor restarts. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/crossfire/ChangeLog trunk/daimonin/ChangeLog trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/Tab.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2010-09-08 16:47:32 UTC (rev 8639) +++ trunk/atrinik/ChangeLog 2010-09-08 17:02:41 UTC (rev 8640) @@ -1,3 +1,7 @@ +2010-09-08 Andreas Kirschbaum + + * Retain tab locations in main window across editor restarts. + 2010-09-06 Andreas Kirschbaum * Fix "Move To" actions for tabs in main window. Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2010-09-08 16:47:32 UTC (rev 8639) +++ trunk/crossfire/ChangeLog 2010-09-08 17:02:41 UTC (rev 8640) @@ -1,3 +1,7 @@ +2010-09-08 Andreas Kirschbaum + + * Retain tab locations in main window across editor restarts. + 2010-09-06 Andreas Kirschbaum * Fix "Move To" actions for tabs in main window. Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2010-09-08 16:47:32 UTC (rev 8639) +++ trunk/daimonin/ChangeLog 2010-09-08 17:02:41 UTC (rev 8640) @@ -1,3 +1,7 @@ +2010-09-08 Andreas Kirschbaum + + * Retain tab locations in main window across editor restarts. + 2010-09-06 Andreas Kirschbaum * Fix "Move To" actions for tabs in main window. Modified: trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/Tab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/Tab.java 2010-09-08 16:47:32 UTC (rev 8639) +++ trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/Tab.java 2010-09-08 17:02:41 UTC (rev 8640) @@ -71,6 +71,11 @@ private static final String TAB_HEIGHT_PREFIX = "MainWindow.tab_height."; /** + * The key used to store the current location of a tab. + */ + private static final String TAB_LOCATION = "MainWindow.tab_location."; + + /** * The {@link ActionBuilder}. */ @NotNull @@ -198,11 +203,11 @@ * Creates a new instance. * @param ident the tab's identification string * @param component the component that is shown when this tab is active - * @param location the tab's location + * @param defaultLocation the tab's default location * @param index the tab's index for ordering * @param defaultOpen the tab's default opened status */ - public Tab(@NotNull final String ident, @NotNull final JComponent component, @NotNull final Location location, final int index, final boolean defaultOpen) { + public Tab(@NotNull final String ident, @NotNull final JComponent component, @NotNull final Location defaultLocation, final int index, final boolean defaultOpen) { this.ident = ident; this.component = component; final Dimension preferredSize = component.getPreferredSize(); @@ -213,7 +218,12 @@ height = Math.max(defaultHeight, minimumSize.height); open = preferences.getBoolean(TAB_OPEN_PREFIX + ident, defaultOpen); action = new TabButtonAction(ident); - this.location = location; + final String locationString = preferences.get(TAB_LOCATION + ident, defaultLocation.toString()); + try { + location = Location.valueOf(locationString); + } catch (final IllegalArgumentException ignored) { + location = defaultLocation; + } this.index = index; button = createButton(); final JMenu tmp = MenuUtils.findMenu(popupMenu, "tabButtonMoveTo"); @@ -313,6 +323,7 @@ this.location = location; button = createButton(); + preferences.put(TAB_LOCATION + ident, location.toString()); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-09-08 16:47:39
|
Revision: 8639 http://gridarta.svn.sourceforge.net/gridarta/?rev=8639&view=rev Author: akirschbaum Date: 2010-09-08 16:47:32 +0000 (Wed, 08 Sep 2010) Log Message: ----------- Fix checkstyle issues. Modified Paths: -------------- trunk/model/src/app/net/sf/gridarta/model/floodfill/FillUtils.java trunk/model/src/test/net/sf/gridarta/model/floodfill/FillUtilsTest.java Modified: trunk/model/src/app/net/sf/gridarta/model/floodfill/FillUtils.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/floodfill/FillUtils.java 2010-09-08 06:04:28 UTC (rev 8638) +++ trunk/model/src/app/net/sf/gridarta/model/floodfill/FillUtils.java 2010-09-08 16:47:32 UTC (rev 8639) @@ -111,9 +111,9 @@ */ private static <G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> boolean containsArchetype(@NotNull final MapModel<G, A, R> mapModel, @NotNull final Collection<String> archetypeNames, @NotNull final Point p, final int w, final int h) { final Point pos = new Point(); - for (int dy = -1; dy < h+1; dy++) { + for (int dy = -1; dy < h + 1; dy++) { pos.y = p.y + dy; - for (int dx = -1; dx < w+1; dx++) { + for (int dx = -1; dx < w + 1; dx++) { pos.x = p.x + dx; final MapSquare<G, A, R> mapSquare; // This exception is expected at the border of the map. Modified: trunk/model/src/test/net/sf/gridarta/model/floodfill/FillUtilsTest.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/floodfill/FillUtilsTest.java 2010-09-08 06:04:28 UTC (rev 8638) +++ trunk/model/src/test/net/sf/gridarta/model/floodfill/FillUtilsTest.java 2010-09-08 16:47:32 UTC (rev 8639) @@ -28,7 +28,6 @@ import net.sf.gridarta.model.gameobject.TestGameObject; import net.sf.gridarta.model.maparchobject.TestMapArchObject; import net.sf.gridarta.model.mapmodel.CannotInsertGameObjectException; -import net.sf.gridarta.model.mapmodel.InsertionMode; import net.sf.gridarta.model.mapmodel.MapModel; import net.sf.gridarta.model.mapmodel.TestMapModelCreator; import net.sf.gridarta.model.mapmodel.TestMapModelHelper; @@ -42,8 +41,9 @@ public class FillUtilsTest { /** - * Checks that {@link FillUtils#fill(MapModel, Point[], InsertionMode, List, - * int, boolean)} works correctly when skipping adjacent squares. + * Checks that {@link FillUtils#fill(MapModel, Point[], + * net.sf.gridarta.model.mapmodel.InsertionMode, List, int, boolean)} works + * correctly when skipping adjacent squares. * @throws DuplicateArchetypeException if the test fails * @throws CannotInsertGameObjectException if the test fails */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-09-08 06:04:35
|
Revision: 8638 http://gridarta.svn.sourceforge.net/gridarta/?rev=8638&view=rev Author: akirschbaum Date: 2010-09-08 06:04:28 +0000 (Wed, 08 Sep 2010) Log Message: ----------- Move context menu definition of tabs in menu window into text resources. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/action.properties trunk/src/app/net/sf/gridarta/gui/utils/MenuUtils.java trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/Tab.java Modified: trunk/src/app/net/sf/gridarta/action.properties =================================================================== --- trunk/src/app/net/sf/gridarta/action.properties 2010-09-08 05:58:21 UTC (rev 8637) +++ trunk/src/app/net/sf/gridarta/action.properties 2010-09-08 06:04:28 UTC (rev 8638) @@ -167,4 +167,5 @@ ############# # Main Window +tabButtonMenu.menu=tabButtonMoveTo tabButtonMoveTo.menu= Modified: trunk/src/app/net/sf/gridarta/gui/utils/MenuUtils.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/MenuUtils.java 2010-09-08 05:58:21 UTC (rev 8637) +++ trunk/src/app/net/sf/gridarta/gui/utils/MenuUtils.java 2010-09-08 06:04:28 UTC (rev 8638) @@ -26,6 +26,7 @@ import javax.swing.JMenuItem; import javax.swing.JSeparator; import javax.swing.MenuElement; +import net.sf.gridarta.utils.ActionUtils; import net.sf.japi.swing.action.ActionBuilder; import net.sf.japi.swing.action.ActionBuilderFactory; import org.jetbrains.annotations.NotNull; @@ -125,4 +126,28 @@ return menuItem != null && menuItem instanceof JMenu ? (JMenu) menuItem : null; } + /** + * Returns a {@link JMenu} by action key. + * @param menuElement the menu element to search for the action key + * @param key the action key to search + * @return the menu or <code>null</code> if not found + */ + @Nullable + public static JMenu findMenu(@NotNull final MenuElement menuElement, @NotNull final String key) { + for (final MenuElement subMenuElement : menuElement.getSubElements()) { + if (subMenuElement instanceof JMenu) { + final JMenu subMenu = (JMenu) subMenuElement; + if (ActionUtils.getActionId(subMenu.getAction()).equals(key)) { + return subMenu; + } + + final JMenu ret = findMenu(subMenu, key); + if (ret != null) { + return ret; + } + } + } + return null; + } + } // class MenuUtils Modified: trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/Tab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/Tab.java 2010-09-08 05:58:21 UTC (rev 8637) +++ trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/Tab.java 2010-09-08 06:04:28 UTC (rev 8638) @@ -25,6 +25,7 @@ import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; +import java.util.MissingResourceException; import java.util.prefs.Preferences; import javax.swing.AbstractButton; import javax.swing.Action; @@ -32,6 +33,7 @@ import javax.swing.JMenu; import javax.swing.JPopupMenu; import net.sf.gridarta.MainControl; +import net.sf.gridarta.gui.utils.MenuUtils; import net.sf.gridarta.gui.utils.Severity; import net.sf.gridarta.gui.utils.borderpanel.Location; import net.sf.gridarta.utils.EventListenerList2; @@ -113,7 +115,7 @@ * The button's context menu. */ @NotNull - private final JPopupMenu popupMenu = new JPopupMenu(); + private final JPopupMenu popupMenu = ACTION_BUILDER.createPopupMenu(false, "tabButtonMenu"); /** * The "Move To" menu within {@link #popupMenu}. @@ -214,7 +216,11 @@ this.location = location; this.index = index; button = createButton(); - moveToMenu = ACTION_BUILDER.createMenu(false, "tabButtonMoveTo"); + final JMenu tmp = MenuUtils.findMenu(popupMenu, "tabButtonMoveTo"); + if (tmp == null) { + throw new MissingResourceException("missing action ", MenuUtils.class.getName(), "tabButtonMoveTo"); + } + moveToMenu = tmp; popupMenu.add(moveToMenu); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-09-08 05:58:27
|
Revision: 8637 http://gridarta.svn.sourceforge.net/gridarta/?rev=8637&view=rev Author: akirschbaum Date: 2010-09-08 05:58:21 +0000 (Wed, 08 Sep 2010) Log Message: ----------- Add @NotNull annotation. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java Modified: trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java 2010-09-08 05:50:06 UTC (rev 8636) +++ trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java 2010-09-08 05:58:21 UTC (rev 8637) @@ -120,6 +120,7 @@ /** * The Logger for printing log messages. */ + @NotNull private static final Category log = Logger.getLogger(GridartaEditor.class); /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-09-08 05:50:13
|
Revision: 8636 http://gridarta.svn.sourceforge.net/gridarta/?rev=8636&view=rev Author: akirschbaum Date: 2010-09-08 05:50:06 +0000 (Wed, 08 Sep 2010) Log Message: ----------- Inline variable. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/TabbedPanel.java Modified: trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/TabbedPanel.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/TabbedPanel.java 2010-09-08 05:49:14 UTC (rev 8635) +++ trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/TabbedPanel.java 2010-09-08 05:50:06 UTC (rev 8636) @@ -232,8 +232,7 @@ final Location location = tab.getLocation(); for (final Location thisLocation : Location.values()) { if (thisLocation != location) { - final String XXX = "tabButtonMoveTo" + thisLocation.getName(); - moveToMenu.add(ACTION_BUILDER.createAction(true, XXX, moveToActions)); + moveToMenu.add(ACTION_BUILDER.createAction(true, "tabButtonMoveTo" + thisLocation.getName(), moveToActions)); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |