From: <aki...@us...> - 2008-08-15 17:20:45
|
Revision: 4835 http://gridarta.svn.sourceforge.net/gridarta/?rev=4835&view=rev Author: akirschbaum Date: 2008-08-15 17:20:52 +0000 (Fri, 15 Aug 2008) Log Message: ----------- Convert fields to local variables. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainControl.java trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2008-08-15 17:18:27 UTC (rev 4834) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2008-08-15 17:20:52 UTC (rev 4835) @@ -181,15 +181,9 @@ /** The Spells. */ private final Spells<GameObjectSpell<GameObject, MapArchObject, Archetype>> gameObjectSpells = new Spells<GameObjectSpell<GameObject, MapArchObject, Archetype>>(); - /** The ArchetypeSet, which is a registry of all Archetypes. */ - private final ArchetypeSet archetypeSet; - /** The current script controller. */ private final ScriptController scriptControl; - /** The list of archtype-data (loaded from "types.xml"). */ - private final ArchetypeTypeSet<GameObject, MapArchObject, Archetype> archetypeTypeSet; - /** The map validators. */ private final DelegatingMapValidator<GameObject, MapArchObject, Archetype> validators; @@ -205,13 +199,7 @@ /** The factory for creating new maps or pickmaps. */ private final NewMapDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic> newMapDialogFactory; - /** - * The {@link GameObjectAttributesDialogFactory} to use. - */ @NotNull - private final GameObjectAttributesDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic> gameObjectAttributesDialogFactory; - - @NotNull private final GameObjectAttributesControl gameObjectAttributesControl; /** @@ -236,7 +224,7 @@ ScriptArchEditor.setGlobalSettings(globalSettings, mapManager); ScriptedEventEditor.setGlobalSettings(globalSettings); final AnimationObjects<AnimationObject> animationObjects = new cfeditor.gameobject.anim.AnimationObjects(); - archetypeSet = new ArchetypeSet(this, globalSettings, editTypes, animationObjects, faceObjects, ((GlobalSettingsImpl) globalSettings).getImageSet(), gridartaObjectsFactory); + final ArchetypeSet archetypeSet = new ArchetypeSet(this, globalSettings, editTypes, animationObjects, faceObjects, ((GlobalSettingsImpl) globalSettings).getImageSet(), gridartaObjectsFactory); ScriptedEvent.setArchetypeSet(archetypeSet); final boolean mapTileListBottom = prefs.getBoolean(MainView.MAP_TILE_LIST_BOTTOM_KEY, MainView.MAP_TILE_LIST_BOTTOM_DEFAULT); ACTION_FACTORY.createActions(true, this, "createNew", "open", "options", "exit", "newScript", "editScript", "zoom", "gc", "onlineHelp", "tod", "about"); @@ -247,9 +235,9 @@ newMapDialogFactory = new NewMapDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, mapManager, gridartaObjectsFactory, IGUIConstants.DEF_MAPSIZE, IGUIConstants.DEF_MAPSIZE, 0, false, false, IGUIConstants.DEF_PICKMAP_WIDTH, IGUIConstants.DEF_PICKMAP_HEIGHT); pickmapChooserControl = new PickmapChooserControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(newMapDialogFactory, this, gridartaObjectsFactory, new File(globalSettings.getMapDir(), IGUIConstants.PICKMAP_DIR), mapManager); newMapDialogFactory.setPickmapChooserControl(pickmapChooserControl); - archetypeTypeSet = new ArchetypeTypeSet<GameObject, MapArchObject, Archetype>(); + final ArchetypeTypeSet<GameObject, MapArchObject, Archetype> archetypeTypeSet = new ArchetypeTypeSet<GameObject, MapArchObject, Archetype>(); final ReplaceDialogManager<GameObject, MapArchObject, Archetype, CMapViewBasic> replaceDialogManager = new ReplaceDialogManager<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, archetypeSet, copyBuffer); - gameObjectAttributesDialogFactory = new GameObjectAttributesDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic>(archetypeTypeSet, archetypeSet, mapManager); + final GameObjectAttributesDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic> gameObjectAttributesDialogFactory = new GameObjectAttributesDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic>(archetypeTypeSet, archetypeSet, mapManager); archetypeChooserControl.init(false, gameObjectAttributesDialogFactory); objectChooser = new DefaultObjectChooser<GameObject, MapArchObject, Archetype, CMapViewBasic>(archetypeChooserControl, pickmapChooserControl); mapViewManager = new MapViewManager<GameObject, MapArchObject, Archetype, CMapViewBasic>(); Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2008-08-15 17:18:27 UTC (rev 4834) +++ trunk/daimonin/src/daieditor/CMainControl.java 2008-08-15 17:20:52 UTC (rev 4835) @@ -223,15 +223,9 @@ /** The Spells. */ private final Spells<GameObjectSpell<GameObject, MapArchObject, Archetype>> gameObjectSpells = new Spells<GameObjectSpell<GameObject, MapArchObject, Archetype>>(); - /** The ArchetypeSet, which is a registry of all Archetypes. */ - private final ArchetypeSet archetypeSet; - /** Whether to display double arches like stacked walls in stacked version. */ private boolean drawDouble; - /** The list of archtype-data (loaded from "types.xml"). */ - private final ArchetypeTypeSet<GameObject, MapArchObject, Archetype> archetypeTypeSet; - /** Client Control Component. */ private ProcessRunner controlClient; @@ -265,22 +259,10 @@ /** The factory for creating new maps or pickmaps. */ private final NewMapDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic> newMapDialogFactory; - /** - * The {@link GameObjectAttributesDialogFactory} to use. - */ @NotNull - private final GameObjectAttributesDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic> gameObjectAttributesDialogFactory; - - @NotNull private final GameObjectAttributesControl gameObjectAttributesControl; /** - * The map view manager instance. - */ - @NotNull - private final MapViewManager<GameObject, MapArchObject, Archetype, CMapViewBasic> mapViewManager; - - /** * The file control instance. */ @NotNull @@ -296,7 +278,7 @@ ScriptArchEditor.setGlobalSettings(globalSettings, mapManager); ScriptedEventEditor.setGlobalSettings(globalSettings); final AnimationObjects<AnimationObject> animationObjects = new daieditor.gameobject.anim.AnimationObjects(); - archetypeSet = new ArchetypeSet(this, globalSettings, editTypes, animationObjects, faceObjects, gridartaObjectsFactory); + final ArchetypeSet archetypeSet = new ArchetypeSet(this, globalSettings, editTypes, animationObjects, faceObjects, gridartaObjectsFactory); GameObject.setArchetypeSet(archetypeSet); ScriptedEvent.setArchetypeSet(archetypeSet); final boolean mapTileListBottom = prefs.getBoolean(MainView.MAP_TILE_LIST_BOTTOM_KEY, MainView.MAP_TILE_LIST_BOTTOM_DEFAULT); @@ -310,12 +292,12 @@ newMapDialogFactory = new NewMapDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, mapManager, gridartaObjectsFactory, IGUIConstants.DEF_MAPSIZE, IGUIConstants.DEF_MAPSIZE, IGUIConstants.DEF_MAPDIFFICULTY, true, true, IGUIConstants.DEF_PICKMAP_WIDTH, IGUIConstants.DEF_PICKMAP_HEIGHT); pickmapChooserControl = new PickmapChooserControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(newMapDialogFactory, this, gridartaObjectsFactory, new File(globalSettings.getArchDefaultFolder(), IGUIConstants.PICKMAP_DIR), mapManager); newMapDialogFactory.setPickmapChooserControl(pickmapChooserControl); - archetypeTypeSet = new ArchetypeTypeSet<GameObject, MapArchObject, Archetype>(); + final ArchetypeTypeSet<GameObject, MapArchObject, Archetype> archetypeTypeSet = new ArchetypeTypeSet<GameObject, MapArchObject, Archetype>(); final ReplaceDialogManager<GameObject, MapArchObject, Archetype, CMapViewBasic> replaceDialogManager = new ReplaceDialogManager<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, archetypeSet, copyBuffer); - gameObjectAttributesDialogFactory = new GameObjectAttributesDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic>(archetypeTypeSet, archetypeSet, mapManager); + final GameObjectAttributesDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic> gameObjectAttributesDialogFactory = new GameObjectAttributesDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic>(archetypeTypeSet, archetypeSet, mapManager); archetypeChooserControl.init(true, gameObjectAttributesDialogFactory); objectChooser = new DefaultObjectChooser<GameObject, MapArchObject, Archetype, CMapViewBasic>(archetypeChooserControl, pickmapChooserControl); - mapViewManager = new MapViewManager<GameObject, MapArchObject, Archetype, CMapViewBasic>(); + final MapViewManager<GameObject, MapArchObject, Archetype, CMapViewBasic> mapViewManager = new MapViewManager<GameObject, MapArchObject, Archetype, CMapViewBasic>(); final SelectedSquareControl<GameObject, MapArchObject, Archetype, CMapViewBasic> selectedSquareControl = new SelectedSquareControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(ACTION_FACTORY, gameObjectAttributesDialogFactory, objectChooser, mapManager, mapViewManager, editTypes, mapTileListBottom, GUIUtils.getSysIcon(IGUIConstants.TILE_NORTH), archetypeSet); final SelectedSquareView<GameObject, MapArchObject, Archetype, CMapViewBasic> selectedSquareView = selectedSquareControl.getSelectedSquareView(); new MapCursorControl<GameObject, MapArchObject, Archetype, CMapViewBasic>("daieditor", this, gameObjectAttributesDialogFactory, mapManager, mapViewManager, selectedSquareControl, selectedSquareView); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |