From: <aki...@us...> - 2008-11-09 11:27:49
|
Revision: 5680 http://gridarta.svn.sourceforge.net/gridarta/?rev=5680&view=rev Author: akirschbaum Date: 2008-11-09 11:27:45 +0000 (Sun, 09 Nov 2008) Log Message: ----------- Remove DefaultMapReaderFactory.setArchetypeSet(). Modified Paths: -------------- trunk/src/app/net/sf/gridarta/AbstractMainControl.java trunk/src/app/net/sf/gridarta/io/DefaultMapReaderFactory.java trunk/src/test/net/sf/gridarta/map/DefaultMapModelTest.java Modified: trunk/src/app/net/sf/gridarta/AbstractMainControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/AbstractMainControl.java 2008-11-09 11:19:27 UTC (rev 5679) +++ trunk/src/app/net/sf/gridarta/AbstractMainControl.java 2008-11-09 11:27:45 UTC (rev 5680) @@ -339,7 +339,7 @@ globalSettings.readGlobalSettings(); final ArchetypeFactory<G, A, R> archetypeFactory = newArchetypeFactory(); final ArchetypeSet<G, A, R> archetypeSet = newArchetypeSet(globalSettings, archetypeFactory); - final DefaultMapReaderFactory<G, A, R, V> mapReaderFactory = new DefaultMapReaderFactory<G, A, R, V>(mapArchObjectFactory, mapArchObjectParserFactory, gameObjectParserFactory); + final DefaultMapReaderFactory<G, A, R, V> mapReaderFactory = new DefaultMapReaderFactory<G, A, R, V>(mapArchObjectFactory, mapArchObjectParserFactory, gameObjectParserFactory, archetypeSet); final MapControlFactory<G, A, R, V> mapControlFactory = newMapControlFactory(mapReaderFactory, mapArchObjectFactory, mapArchObjectParserFactory); final DefaultMapManager<G, A, R, V> tmpMapManager = new DefaultMapManager<G, A, R, V>(key, mapReaderFactory, mapControlFactory, globalSettings); mapManager = tmpMapManager; @@ -347,7 +347,6 @@ mapReaderFactory.setEditTypes(editTypes); mapControlFactory.setEditTypes(editTypes); ScriptedEventEditor.setGlobalSettings(globalSettings); - mapReaderFactory.setArchetypeSet(archetypeSet); AbstractScriptedEvent.init(archetypeSet); PathManager.setGlobalSettings(globalSettings); newMapDialogFactory = newNewMapDialogFactory(mapManager, mapArchObjectFactory); Modified: trunk/src/app/net/sf/gridarta/io/DefaultMapReaderFactory.java =================================================================== --- trunk/src/app/net/sf/gridarta/io/DefaultMapReaderFactory.java 2008-11-09 11:19:27 UTC (rev 5679) +++ trunk/src/app/net/sf/gridarta/io/DefaultMapReaderFactory.java 2008-11-09 11:27:45 UTC (rev 5680) @@ -51,7 +51,7 @@ /** The {@link ArchetypeSet} instance. */ @NotNull - private ArchetypeSet<G, A, R> archetypeSet; + private final ArchetypeSet<G, A, R> archetypeSet; /** The {@link MainView} instance to use. */ @NotNull @@ -67,11 +67,13 @@ * @param mapArchObjectParserFactory the map arch object parser factory * instance * @param gameObjectParserFactory the game object parser factory instance + * @param archetypeSet the archetype set instance */ - public DefaultMapReaderFactory(@NotNull final MapArchObjectFactory<A> mapArchObjectFactory, @NotNull final MapArchObjectParserFactory<A> mapArchObjectParserFactory, @NotNull final GameObjectParserFactory<G, A, R> gameObjectParserFactory) { + public DefaultMapReaderFactory(@NotNull final MapArchObjectFactory<A> mapArchObjectFactory, @NotNull final MapArchObjectParserFactory<A> mapArchObjectParserFactory, @NotNull final GameObjectParserFactory<G, A, R> gameObjectParserFactory, @NotNull final ArchetypeSet<G, A, R> archetypeSet) { this.mapArchObjectFactory = mapArchObjectFactory; this.mapArchObjectParserFactory = mapArchObjectParserFactory; this.gameObjectParserFactory = gameObjectParserFactory; + this.archetypeSet = archetypeSet; } /** @@ -85,15 +87,6 @@ /** * Finishes object creation. - * @param archetypeSet the archetype set instance - */ - @Deprecated - public void setArchetypeSet(@NotNull final ArchetypeSet<G, A, R> archetypeSet) { - this.archetypeSet = archetypeSet; - } - - /** - * Finishes object creation. * @param mainView the main view instance */ @Deprecated Modified: trunk/src/test/net/sf/gridarta/map/DefaultMapModelTest.java =================================================================== --- trunk/src/test/net/sf/gridarta/map/DefaultMapModelTest.java 2008-11-09 11:19:27 UTC (rev 5679) +++ trunk/src/test/net/sf/gridarta/map/DefaultMapModelTest.java 2008-11-09 11:27:45 UTC (rev 5680) @@ -404,13 +404,13 @@ final MapArchObjectFactory<TestMapArchObject> mapArchObjectFactory = new TestMapArchObjectFactory(); final MapArchObjectParserFactory<TestMapArchObject> mapArchObjectParserFactory = new TestMapArchObjectParserFactory(); final GameObjectParserFactory<TestGameObject, TestMapArchObject, TestArchetype> gameObjectParserFactory = new TestGameObjectParserFactory(); - final MapReaderFactory<TestGameObject, TestMapArchObject> mapReaderFactory = new DefaultMapReaderFactory<TestGameObject, TestMapArchObject, TestArchetype, TestMapViewBasic>(mapArchObjectFactory, mapArchObjectParserFactory, gameObjectParserFactory); + final TestArchetypeFactory archetypeFactory = new TestArchetypeFactory(); + final TestArchetypeSet archetypeSet = new TestArchetypeSet(archetypeFactory); + final MapReaderFactory<TestGameObject, TestMapArchObject> mapReaderFactory = new DefaultMapReaderFactory<TestGameObject, TestMapArchObject, TestArchetype, TestMapViewBasic>(mapArchObjectFactory, mapArchObjectParserFactory, gameObjectParserFactory, archetypeSet); final MapControlFactory<TestGameObject, TestMapArchObject, TestArchetype, TestMapViewBasic> mapControlFactory = new TestMapControlFactory(mapReaderFactory); final RendererFactory<TestGameObject, TestMapArchObject, TestArchetype> rendererFactory = new TestRendererFactory(); final GlobalSettings globalSettings = new TestGlobalSettings(); - final TestArchetypeFactory archetypeFactory = new TestArchetypeFactory(); final TestMapArchObject mapArchObject = new TestMapArchObject(); - final TestArchetypeSet archetypeSet = new TestArchetypeSet(archetypeFactory); final ArchetypeChooserModel<TestGameObject, TestMapArchObject, TestArchetype, TestMapViewBasic> archetypeChooserModel = new ArchetypeChooserModel<TestGameObject, TestMapArchObject, TestArchetype, TestMapViewBasic>(archetypeSet); final AutojoinLists<TestGameObject, TestMapArchObject, TestArchetype> autojoinLists = new AutojoinLists<TestGameObject, TestMapArchObject, TestArchetype>(); final MapManager<TestGameObject, TestMapArchObject, TestArchetype, TestMapViewBasic> mapManager = new DefaultMapManager<TestGameObject, TestMapArchObject, TestArchetype, TestMapViewBasic>("test", mapReaderFactory, mapControlFactory, globalSettings); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |