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: <chr...@us...> - 2006-11-03 00:11:29
|
Revision: 609 http://svn.sourceforge.net/gridarta/?rev=609&view=rev Author: christianhujer Date: 2006-11-02 16:11:21 -0800 (Thu, 02 Nov 2006) Log Message: ----------- Updated todo. Modified Paths: -------------- trunk/src/doc/dev/todo.xhtml Modified: trunk/src/doc/dev/todo.xhtml =================================================================== --- trunk/src/doc/dev/todo.xhtml 2006-11-02 22:10:59 UTC (rev 608) +++ trunk/src/doc/dev/todo.xhtml 2006-11-03 00:11:21 UTC (rev 609) @@ -34,6 +34,21 @@ <br /> See also: <a href="http://www.daimonin.net/mantis/view.php?id=399">Daimonin Mantis #0000399: adding a book interface to the editor</a> </dd> + <dt>Cher: Merge tool selector from daimonin to gridarta/crossfire</dt> + <dd> + Daimonin has a configurable tool selector. + This tool selector allows assigning specific tools (currently available: delete, insert, select) to the three mouse buttons. + This should be moved to gridarta to make it available for crossfire, too. + Additionally this tool should be extended to have a context menu tool that's the default tool for the right mouse button. + Also add a feature that resets the tool config to its initial state. + TODO: discuss with the daimonin and crossfire communities if they want rmb for context menu per default in new versions of gridarta. + </dd> + <dt>Cher: Merge keyboard control from daimonin to gridarta/crossfire</dt> + <dd> + Daimonin has a keyboard control. + The code already is mostly moved from daimonin to gridarta, but still only used by gridarta, not by crossfire. + Think about keyboard shortcuts that are good for GUI users and that are good for vi users. + </dd> </dl> <h2>Other</h2> <dl> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-02 22:11:11
|
Revision: 608 http://svn.sourceforge.net/gridarta/?rev=608&view=rev Author: akirschbaum Date: 2006-11-02 14:10:59 -0800 (Thu, 02 Nov 2006) Log Message: ----------- Unify logging statements. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java trunk/daimonin/src/daieditor/gameobject/ArchetypeSet.java Modified: trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java 2006-11-02 19:38:34 UTC (rev 607) +++ trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java 2006-11-02 22:10:59 UTC (rev 608) @@ -132,7 +132,9 @@ public void loadArchetypes() { final Date timeStart = new Date(); // get starting time setLoadStatus(LoadStatus.LOADING); // status: loading - log.info("Start to collect archetypes..."); + if (log.isInfoEnabled()) { + log.info("Start to collect archetypes..."); + } CMainStatusbar.getInstance().setText(" Loading Archetypes... "); // browse arch archive @@ -201,8 +203,6 @@ stream.close(); } loadAllCrossfirePNGFromCollect(); - } catch (final FileNotFoundException e) { - log.error("Error:", e); } catch (final IOException e) { log.error("Error:", e); } Modified: trunk/daimonin/src/daieditor/gameobject/ArchetypeSet.java =================================================================== --- trunk/daimonin/src/daieditor/gameobject/ArchetypeSet.java 2006-11-02 19:38:34 UTC (rev 607) +++ trunk/daimonin/src/daieditor/gameobject/ArchetypeSet.java 2006-11-02 22:10:59 UTC (rev 608) @@ -64,6 +64,7 @@ import static net.sf.japi.swing.ActionFactory.getFactory; import net.sf.japi.swing.Progress; import net.sf.japi.swing.ProgressDisplay; +import org.apache.log4j.Logger; /** * The <code>ArchetypeSet</code> contains all the Archetypes. @@ -73,6 +74,8 @@ */ public final class ArchetypeSet extends AbstractArchetypeSet<GameObject> { + private static final Logger log = Logger.getLogger(ArchetypeSet.class); + /** Action Factory. */ private static final ActionFactory ACTION_FACTORY = getFactory("daieditor"); @@ -132,7 +135,9 @@ public void loadArchetypes() { final long timeStart = System.currentTimeMillis(); setLoadStatus(LoadStatus.LOADING); // status: loading - System.err.println("Start to collect archetypes..."); + if (log.isInfoEnabled()) { + log.info("Start to collect archetypes..."); + } mainControl.setStatusText(" Loading Archetypes... "); // browse arch archive @@ -169,7 +174,9 @@ } else { // display the time it took to collect arches: setLoadStatus(LoadStatus.COMPLETE); // status: stack completed - System.err.println("Arch collect took " + (System.currentTimeMillis() - timeStart) / 1000.0 + " Seconds"); + if (log.isInfoEnabled()) { + log.info("Arch collect took " + (System.currentTimeMillis() - timeStart) / 1000.0 + " Seconds"); + } // load pickmaps CPickmapPanel.getInstance().loadPickmaps(); @@ -258,7 +265,7 @@ // TODO:Then why not check this and throw an exception if not? final GameObject archetype = getArchetype(defArchName); if (name == null || defArchName == null || name.length() == 0 || defArchName.length() == 0 || archetype == null) { - System.err.println("Artifacts file: Line " + lineCount + " Object >" + defArchName + "< / >" + name + "< / >" + objTitle + "< has missing name or defArch"); + log.warn("Artifacts file: Line " + lineCount + " Object >" + defArchName + "< / >" + name + "< / >" + objTitle + "< has missing name or defArch"); } else if (editorCode != 0 && editorCode != 2) { // the next line of our file is part of a arch parse until a "end" comes // now the editor will do the same as the real server: // get the default arch as base and parse the new values over it @@ -282,9 +289,9 @@ myInput.close(); } } catch (final FileNotFoundException e) { - System.err.println("Artifacts file '" + fname + "' could not be found"); + log.warn("Artifacts file '" + fname + "' could not be found"); } catch (final IOException e) { - System.err.println("IOException in reading Artifacts!"); + log.warn("IOException in reading Artifacts!"); } } @@ -310,7 +317,7 @@ } } catch (final IOException e) { // TODO - System.err.println(e); + log.error("Error:", e); } catch (final DuplicateFaceException e) { ACTION_FACTORY.showMessageDialog(mainControl.getMainView(), "loadDuplicateFace", e.getDuplicate().getFaceName(), e.getDuplicate().getFilename()); } @@ -352,7 +359,7 @@ loadArchFromFiles(new File(f, entry), index, false); } } else { - System.err.println("NULL entries: " + f); + log.warn("NULL entries: " + f); } folderLevel--; } else { @@ -363,7 +370,7 @@ loadArchFromFiles(new File(f, entry), index, true); } } else { - System.err.println("NULL entries: " + f); + log.warn("NULL entries: " + f); } folderLevel--; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-02 19:38:48
|
Revision: 607 http://svn.sourceforge.net/gridarta/?rev=607&view=rev Author: akirschbaum Date: 2006-11-02 11:38:34 -0800 (Thu, 02 Nov 2006) Log Message: ----------- Unify logging statements. Modified Paths: -------------- trunk/crossfire/src/cfeditor/ScriptArchData.java trunk/daimonin/src/daieditor/ScriptArchData.java Modified: trunk/crossfire/src/cfeditor/ScriptArchData.java =================================================================== --- trunk/crossfire/src/cfeditor/ScriptArchData.java 2006-11-02 19:29:38 UTC (rev 606) +++ trunk/crossfire/src/cfeditor/ScriptArchData.java 2006-11-02 19:38:34 UTC (rev 607) @@ -194,7 +194,9 @@ // validate this event if (!se.isValid()) { // this event is invalid - log.info("-> Deleting invalid event..."); + if (log.isInfoEnabled()) { + log.info("-> Deleting invalid event..."); + } eventList.remove(i); numEvents--; // adjust indices for removed element i--; @@ -294,7 +296,7 @@ } } } else { - log.error("Error in openEventScript(): No event for '" + eventType + "'"); + log.error("Error in modifyEventScript(): No event for '" + eventType + "'"); } } Modified: trunk/daimonin/src/daieditor/ScriptArchData.java =================================================================== --- trunk/daimonin/src/daieditor/ScriptArchData.java 2006-11-02 19:29:38 UTC (rev 606) +++ trunk/daimonin/src/daieditor/ScriptArchData.java 2006-11-02 19:38:34 UTC (rev 607) @@ -62,15 +62,15 @@ */ public final class ScriptArchData implements Serializable { + /** Logger. */ + private static final Logger log = Logger.getLogger(ScriptArchData.class); + /** Serial Version. */ private static final long serialVersionUID = 1L; /** ActionFactory. */ private static final ActionFactory ACTION_FACTORY = getFactory("daieditor"); - /** Logger. */ - private static final Logger log = Logger.getLogger(ScriptArchData.class); - // popup frame to edit script paths: private static JDialog pathFrame; @@ -159,7 +159,9 @@ // validate this event if (!se.isValid()) { // this event is invalid - System.err.println("-> Deleting invalid event..."); + if (log.isInfoEnabled()) { + log.info("-> Deleting invalid event..."); + } tmp.remove(); } } @@ -229,7 +231,7 @@ } } } else { - System.err.println("Error in ScriptArchData.modifyEventScript(): No event selected?"); + log.error("Error in modifyEventScript(): No event selected?"); } return changed; @@ -606,13 +608,15 @@ final int eventType = getEventType(); if (filePath == null || filePath.length() <= 0) { - System.err.println("Map Error: Found " + typeName(eventType) + " event without file name!"); + log.error("Map Error: Found " + typeName(eventType) + " event without file name!"); return false; } if (pluginName == null || pluginName.length() <= 0) { pluginName = "Python"; - System.err.println("Found " + typeName(eventType) + " without plugin name. Setting to \"Python\"."); + if (log.isInfoEnabled()) { + log.info("Found " + typeName(eventType) + " without plugin name. Setting to \"Python\"."); + } } filePath = filePath.replace('\\', '/'); // just make sure there are only slashes: '/' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-02 19:29:44
|
Revision: 606 http://svn.sourceforge.net/gridarta/?rev=606&view=rev Author: akirschbaum Date: 2006-11-02 11:29:38 -0800 (Thu, 02 Nov 2006) Log Message: ----------- Unify logging statements. Modified Paths: -------------- trunk/daimonin/src/daieditor/CopyBuffer.java Modified: trunk/daimonin/src/daieditor/CopyBuffer.java =================================================================== --- trunk/daimonin/src/daieditor/CopyBuffer.java 2006-11-02 19:27:21 UTC (rev 605) +++ trunk/daimonin/src/daieditor/CopyBuffer.java 2006-11-02 19:29:38 UTC (rev 606) @@ -35,6 +35,7 @@ import java.util.List; import net.sf.gridarta.Size2D; import net.sf.gridarta.map.MapSquare; +import org.apache.log4j.Logger; import org.jetbrains.annotations.Nullable; /** @@ -44,6 +45,8 @@ */ public final class CopyBuffer { + private static final Logger log = Logger.getLogger(CopyBuffer.class); + /** Mode for operations. */ private enum Mode { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-02 19:27:32
|
Revision: 605 http://svn.sourceforge.net/gridarta/?rev=605&view=rev Author: akirschbaum Date: 2006-11-02 11:27:21 -0800 (Thu, 02 Nov 2006) Log Message: ----------- Unify logging statements. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CPickmapPanel.java trunk/daimonin/src/daieditor/CPickmapPanel.java Modified: trunk/crossfire/src/cfeditor/CPickmapPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-11-02 19:21:17 UTC (rev 604) +++ trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-11-02 19:27:21 UTC (rev 605) @@ -162,7 +162,7 @@ // loading failed - could be a system file in that directory, // or something else. Doesn't deserve more attention than a printout. if (!mapFile.getName().startsWith(".")) { - log.warn("Couldn't load Pickmap ", e); + log.warn("Couldn't load pickmap", e); } } return false; Modified: trunk/daimonin/src/daieditor/CPickmapPanel.java =================================================================== --- trunk/daimonin/src/daieditor/CPickmapPanel.java 2006-11-02 19:21:17 UTC (rev 604) +++ trunk/daimonin/src/daieditor/CPickmapPanel.java 2006-11-02 19:27:21 UTC (rev 605) @@ -38,6 +38,7 @@ import javax.swing.event.ChangeListener; import net.sf.japi.swing.ActionFactory; import static net.sf.japi.swing.ActionFactory.getFactory; +import org.apache.log4j.Logger; /** * The <code>CPickmapPanel</code> manages the pickmap panel @@ -46,6 +47,8 @@ */ public final class CPickmapPanel { + private static final Logger log = Logger.getLogger(CPickmapPanel.class); + /** ActionFactory. */ private static final ActionFactory ACTION_FACTORY = getFactory("daieditor"); @@ -100,7 +103,7 @@ final File pickmapDir = new File(CMainControl.getInstance().getArchDefaultFolder(), IGUIConstants.PICKMAP_DIR); if (!pickmapDir.exists() || !pickmapDir.isDirectory()) { - System.err.println("No pickmaps directory found."); + log.warn("No pickmaps directory found."); return; } @@ -157,10 +160,8 @@ bmapview.getMapControl().setPickmap(true); return true; } - } catch (final FileNotFoundException e) { - System.err.println(e); } catch (final IOException e) { - System.err.println(e); + log.warn("Couldn't load pickmap", e); } return false; } @@ -304,15 +305,16 @@ // this is the new active pickmap currentPickMap = tmp; // <- new pickmap foundMap = true; + if (log.isDebugEnabled()) { + log.debug("new pickmap: " + newName); + } break; - //System.err.println("new pickmap: "+newName); } } if (!foundMap && mainControl.getMainView().isPickmapActive() && loadComplete) { // error: the new selected pickmap couldn't be found - System.err.println("Bad Error in CPickmapPanel.updateActivePickmap:"); - System.err.println("-> Selected pickmap couldn't be found!"); + log.error("Bad Error in CPickmapPanel.updateActivePickmap: Selected pickmap couldn't be found!"); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-02 19:21:25
|
Revision: 604 http://svn.sourceforge.net/gridarta/?rev=604&view=rev Author: akirschbaum Date: 2006-11-02 11:21:17 -0800 (Thu, 02 Nov 2006) Log Message: ----------- Unify logging statements. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMapViewBasic.java Modified: trunk/daimonin/src/daieditor/CMapViewBasic.java =================================================================== --- trunk/daimonin/src/daieditor/CMapViewBasic.java 2006-11-02 19:16:36 UTC (rev 603) +++ trunk/daimonin/src/daieditor/CMapViewBasic.java 2006-11-02 19:21:17 UTC (rev 604) @@ -55,6 +55,7 @@ import net.sf.gridarta.gui.map.MapCursorEvent; import net.sf.gridarta.gui.map.MapCursorListener; import net.sf.gridarta.gui.map.MapGrid; +import org.apache.log4j.Logger; import org.jetbrains.annotations.Nullable; /** @@ -81,6 +82,8 @@ */ public final class CMapViewBasic extends JScrollPane implements ErrorHandler, MapModelListener, MapCursorListener { + private static final Logger log = Logger.getLogger(CMapViewBasic.class); + /** Serial Version UID. */ private static final long serialVersionUID = 1L; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-02 19:16:43
|
Revision: 603 http://svn.sourceforge.net/gridarta/?rev=603&view=rev Author: akirschbaum Date: 2006-11-02 11:16:36 -0800 (Thu, 02 Nov 2006) Log Message: ----------- Unify logging statements. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CGUIUtils.java trunk/daimonin/src/daieditor/CGUIUtils.java Modified: trunk/crossfire/src/cfeditor/CGUIUtils.java =================================================================== --- trunk/crossfire/src/cfeditor/CGUIUtils.java 2006-11-02 19:05:26 UTC (rev 602) +++ trunk/crossfire/src/cfeditor/CGUIUtils.java 2006-11-02 19:16:36 UTC (rev 603) @@ -110,6 +110,8 @@ // put this icon into the Hashtable if (icon != null) { imageCache.put(strIconName, icon); + } else { + log.warn("NO ICON FOR " + strIconName + "!!!"); } return icon; Modified: trunk/daimonin/src/daieditor/CGUIUtils.java =================================================================== --- trunk/daimonin/src/daieditor/CGUIUtils.java 2006-11-02 19:05:26 UTC (rev 602) +++ trunk/daimonin/src/daieditor/CGUIUtils.java 2006-11-02 19:16:36 UTC (rev 603) @@ -103,6 +103,7 @@ } else { log.warn("NO ICON FOR " + strIconName + "!!!"); } + return icon; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-02 19:05:33
|
Revision: 602 http://svn.sourceforge.net/gridarta/?rev=602&view=rev Author: akirschbaum Date: 2006-11-02 11:05:26 -0800 (Thu, 02 Nov 2006) Log Message: ----------- Fix check for cut off objects when resizing a map: only ask the user if objects are cut off. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/map/DefaultMapModel.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2006-11-02 00:08:07 UTC (rev 601) +++ trunk/crossfire/ChangeLog 2006-11-02 19:05:26 UTC (rev 602) @@ -1,3 +1,8 @@ +2006-11-02 Andreas Kirschbaum + + * Fix check for cut off objects when resizing a map: only ask the + user if objects are cut off. + 2006-10-29 Andreas Kirschbaum * Make "move object up/down" in map tile panel work again. Modified: trunk/crossfire/src/cfeditor/map/DefaultMapModel.java =================================================================== --- trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-11-02 00:08:07 UTC (rev 601) +++ trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-11-02 19:05:26 UTC (rev 602) @@ -800,7 +800,7 @@ // search the right stripe (as far as being cut off) for (int x = newSize.getWidth(); x < mapSize.getWidth(); x++) { for (int y = 0; y < mapSize.getHeight(); y++) { - if (mapGrid[x][y] != null) { + if (!mapGrid[x][y].isEmpty()) { return false; } } @@ -811,7 +811,7 @@ // search the bottom stripe (as far as being cut off) for (int y = newSize.getHeight(); y < mapSize.getHeight(); y++) { for (int x = 0; x < mapSize.getWidth(); x++) { - if (mapGrid[x][y] != null) { + if (!mapGrid[x][y].isEmpty()) { return false; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-11-02 00:08:14
|
Revision: 601 http://svn.sourceforge.net/gridarta/?rev=601&view=rev Author: christianhujer Date: 2006-11-01 16:08:07 -0800 (Wed, 01 Nov 2006) Log Message: ----------- Added documentation on transaction system. Modified Paths: -------------- trunk/src/doc/dev/start.xhtml Added Paths: ----------- trunk/src/doc/dev/transactions.xhtml Modified: trunk/src/doc/dev/start.xhtml =================================================================== --- trunk/src/doc/dev/start.xhtml 2006-11-01 16:45:09 UTC (rev 600) +++ trunk/src/doc/dev/start.xhtml 2006-11-02 00:08:07 UTC (rev 601) @@ -11,6 +11,7 @@ <ul> <li><a href="changelog">Changelog</a> (Warning: large HTML page: <!--#fsize file="changelog.xhtml"-->)</li> <li><a href="codeStyle">Gridarta Code Conventions</a></li> + <li><a href="transactions">Transaction System</a></li> <li><a href="todo">Todo list</a></li> </ul> </body> Added: trunk/src/doc/dev/transactions.xhtml =================================================================== --- trunk/src/doc/dev/transactions.xhtml (rev 0) +++ trunk/src/doc/dev/transactions.xhtml 2006-11-02 00:08:07 UTC (rev 601) @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> + <head> + <title>Gridarta Transaction System</title> + </head> + <body> + <h1>Gridarta Transaction System</h1> + <p> + The Gridarta editor (currently daimonin only, in future crossfire as well) has a transaction system. + This document describes the current and future purposes of the transaction system. + </p> + <h2>History</h2> + <p> + Originally the transaction system was developed during reimplementing the maps as model view controller. + Before I (Cher) started working on the editor, the code looked like being model view controller but it wasn't. + The central point of model view controller is not naming classes model, view and control or whatever. + The central point of model view controller is a message system and a view registry so each time the model changes, all registered views are notified and updated automatically. + In Java, this is done via event listeners. + This was missing. + </p> + <p> + When adding the event listeners to the map MVC, the system might have run into the problem that for instance when deleting a whole selected region, an event would be fired for every single deleted object, resulting in bulky slow behaviour. + I've added a transaction system that's first purpose was to group changes to the model so only the last change actually fires an event. + The typical call sequence is: + <code>beginTransaction()</code>, perform changes, <code>endTransaction()</code>. + The event will be fired when <code>endTransaction()</code> is called. + </p> + <p> + The transaction system supports nesting. + That means if a call sequence is: <code>beginTransaction()</code> ... <code>beginTransaction()</code> ... <code>endTransaction()</code> ... <code>endTransaction()</code>, only the last <code>endTransaction()</code> actually fires an event. + In case an exception occurs, the transaction system also supports an <code>endAllTransactions()</code>, and for completeness I've added a <code>getTransactionDepth()</code> method. + </p> + <h2>Future / New Requirements</h2> + <p> + There are some requirements that could also be fulfilled using the transaction system. + </p> + <ul> + <li>The transaction system could support undo / redo by creating a backup and storing that in the undo buffer each time the outermost transaction ends.</li> + <li>To support undo/redo, transactions need names. The name of the outermost transaction determines the name of the undo / redo operation as visible to the user.</li> + <li>An implementation of undo/redo via such a transaction system would also automatically provide undo/redo to scripts and plugins that change maps.</li> + <li>If used for scripts and plugins, the transaction system should also provide rollback.</li> + </ul> + </body> +</html> Property changes on: trunk/src/doc/dev/transactions.xhtml ___________________________________________________________________ Name: svn:mime-type + text/xml Name: svn:keywords + Date Name: svn:eol-style + LF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-11-01 16:45:34
|
Revision: 600 http://svn.sourceforge.net/gridarta/?rev=600&view=rev Author: christianhujer Date: 2006-11-01 08:45:09 -0800 (Wed, 01 Nov 2006) Log Message: ----------- Some work on insert below. Modified Paths: -------------- trunk/daimonin/src/daieditor/gui/map/tools/InsertionTool.java trunk/daimonin/src/daieditor/gui/map/tools/action.properties Modified: trunk/daimonin/src/daieditor/gui/map/tools/InsertionTool.java =================================================================== --- trunk/daimonin/src/daieditor/gui/map/tools/InsertionTool.java 2006-11-01 16:37:16 UTC (rev 599) +++ trunk/daimonin/src/daieditor/gui/map/tools/InsertionTool.java 2006-11-01 16:45:09 UTC (rev 600) @@ -21,11 +21,11 @@ /** The ActionFactory. */ @NotNull private static final ActionFactory ACTION_FACTORY = ActionFactory.getFactory("daieditor.gui.map.tools"); - /** The ToggleAction for toggling the deleteBelow status. */ - private ToggleAction deleteBelowAction = (ToggleAction) ACTION_FACTORY.createToggle(true, "insertBelow", this); + /** The ToggleAction for toggling the insertBelow status. */ + private ToggleAction insertBelowAction = (ToggleAction) ACTION_FACTORY.createToggle(true, "insertBelow", this); - /** The position for deletion. */ - private boolean deleteBelow; + /** The position for insertion. */ + private boolean insertBelow; /** * Create a BasicAbstractTool. @@ -71,24 +71,25 @@ /** {@inheritDoc} */ @Override @Nullable public Component createOptionsView() { final JPanel optionsPanel = new JPanel(); - // todo optionsPanel.add(deleteBelowAction.createCheckBox()); + // commented to hide it because currently inserting below doesn't work. + //optionsPanel.add(insertBelowAction.createCheckBox()); return optionsPanel; } /** - * Returns the position for deletion. - * @return the position for deletion. + * Returns the position for insertion. + * @return the position for insertion. */ - public boolean isDeleteBelow() { - return deleteBelow; + public boolean isInsertBelow() { + return insertBelow; } /** - * Sets the position for deletion. - * @param deleteBelow the position for deletion. + * Sets the position for insertion. + * @param insertBelow the position for insertion. */ - public void setDeleteBelow(final boolean deleteBelow) { - this.deleteBelow = deleteBelow; + public void setInsertBelow(final boolean insertBelow) { + this.insertBelow = insertBelow; } } // class InsertMouseOperation Modified: trunk/daimonin/src/daieditor/gui/map/tools/action.properties =================================================================== --- trunk/daimonin/src/daieditor/gui/map/tools/action.properties 2006-11-01 16:37:16 UTC (rev 599) +++ trunk/daimonin/src/daieditor/gui/map/tools/action.properties 2006-11-01 16:45:09 UTC (rev 600) @@ -7,6 +7,7 @@ void.icon=misc/Void16 void.shortdescription=Do nothing (makes selected mouse button inactive). deleteBelow.text=Delete below +insertBelow.text=Insert below left=left middle=middle right=right This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-11-01 16:37:36
|
Revision: 599 http://svn.sourceforge.net/gridarta/?rev=599&view=rev Author: christianhujer Date: 2006-11-01 08:37:16 -0800 (Wed, 01 Nov 2006) Log Message: ----------- Added TODO list. Modified Paths: -------------- trunk/src/doc/dev/start.xhtml Added Paths: ----------- trunk/src/doc/dev/todo.xhtml Modified: trunk/src/doc/dev/start.xhtml =================================================================== --- trunk/src/doc/dev/start.xhtml 2006-11-01 15:52:16 UTC (rev 598) +++ trunk/src/doc/dev/start.xhtml 2006-11-01 16:37:16 UTC (rev 599) @@ -11,6 +11,7 @@ <ul> <li><a href="changelog">Changelog</a> (Warning: large HTML page: <!--#fsize file="changelog.xhtml"-->)</li> <li><a href="codeStyle">Gridarta Code Conventions</a></li> + <li><a href="todo">Todo list</a></li> </ul> </body> </html> Added: trunk/src/doc/dev/todo.xhtml =================================================================== --- trunk/src/doc/dev/todo.xhtml (rev 0) +++ trunk/src/doc/dev/todo.xhtml 2006-11-01 16:37:16 UTC (rev 599) @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> + <head> + <title>Gridarta TODO list</title> + </head> + <body> + <h1>Gridarta TODO list</h1> + <p> + Rules for developers: + If you add something to this TODO list, also put your name aside the TODO entry. + A name aside a TODO entry denotes the author of the TODO entry (not the developer the entry is assigned to). + </p> + <p> + Note: This list does not contain bugs. + This list's purpose is serving as a single source of information on planned changes and features to the crossfire and daimonin developer teams. + </p> + <h2>High Priority</h2> + <dl> + <dt>Cher: Add Connection View</dt> + <dd> + The Connection view should display all connections and highlight a particular connection of a map. + <br /> + See also: <a href="http://www.daimonin.net/mantis/view.php?id=66">Daimonin Mantis #0000066: connection browser tab</a> + </dd> + <dt>Cher: Merge Validator</dt> + <dd> + Daimonin has a map validator that's also useful for crossfire. + </dd> + <dt>Cher: Match dialog editor</dt> + <dd> + Magic ears and simple NPCs have a simple regex based communication system. + There should be an integrated editor for such messages. + <br /> + See also: <a href="http://www.daimonin.net/mantis/view.php?id=399">Daimonin Mantis #0000399: adding a book interface to the editor</a> + </dd> + </dl> + <h2>Other</h2> + <dl> + <dt>Improve inventory handling (Gridarta)</dt> + <dd> + <ul> + <li><a href="http://www.daimonin.net/mantis/view.php?id=405">Daimonin Mantis #0000405: Better indication of inventories in tile list</a></li> + <li><a href="http://www.daimonin.net/mantis/view.php?id=412">Daimonin Mantis #0000412: Cut and paste in inventories</a></li> + </ul> + </dd> + <dt>Application Update</dt> + <dd> + <ul> + <li>Move to Webstart</li> + <li><a href="http://www.daimonin.net/mantis/view.php?id=420">Daimonin Mantis #0000420: Handle data files with auto updater</a></li> + </ul> + </dd> + <dt>Misc (Gridarta)</dt> + <dd> + <ul> + <li><a href="http://www.daimonin.net/mantis/view.php?id=401">Daimonin Mantis #0000401: Add some "Favorite" tool</a></li> + <li><a href="http://www.daimonin.net/mantis/view.php?id=372">Daimonin Mantis #0000372: Use of the word "arch"</a></li> + <li><a href="http://www.daimonin.net/mantis/view.php?id=377">Daimonin Mantis #0000377: Pickmap feature should be improved: tree hierarchy / folders, grouping, categories, favorites</a></li> + <li><a href="http://www.daimonin.net/mantis/view.php?id=379">Daimonin Mantis #0000379: When following an exit to a non-existent map, the editor should ask whether to create it</a></li> + <li><a href="http://www.daimonin.net/mantis/view.php?id=364">Daimonin Mantis #0000364: Set attributes of a selection</a></li> + <li><a href="http://www.daimonin.net/mantis/view.php?id=256">Daimonin Mantis #0000256: Add preferences module for proxy configuration</a></li> + <li><a href="http://www.daimonin.net/mantis/view.php?id=313">Daimonin Mantis #0000313: feature request: improving map editing ergonomy</a></li> + <li><a href="http://www.daimonin.net/mantis/view.php?id=259">Daimonin Mantis #0000259: a small preview map for navigation</a></li> + <li><a href="http://www.daimonin.net/mantis/view.php?id=260">Daimonin Mantis #0000260: a hotkey for reloadig all graphics</a></li> + <li><a href="http://www.daimonin.net/mantis/view.php?id=270">Daimonin Mantis #0000270: Show linked map tiles in edit window</a></li> + <li><a href="http://www.daimonin.net/mantis/view.php?id=74">Daimonin Mantis #0000074: Unislash: Add paint below feature</a></li> + <li><a href="http://www.daimonin.net/mantis/view.php?id=178">Daimonin Mantis #0000178: Allow setting the background colour for created images (screenshots)</a></li> + <li><a href="http://www.daimonin.net/mantis/view.php?id=70">Daimonin Mantis #0000070: Allow locking of tiles</a></li> + </ul> + </dd> + <dt>Misc (Daimonin)</dt> + <dd> + <ul> + <li><a href="http://www.daimonin.net/mantis/view.php?id=299">Daimonin Mantis #0000299: tileset information generation</a></li> + </ul> + </dd> + <dt>Misc (Crossfire)</dt> + <dd> + <ul> + <li><a href="http://www.daimonin.net/mantis/view.php?id=254">Daimonin Mantis #0000254: Move along map tiles with keyboard</a></li> + </ul> + </dd> + </dl> + </body> +</html> Property changes on: trunk/src/doc/dev/todo.xhtml ___________________________________________________________________ Name: svn:mime-type + text/xml Name: svn:keywords + Date Name: svn:eol-style + LF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-11-01 15:52:26
|
Revision: 598 http://svn.sourceforge.net/gridarta/?rev=598&view=rev Author: christianhujer Date: 2006-11-01 07:52:16 -0800 (Wed, 01 Nov 2006) Log Message: ----------- More unification. Modified Paths: -------------- trunk/crossfire/src/cfeditor/ScriptArchData.java trunk/daimonin/src/daieditor/ScriptArchData.java Modified: trunk/crossfire/src/cfeditor/ScriptArchData.java =================================================================== --- trunk/crossfire/src/cfeditor/ScriptArchData.java 2006-11-01 15:41:56 UTC (rev 597) +++ trunk/crossfire/src/cfeditor/ScriptArchData.java 2006-11-01 15:52:16 UTC (rev 598) @@ -429,7 +429,7 @@ fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY); fileChooser.setCurrentDirectory(home); fileChooser.setMultiSelectionEnabled(false); - fileChooser.setFileFilter(CMainControl.pythonFileFilter); + fileChooser.setFileFilter(CMainControl.getInstance().getScriptFileFilter()); if (fileChooser.showOpenDialog(newScriptFrame) == JFileChooser.APPROVE_OPTION) { // user has selected a file Modified: trunk/daimonin/src/daieditor/ScriptArchData.java =================================================================== --- trunk/daimonin/src/daieditor/ScriptArchData.java 2006-11-01 15:41:56 UTC (rev 597) +++ trunk/daimonin/src/daieditor/ScriptArchData.java 2006-11-01 15:52:16 UTC (rev 598) @@ -378,7 +378,7 @@ fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY); fileChooser.setCurrentDirectory(home); fileChooser.setMultiSelectionEnabled(false); - fileChooser.setFileFilter(CMainControl.luaFileFilter); + fileChooser.setFileFilter(CMainControl.getInstance().getScriptFileFilter()); if (fileChooser.showOpenDialog(newScriptFrame) == JFileChooser.APPROVE_OPTION) { // user has selected a file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-11-01 15:42:15
|
Revision: 597 http://svn.sourceforge.net/gridarta/?rev=597&view=rev Author: christianhujer Date: 2006-11-01 07:41:56 -0800 (Wed, 01 Nov 2006) Log Message: ----------- Some unification on ScriptArchData. Modified Paths: -------------- trunk/crossfire/src/cfeditor/ScriptArchData.java trunk/daimonin/src/daieditor/ScriptArchData.java Modified: trunk/crossfire/src/cfeditor/ScriptArchData.java =================================================================== --- trunk/crossfire/src/cfeditor/ScriptArchData.java 2006-11-01 14:51:47 UTC (rev 596) +++ trunk/crossfire/src/cfeditor/ScriptArchData.java 2006-11-01 15:41:56 UTC (rev 597) @@ -484,7 +484,7 @@ nsHeading.setText("New scripted event for \"" + archName + "\":"); inputNFPath.setText(defScriptName); inputEventOptions.setText(""); - nsOkListener.setSdata(this); + nsOkListener.setScriptArchData(this); newScriptFrame.toFront(); newScriptFrame.setVisible(true); } @@ -828,39 +828,53 @@ private final boolean isOkButton; - private ScriptedEvent target; // target event + /** + * The target event to script. + */ + private ScriptedEvent scriptedEvent; // target event - private ScriptArchData sdata; // script arch data + /** + * The ScriptArchData to operate on. + */ + private ScriptArchData scriptArchData; /** * Constructor * @param isOkButton true for ok-buttons * @param frame frame this listener belongs to - * @param sdata this is only set for the ok-button of "create new" frame, otherwise null + * @param scriptArchData this is only set for the ok-button of "create new" frame, otherwise null */ - PathButtonListener(final boolean isOkButton, final JDialog frame, final ScriptArchData sdata) { + PathButtonListener(final boolean isOkButton, final JDialog frame, @Nullable final ScriptArchData scriptArchData) { this.isOkButton = isOkButton; this.frame = frame; - this.sdata = sdata; + this.scriptArchData = scriptArchData; } - public void setTargetEvent(final ScriptedEvent newt) { - target = newt; + /** + * Set the target event to script. + * @param scriptedEvent new target event to script. + */ + public void setTargetEvent(final ScriptedEvent scriptedEvent) { + this.scriptedEvent = scriptedEvent; } - public void setSdata(final ScriptArchData newsd) { - sdata = newsd; + /** + * Set the ScriptArchData to operate on. + * @param scriptArchData ScriptArchData to operate on. + */ + public void setScriptArchData(final ScriptArchData scriptArchData) { + this.scriptArchData = scriptArchData; } /** {@inheritDoc} */ public void actionPerformed(final ActionEvent e) { - if (isOkButton && sdata == null && target != null) { - target.modifyEventPath(); // ok button for modifying path + if (isOkButton && scriptArchData == null && scriptedEvent != null) { + scriptedEvent.modifyEventPath(); // ok button for modifying path } - if (isOkButton && sdata != null) { + if (isOkButton && scriptArchData != null) { // ok button for creating a new event/script - sdata.createNewEvent(frame); + scriptArchData.createNewEvent(frame); } else { frame.setVisible(false); // hide dialog } Modified: trunk/daimonin/src/daieditor/ScriptArchData.java =================================================================== --- trunk/daimonin/src/daieditor/ScriptArchData.java 2006-11-01 14:51:47 UTC (rev 596) +++ trunk/daimonin/src/daieditor/ScriptArchData.java 2006-11-01 15:41:56 UTC (rev 597) @@ -431,7 +431,7 @@ // just set fields and show nsHeading.setText("New scripted event for \"" + archName + "\":"); inputNFPath.setText(defScriptName); - nsOkListener.setSdata(this); + nsOkListener.setScriptArchData(this); newScriptFrame.toFront(); newScriptFrame.setVisible(true); } @@ -802,40 +802,54 @@ private final boolean isOkButton; - private ScriptedEvent target; // target event + /** + * The target event to script. + */ + private ScriptedEvent scriptedEvent; // target event - private ScriptArchData sdata; // script arch data + /** + * The ScriptArchData to operate on. + */ + private ScriptArchData scriptArchData; /** * Constructor * @param isOkButton true for ok-buttons * @param frame frame this listener belongs to - * @param sdata this is only set for the ok-button of "create new" frame, otherwise null + * @param scriptArchData this is only set for the ok-button of "create new" frame, otherwise null */ - PathButtonListener(final boolean isOkButton, final JDialog frame, final ScriptArchData sdata) { + PathButtonListener(final boolean isOkButton, final JDialog frame, @Nullable final ScriptArchData scriptArchData) { this.isOkButton = isOkButton; this.frame = frame; - this.sdata = sdata; + this.scriptArchData = scriptArchData; } - public void setTargetEvent(final ScriptedEvent newt) { - target = newt; + /** + * Set the target event to script. + * @param scriptedEvent new target event to script. + */ + public void setTargetEvent(final ScriptedEvent scriptedEvent) { + this.scriptedEvent = scriptedEvent; } - public void setSdata(final ScriptArchData newsd) { - sdata = newsd; + /** + * Set the ScriptArchData to operate on. + * @param scriptArchData ScriptArchData to operate on. + */ + public void setScriptArchData(final ScriptArchData scriptArchData) { + this.scriptArchData = scriptArchData; } /** {@inheritDoc} */ public void actionPerformed(final ActionEvent e) { - if (isOkButton && sdata == null && target != null) { - target.modifyEventPath(); // ok button for modifying path + if (isOkButton && scriptArchData == null && scriptedEvent != null) { + scriptedEvent.modifyEventPath(); // ok button for modifying path } - if (isOkButton && sdata != null) { + if (isOkButton && scriptArchData != null) { // ok button for creating a new event/script - sdata.createNewEvent(frame); - sdata.changed = true; + scriptArchData.createNewEvent(frame); + scriptArchData.changed = true; } else { frame.setVisible(false); // hide dialog } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-11-01 14:51:53
|
Revision: 596 http://svn.sourceforge.net/gridarta/?rev=596&view=rev Author: christianhujer Date: 2006-11-01 06:51:47 -0800 (Wed, 01 Nov 2006) Log Message: ----------- Fixed bug: sdata was dereferenced even if sdata was null. Modified Paths: -------------- trunk/daimonin/src/daieditor/ScriptArchData.java Modified: trunk/daimonin/src/daieditor/ScriptArchData.java =================================================================== --- trunk/daimonin/src/daieditor/ScriptArchData.java 2006-10-29 17:33:58 UTC (rev 595) +++ trunk/daimonin/src/daieditor/ScriptArchData.java 2006-11-01 14:51:47 UTC (rev 596) @@ -830,7 +830,6 @@ public void actionPerformed(final ActionEvent e) { if (isOkButton && sdata == null && target != null) { target.modifyEventPath(); // ok button for modifying path - sdata.changed = true; } if (isOkButton && sdata != null) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-10-29 17:34:05
|
Revision: 595 http://svn.sourceforge.net/gridarta/?rev=595&view=rev Author: akirschbaum Date: 2006-10-29 09:33:58 -0800 (Sun, 29 Oct 2006) Log Message: ----------- Make "move object up/down" in map tile panel work again. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/CMainControl.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2006-10-29 16:47:55 UTC (rev 594) +++ trunk/crossfire/ChangeLog 2006-10-29 17:33:58 UTC (rev 595) @@ -1,3 +1,7 @@ +2006-10-29 Andreas Kirschbaum + + * Make "move object up/down" in map tile panel work again. + 2006-10-12 Andreas Kirschbaum * Make "Enter Exit" work for BATTLEGROUND tiles. Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-10-29 16:47:55 UTC (rev 594) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-10-29 17:33:58 UTC (rev 595) @@ -273,11 +273,17 @@ } void moveTileUp(final GameObject arch, final boolean refresh) { - arch.moveUp(); // XXX: ignores refresh + arch.moveUp(); + if (refresh) { + refreshCurrentMap(); + } } void moveTileDown(final GameObject arch, final boolean refresh) { - arch.moveDown(); // XXX: ignores refresh + arch.moveDown(); + if (refresh) { + refreshCurrentMap(); + } } /** collect CF arches */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-10-29 16:48:02
|
Revision: 594 http://svn.sourceforge.net/gridarta/?rev=594&view=rev Author: akirschbaum Date: 2006-10-29 08:47:55 -0800 (Sun, 29 Oct 2006) Log Message: ----------- Fix assertion failure/NullPointerException for attribute dialogs containing FIXED fields. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CAttribDialog.java Modified: trunk/crossfire/src/cfeditor/CAttribDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-10-29 16:45:24 UTC (rev 593) +++ trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-10-29 16:47:55 UTC (rev 594) @@ -602,12 +602,12 @@ // now add the entrys, line by line for (int i = 0; type.getAttr().length > i; i++) { - if (type.getAttr()[i].getSecId() == secId) { + final ArchAttribType dType = type.getAttr()[i].getDataType(); // data type of the attribute + if (type.getAttr()[i].getSecId() == secId && dType != ArchAttribType.FIXED) { JPanel panel2 = null; // tmp. Panel for the layout // now create the attribute-GUI-instance final DialogAttrib newAttr; - final ArchAttribType dType = type.getAttr()[i].getDataType(); // data type of the attribute switch (dType) { case TEXT: { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-10-29 16:45:39
|
Revision: 593 http://svn.sourceforge.net/gridarta/?rev=593&view=rev Author: christianhujer Date: 2006-10-29 08:45:24 -0800 (Sun, 29 Oct 2006) Log Message: ----------- Changed old style variable names (arch) to new style (gameObject). Modified Paths: -------------- trunk/daimonin/src/daieditor/CMainControl.java trunk/daimonin/src/daieditor/CMapArchPanel.java trunk/daimonin/src/daieditor/CMapTileList.java trunk/daimonin/src/daieditor/CopyBuffer.java trunk/daimonin/src/daieditor/gui/map/MapCursorControl.java trunk/daimonin/src/daieditor/gui/map/tools/DeletionTool.java trunk/daimonin/src/daieditor/map/DefaultMapModel.java trunk/daimonin/src/daieditor/map/MapModel.java Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2006-10-28 23:23:42 UTC (rev 592) +++ trunk/daimonin/src/daieditor/CMainControl.java 2006-10-29 16:45:24 UTC (rev 593) @@ -228,7 +228,10 @@ public static ImageIcon noarchTileIcon; - private final ArchetypeSet archetypeSet; // the one and only arch list + /** + * The ArchetypeSet, which is a registry of all Archetypes. + */ + private final ArchetypeSet archetypeSet; /** All open maps. */ private final List<MapControl> levels = new ArrayList<MapControl>(); @@ -344,7 +347,6 @@ /** * Cleans all completely blocked squares of a map. - * @param mapModel Map Model to search for completely blocked squares * @fixme this implementation does not take care of multi square objects. */ @ActionMethod public void cleanCompletelyBlockedSquares() { @@ -449,8 +451,7 @@ GameObject.setTypeList(typeList); // set reference in GameObject - // now collect all arch you can find in the arch path!! - mainView.updateFocus(false); /*MTMT*/ + mainView.updateFocus(false); // Delete libraries. final File libs = new File(System.getProperty("user.dir"), "lib"); @@ -618,13 +619,13 @@ } /** - * Get information whether the arch is edited. + * Get information whether the gameObject is edited. * Are tiles of type 'v' displayed? - * @param arch are tiles of this type displayed? + * @param gameObject are tiles of this type displayed? * @return true if these tiles are currently displayed */ - public boolean isTileEdit(final GameObject arch) { - return tileEdit == 0 || isTileEdit(arch.getEditType()); + public boolean isTileEdit(final GameObject gameObject) { + return tileEdit == 0 || isTileEdit(gameObject.getEditType()); } /** @@ -637,7 +638,7 @@ /** * A new edit type was selected from the view menu. Now - * we activate the new type and calculate it for each arch on + * we activate the new type and calculate it for each GameObject on * each map where this type has not yet been used. * @param newType new selected edit type (should not be more than one) */ @@ -799,10 +800,6 @@ return currentMap.getMapModel().insertArchToMap(newarch, archname, next, new Point(mapx, mapy)); } - public void deleteMapArch(final GameObject arch, final boolean refreshMap) { - currentMap.getMapModel().deleteMapArch(arch, refreshMap); - } - /** * Returns the main view. * @return the main view @@ -1026,7 +1023,7 @@ level.levelCloseNotify(); } else { // Notify the level about the closing - mainView.setMapTileList(null, null); + mainView.getMapTileList().setMapTileList(null, null); level.levelCloseNotify(); while (level.getMapViewFrame() != null) { level.closeView(level.getMapViewFrame()); @@ -1902,10 +1899,6 @@ /** Notifies that the application is about to exit. */ void appExitNotify() { mainView.appExitNotify(); // notify main view - - if (currentMap != null) { - mainView.setMapTileList(null, null); - } } public void refreshMenus() { Modified: trunk/daimonin/src/daieditor/CMapArchPanel.java =================================================================== --- trunk/daimonin/src/daieditor/CMapArchPanel.java 2006-10-28 23:23:42 UTC (rev 592) +++ trunk/daimonin/src/daieditor/CMapArchPanel.java 2006-10-29 16:45:24 UTC (rev 593) @@ -69,6 +69,7 @@ import javax.swing.text.StyleContext; import net.sf.gridarta.gui.GSplitPane; import net.sf.japi.swing.ActionFactory; +import net.sf.japi.swing.ActionMethod; import static net.sf.japi.swing.ActionFactory.getFactory; /** @@ -183,7 +184,6 @@ private final Action aAttrWin = ACTION_FACTORY.createAction(false, "mapArchAttrib", this); - // stuff for scripting tab private final Action aNew = ACTION_FACTORY.createAction(false, "scriptAddNew", this); private final Action aPath = ACTION_FACTORY.createAction(false, "scriptEditData", this); @@ -266,15 +266,24 @@ errorListView.setErrors(errors); } - public void mapArchApply() { + /** + * Action method for applying the changes made in the arch panel. + */ + @ActionMethod public void mapArchApply() { applyArchPanelChanges(mainView.getMapTileSelection()); } - public void mapArchAttrib() { + /** + * Action method for displaying the attributes of the currently selected object. + */ + @ActionMethod public void mapArchAttrib() { mainControl.openAttrDialog(mainView.getMapTileSelection()); } - public void mapArchAddInv() { + /** + * Action method for adding an object to the inventory of the currently selected object. + */ + @ActionMethod public void mapArchAddInv() { final GameObject arch = mainControl.getArchPanelHighlight(); if (arch == null) { // nothing selected? return; @@ -695,22 +704,22 @@ } /** Action method for creating a new Script. */ - public void scriptAddNew() { + @ActionMethod public void scriptAddNew() { addNewScriptWanted(); } /** Action method for editing the data of an existing Script. */ - public void scriptEditData() { + @ActionMethod public void scriptEditData() { editScriptWanted(SCRIPT_EDIT_PATH); } /** Action method for editing an existing Script. */ - public void scriptEdit() { + @ActionMethod public void scriptEdit() { editScriptWanted(SCRIPT_OPEN); } /** Action method for removing an existing script. */ - public void scriptRemove() { + @ActionMethod public void scriptRemove() { editScriptWanted(SCRIPT_REMOVE); } Modified: trunk/daimonin/src/daieditor/CMapTileList.java =================================================================== --- trunk/daimonin/src/daieditor/CMapTileList.java 2006-10-28 23:23:42 UTC (rev 592) +++ trunk/daimonin/src/daieditor/CMapTileList.java 2006-10-29 16:45:24 UTC (rev 593) @@ -220,7 +220,7 @@ // refresh mainControl.refreshCurrentMap(); } - mainView.setMapTileList(mainControl.getCurrentMap(), null); + setMapTileList(mainControl.getCurrentMap(), null); } else if (e.getButton() == BUTTON2 || (e.getModifiers() & SHIFT_MASK) == SHIFT_MASK && e.getButton() == BUTTON3) { // MMB // --- middle mouse button: delete arch --- final int listIndex = getListIndex(e); @@ -293,8 +293,9 @@ final GameObject temp = getMapTileSelection(); final GameObject entry = (GameObject) model.getElementAt(index); if (entry != null) { - mainControl.deleteMapArch(entry, true); - mainView.setMapTileList(mainControl.getCurrentMap(), temp); + entry.remove(); + // TODO: refresh map + setMapTileList(mainControl.getCurrentMap(), temp); } } @@ -314,7 +315,7 @@ } void refresh() { - mainView.setMapTileList(mainControl.getCurrentMap(), getMapTileSelection()); + setMapTileList(mainControl.getCurrentMap(), getMapTileSelection()); repaint(); } Modified: trunk/daimonin/src/daieditor/CopyBuffer.java =================================================================== --- trunk/daimonin/src/daieditor/CopyBuffer.java 2006-10-28 23:23:42 UTC (rev 592) +++ trunk/daimonin/src/daieditor/CopyBuffer.java 2006-10-29 16:45:24 UTC (rev 593) @@ -153,32 +153,32 @@ for (final MapSquare<GameObject> square : mapControl.getMapViewFrame().getView().getSelectedSquares()) { final int posx = square.getMapX(); final int posy = square.getMapY(); - for (final GameObject arch : square) { - // store a clone of the arch in the CopyBuffer + for (final GameObject gameObject : square) { + // store a clone of the gameObject in the CopyBuffer // (for multiparts, only the heads get copied into the buffer) // arches that don't match the view settings are ignored! if ((mode == Mode.DO_CUT || mode == Mode.DO_COPY) - && arch.isHead() && !arch.isInContainer() - && mainControl.isTileEdit(arch)) { - // copy this arch - final GameObject clone = arch.createClone(posx - offset.x, posy - offset.y); + && gameObject.isHead() && !gameObject.isInContainer() + && mainControl.isTileEdit(gameObject)) { + // copy this gameObject + final GameObject clone = gameObject.createClone(posx - offset.x, posy - offset.y); assert copyMapCtrl != null; copyMapCtrl.getMapModel().addArchObjectToMap(clone, false); } - // delete the arch if we have a "cut" or "clear" command + // delete the gameObject if we have a "cut" or "clear" command // again, arches that don't match the view settings are ignored - if ((mode == Mode.DO_CLEAR || mode == Mode.DO_CUT) && mainControl.isTileEdit(arch)) { - // delete arch (without redrawing the map) + if ((mode == Mode.DO_CLEAR || mode == Mode.DO_CUT) && mainControl.isTileEdit(gameObject)) { + // delete gameObject (without redrawing the map) // For CUT we don't delete multi tails of multis which are left or // above the head (we would miss to copy them otherwise). - if (mode == Mode.DO_CLEAR || (arch.getMultiX() >= 0 && arch.getMultiY() >= 0)) { - archesToDelete.add(arch); + if (mode == Mode.DO_CLEAR || (gameObject.getMultiX() >= 0 && gameObject.getMultiY() >= 0)) { + archesToDelete.add(gameObject); } } } } - for (final GameObject arch : archesToDelete) { - arch.remove(); + for (final GameObject gameObject : archesToDelete) { + gameObject.remove(); } mapControl.getMapModel().endTransaction(); // finally redraw the map @@ -204,10 +204,10 @@ pos.setLocation(startp.x + square.getMapX(), startp.y + square.getMapY()); // paste the archs if on the map: if (mapControl.isPointValid(pos)) { - for (final GameObject arch : square) { - if (!arch.isMulti()) { - // read arch from buffer and stick in on the map - addArchToMap(mapControl, arch, pos, true, false); + for (final GameObject gameObject : square) { + if (!gameObject.isMulti()) { + // read gameObject from buffer and stick in on the map + addArchToMap(mapControl, gameObject, pos, true, false); } } } @@ -218,9 +218,9 @@ pos.setLocation(startp); pos.translate(square.getMapX(), square.getMapY()); if (mapControl.isPointValid(pos)) { // paste the archs if on the map: - for (final GameObject arch : square) { - if (arch.isMulti()) { - addArchToMap(mapControl, arch, pos, true, false); + for (final GameObject gameObject : square) { + if (gameObject.isMulti()) { + addArchToMap(mapControl, gameObject, pos, true, false); } } } @@ -272,8 +272,8 @@ if (rand != -1 && rand != 100 && rand < rnd.nextInt(100) + 1) { continue; } - final GameObject arch = archList.get(rnd.nextInt(archList.size())); - addArchToMap(mapControl, arch, p, false, fillBelow); + final GameObject gameObject = archList.get(rnd.nextInt(archList.size())); + addArchToMap(mapControl, gameObject, p, false, fillBelow); } mapControl.getMapModel().endTransaction(); } @@ -308,10 +308,10 @@ } /** - * Get a random arch from a map. - * @param mapControl map to get random arch from + * Get a random gameObject from a map. + * @param mapControl map to get random gameObject from * @param max Initial size of Array in #getMapArchList - * @return random arch from <var>mapControl</var> + * @return random gameObject from <var>mapControl</var> */ @Nullable public static GameObject getRandomMapArch(final MapControl mapControl, final int max) { final List<GameObject> objects = getMapArchList(mapControl, max); @@ -410,8 +410,8 @@ border--; if (mapControl.isPointValid(p) && mapControl.getMapModel().getMapSquare(p).isEmpty()) { area[p.x][p.y] = WAS_EMPTY; - final GameObject arch = archList.get(rnd.nextInt(archList.size())); - addArchToMap(mapControl, arch, p, false, false); + final GameObject gameObject = archList.get(rnd.nextInt(archList.size())); + addArchToMap(mapControl, gameObject, p, false, false); try { if (area[p.x - 1][p.y] == NOT_LOOKED_AT) { area[p.x - 1][p.y] = BORDER; @@ -459,12 +459,12 @@ * Add an archetype to the destination map. Inserts a new object instance * for default archetypes, and a clone for non-default archetypes. */ - private void addArchToMap(final MapControl mapControl, final GameObject arch, final Point pos, final boolean allowDouble, final boolean fillBelow) { - if (arch.isArchetype()) { - mapControl.getMapModel().addArchToMap(arch.getArchetypeName(), pos, allowDouble, fillBelow); + private void addArchToMap(final MapControl mapControl, final GameObject gameObject, final Point pos, final boolean allowDouble, final boolean fillBelow) { + if (gameObject.isArchetype()) { + mapControl.getMapModel().addArchToMap(gameObject.getArchetypeName(), pos, allowDouble, fillBelow); } else { - final GameObject newHead = arch.createClone(pos.x, pos.y); - for (GameObject tmp = arch.getArchetype().getMultiNext(); tmp != null; tmp = tmp.getMultiNext()) { + final GameObject newHead = gameObject.createClone(pos.x, pos.y); + for (GameObject tmp = gameObject.getArchetype().getMultiNext(); tmp != null; tmp = tmp.getMultiNext()) { final Point mapPos = new Point(pos.x + tmp.getMultiX(), pos.y + tmp.getMultiY()); if (!mapControl.isPointValid(mapPos)) { Modified: trunk/daimonin/src/daieditor/gui/map/MapCursorControl.java =================================================================== --- trunk/daimonin/src/daieditor/gui/map/MapCursorControl.java 2006-10-28 23:23:42 UTC (rev 592) +++ trunk/daimonin/src/daieditor/gui/map/MapCursorControl.java 2006-10-29 16:45:24 UTC (rev 593) @@ -126,7 +126,8 @@ if (arch != null) { final Point pos = mapCursor.getLocation(); assert pos != null; - mapControl.getMapModel().deleteMapArch(arch, true); + arch.remove(); + // TODO: refresh map view } } } Modified: trunk/daimonin/src/daieditor/gui/map/tools/DeletionTool.java =================================================================== --- trunk/daimonin/src/daieditor/gui/map/tools/DeletionTool.java 2006-10-28 23:23:42 UTC (rev 592) +++ trunk/daimonin/src/daieditor/gui/map/tools/DeletionTool.java 2006-10-29 16:45:24 UTC (rev 593) @@ -76,7 +76,7 @@ } } if (delArch != null) { - mapControl.getMapModel().deleteMapArch(delArch, false); + delArch.remove(); } } Modified: trunk/daimonin/src/daieditor/map/DefaultMapModel.java =================================================================== --- trunk/daimonin/src/daieditor/map/DefaultMapModel.java 2006-10-28 23:23:42 UTC (rev 592) +++ trunk/daimonin/src/daieditor/map/DefaultMapModel.java 2006-10-29 16:45:24 UTC (rev 593) @@ -396,15 +396,6 @@ } } - /** {@inheritDoc} */ - public void deleteMapArch(final GameObject arch, final boolean refreshMap) { - // Okay, it's in an inventory then - arch.remove(); - if (refreshMap) { - mainControl.refreshCurrentMap(); // redraw - } - } - /** {@inheritDoc} * This implementation is very safe by recreating every single MapSquare as new empty square with the trade-off of some strain of the garbage-collector. * An alternative implemenation would manually clean every existing MapSquare but that probably wouldn't really be faster until we have reusage of GameObject instances similar to J2EE. @@ -511,7 +502,7 @@ } for (final GameObject node : objectsToDelete) { - deleteMapArch(node, false); + node.remove(); } // Now the critical step: create an GameObject array of new dimension, Modified: trunk/daimonin/src/daieditor/map/MapModel.java =================================================================== --- trunk/daimonin/src/daieditor/map/MapModel.java 2006-10-28 23:23:42 UTC (rev 592) +++ trunk/daimonin/src/daieditor/map/MapModel.java 2006-10-29 16:45:24 UTC (rev 593) @@ -84,16 +84,6 @@ void addArchObjectToMap(GameObject arch, boolean insertBelow); /** - * Delete an existing arch from the map. (If the specified arch doesn't - * exist, nothing happens.) (This includes deletion of multiparts and - * inventory.) - * @param arch Arch to be removed - * @param refreshMap If true, mapview is redrawn after deletion. - * @todo eventually remove this method as arch has its own remove() method and refreshMap is controlled via the transaction system. - */ - void deleteMapArch(GameObject arch, boolean refreshMap); - - /** * Clear this map. */ void clearMap(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-10-28 23:23:46
|
Revision: 592 http://svn.sourceforge.net/gridarta/?rev=592&view=rev Author: christianhujer Date: 2006-10-28 16:23:42 -0700 (Sat, 28 Oct 2006) Log Message: ----------- Removed empty init target. Modified Paths: -------------- trunk/build.xml Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2006-10-28 17:27:20 UTC (rev 591) +++ trunk/build.xml 2006-10-28 23:23:42 UTC (rev 592) @@ -67,12 +67,6 @@ </target> <target - name = "init" - depends = "update" - > - </target> - - <target name = "clean" description = "Removes all generated files." > @@ -94,7 +88,6 @@ <target name = "compile" - depends = "init" description = "Compiles the Gridarta sources." > <mkdir dir="dest/app" /> @@ -199,7 +192,6 @@ <target name = "apiDoc" - depends = "init" description = "Creates public javadoc documentation." > <mkdir dir="dest/doc/api/${project.version}" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-10-28 17:27:40
|
Revision: 591 http://svn.sourceforge.net/gridarta/?rev=591&view=rev Author: christianhujer Date: 2006-10-28 10:27:20 -0700 (Sat, 28 Oct 2006) Log Message: ----------- Eliminated bogus arch terminology from gridarta main packages. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gameobject/ArchetypeParser.java trunk/daimonin/src/daieditor/gameobject/ArchetypeParser.java trunk/src/app/net/sf/gridarta/gameobject/ArchetypeParser.java trunk/src/app/net/sf/gridarta/gameobject/GameObject.java trunk/src/app/net/sf/gridarta/gameobject/RecursiveGameObjectIterator.java Modified: trunk/crossfire/src/cfeditor/gameobject/ArchetypeParser.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/ArchetypeParser.java 2006-10-28 16:27:59 UTC (rev 590) +++ trunk/crossfire/src/cfeditor/gameobject/ArchetypeParser.java 2006-10-28 17:27:20 UTC (rev 591) @@ -322,7 +322,7 @@ } } } - postParseDefArch(arch); + postParseArchetype(arch); arch.setIsArchetype(); mainControl.getArchetypeSet().addArchetype(arch); @@ -418,7 +418,7 @@ } /** {@inheritDoc} */ - public void postParseDefArch(final GameObject arch) { + public void postParseArchetype(final GameObject arch) { final String text = arch.getObjectText(); arch.resetObjectText(); final int len = text.length(); Modified: trunk/daimonin/src/daieditor/gameobject/ArchetypeParser.java =================================================================== --- trunk/daimonin/src/daieditor/gameobject/ArchetypeParser.java 2006-10-28 16:27:59 UTC (rev 590) +++ trunk/daimonin/src/daieditor/gameobject/ArchetypeParser.java 2006-10-28 17:27:20 UTC (rev 591) @@ -274,7 +274,7 @@ } } } - postParseDefArch(arch); + postParseArchetype(arch); arch.setIsArchetype(); arch.setEditorFolder(newCat); mainControl.getArchetypeSet().addArchetype(arch); @@ -396,7 +396,7 @@ } /** {@inheritDoc} */ - public void postParseDefArch(final GameObject arch) { + public void postParseArchetype(final GameObject arch) { final String text = arch.getObjectText(); arch.resetObjectText(); final int len = text.length(); Modified: trunk/src/app/net/sf/gridarta/gameobject/ArchetypeParser.java =================================================================== --- trunk/src/app/net/sf/gridarta/gameobject/ArchetypeParser.java 2006-10-28 16:27:59 UTC (rev 590) +++ trunk/src/app/net/sf/gridarta/gameobject/ArchetypeParser.java 2006-10-28 17:27:20 UTC (rev 591) @@ -12,13 +12,13 @@ public interface ArchetypeParser<G extends GameObject<G>> { /** - * Name of the system-arch containing path of starting map. + * Name of the system-archetype containing path of starting map. */ String STARTARCH_NAME = "map"; /** - * If the given arch is a multipart head, we generate the appropriate - * tail (from the arch stack) and attach it. The new arches get added + * If the given gameObject is a multipart head, we generate the appropriate + * tail (from the archetype stack) and attach it. The new gameObjects get added * to the temp list, not a map. This method should only be called * after map-loading. * The ArchetypeSet should be fully initialized at this point. @@ -30,7 +30,7 @@ /** * Read an Archetype from a file. - * @param fname filename of the arch definition file (*.arc) + * @param fname filename of the archetype definition file (*.arc) * @param index current subdirectory-index on the ArchPanel (-> ComboBoxes) */ void parseArchetype(String fname, int index); @@ -38,10 +38,10 @@ /** * Here we read an Archetype from a filestream, parse the data and * put the result in the ArchetypeSet in CMainControl. - * @param in <code>BufferedReader</code> file stream of arch data + * @param in <code>BufferedReader</code> file stream of archetype data * @param archetype Archetype (only for artifacts) * @param line first line, pre-parsed (only for artifacts) - * @param archName arch-object name (only for artifacts) + * @param archName archetype-object name (only for artifacts) * @param index current index on the ArchPanel * @param fname filename of the Archetype * @return TODO @@ -51,7 +51,7 @@ /** * Short form of {@link #parseArchetypeFromStream(BufferedReader, GameObject, String, String, int, String)}. - * @param in <code>BufferedReader</code> file stream of arch data + * @param in <code>BufferedReader</code> file stream of archetype data * @param index current index on the ArchPanel * @param fname filename of the Archetype * @throws IOException in case of I/O problems @@ -61,29 +61,29 @@ /** * I drop this here ... we got 2 functions now but i want the hardcore parsing * cut off from load parsing - * @param arch default arch to be parsed + * @param archetype archetype to be parsed * @todo improve this stupid comment */ - void postParseDefArch(G arch); + void postParseArchetype(G archetype); /** * Here we go... thats the hard one - * we copy the needed values from default arch to map arch + * we copy the needed values from archetype to the gameObject. * we setup the panels to show the right values * <p/> * first: the anim list... we want handle this later so we ignore this yet - * and let it in the arch text windows for handwork + * and let it in the gameObject text windows for handwork * <p/> * 2nd: msg/msgend * we had in the map a msg/msgend cmd or not * because we init our msg buffer only when one cmd come in * we have a null-ptr or a text * if text, this will overrule ALWAYS the default text - * if null, copy the default text in arch, so the user can see and edit it + * if null, copy the default text in the gameObject, so the user can see and edit it * if at save time msg-maparch == msg-default, we ignore it * in every other case (even "" text) we save - * @param gameObject map arch to be parsed - * @param editType edit type(s) to be calculated for the arch + * @param gameObject gameObject to be parsed + * @param editType edit type(s) to be calculated for the gameObject * @todo improve this stupid comment */ void postParseMapArch(G gameObject, int editType); Modified: trunk/src/app/net/sf/gridarta/gameobject/GameObject.java =================================================================== --- trunk/src/app/net/sf/gridarta/gameobject/GameObject.java 2006-10-28 16:27:59 UTC (rev 590) +++ trunk/src/app/net/sf/gridarta/gameobject/GameObject.java 2006-10-28 17:27:20 UTC (rev 591) @@ -15,7 +15,7 @@ @SuppressWarnings({"ClassReferencesSubclass"}) public abstract class GameObject<G extends GameObject<G>> extends GameObjectContainer<G> implements Archetype<G> { - /** Special constant that's used if a GameObject has no arch type set. */ + /** Special constant that's used if a GameObject has no GameObject type set. */ public static final int TYPE_UNSET = -666; /** @@ -53,8 +53,8 @@ /** * The msgText. * @note Every line in msgText must end on '\n', including the last line. - * @note If the value is <code>null</code>, the arch has no message text, - * if the value exists but is empty, the arch has an empty message text (unconfirmed). + * @note If the value is <code>null</code>, this GameObject has no message text, + * if the value exists but is empty, this GameObject has an empty message text (unconfirmed). */ @Nullable protected StringBuffer msgText; @@ -289,10 +289,10 @@ /** * Get all entries from the given archtext 'atxt' that don't exist in * 'this' archtext. - * @param atxt archtext to compare 'this'-arch with + * @param atxt archtext to compare this GameObject with. * @param ignoreValues if true: the values in the archtext-entries are * ignored at the comparison - * @return all lines from 'atxt' that don't occur in 'this' arch + * @return All lines from 'atxt' that don't occur in this GameObject. */ @NotNull public abstract String diffArchText(@NotNull String atxt, boolean ignoreValues); @@ -703,8 +703,8 @@ } /** - * Name which is best appropriate to describe this arch. (This can be - * arch/object name or default arch/object name) + * Name which is best appropriate to describe this GameObject. (This can be + * Archetype name or GameObject name) * @return best suitable descriptive name */ public String getBestName() { Modified: trunk/src/app/net/sf/gridarta/gameobject/RecursiveGameObjectIterator.java =================================================================== --- trunk/src/app/net/sf/gridarta/gameobject/RecursiveGameObjectIterator.java 2006-10-28 16:27:59 UTC (rev 590) +++ trunk/src/app/net/sf/gridarta/gameobject/RecursiveGameObjectIterator.java 2006-10-28 17:27:20 UTC (rev 591) @@ -31,13 +31,13 @@ /** {@inheritDoc} */ public G next() { - final G arch = current.next(); + final G gameObject = current.next(); try { - return arch; + return gameObject; } finally { - if (!arch.isEmpty()) { + if (!gameObject.isEmpty()) { iteratorStack.push(current); - current = arch.iterator(); + current = gameObject.iterator(); } else { try { while (!current.hasNext() ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-10-28 16:28:10
|
Revision: 590 http://svn.sourceforge.net/gridarta/?rev=590&view=rev Author: akirschbaum Date: 2006-10-28 09:27:59 -0700 (Sat, 28 Oct 2006) Log Message: ----------- Unify implementation. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CFArchTypeList.java trunk/daimonin/src/daieditor/CFArchTypeList.java Modified: trunk/crossfire/src/cfeditor/CFArchTypeList.java =================================================================== --- trunk/crossfire/src/cfeditor/CFArchTypeList.java 2006-10-28 16:19:45 UTC (rev 589) +++ trunk/crossfire/src/cfeditor/CFArchTypeList.java 2006-10-28 16:27:59 UTC (rev 590) @@ -549,18 +549,16 @@ typeFound = true; } else { // check if all the type-attributes match - final int argsNum = (int) (tmp.getTypeAttr().length / 2.0); if (log.isDebugEnabled()) { log.debug("# type: " + tmp.getTypeName()); } + final int numArgs = (int) (tmp.getTypeAttr().length / 2.0); boolean match = true; - for (int t = 0; t < argsNum * 2; t += 2) { + for (int t = 0, l = numArgs * 2; t < l && match; t += 2) { final String archvalue = arch.getAttributeString(tmp.getTypeAttr()[t]); - - if (!archvalue.equals(tmp.getTypeAttr()[t + 1]) && - !(tmp.getTypeAttr()[t + 1].equals("0") && archvalue.length() == 0)) { + if (!archvalue.equals(tmp.getTypeAttr()[t + 1]) && !(tmp.getTypeAttr()[t + 1].equals("0") && archvalue.length() == 0)) { match = false; } } Modified: trunk/daimonin/src/daieditor/CFArchTypeList.java =================================================================== --- trunk/daimonin/src/daieditor/CFArchTypeList.java 2006-10-28 16:19:45 UTC (rev 589) +++ trunk/daimonin/src/daieditor/CFArchTypeList.java 2006-10-28 16:27:59 UTC (rev 590) @@ -380,14 +380,14 @@ return tmp; } else { // check if all the type-attributes match - final int numArgs = (int) (tmp.getTypeAttr().length / 2.0); - boolean match = true; if (log.isDebugEnabled()) { log.debug("# type: " + tmp.getTypeName()); } - for (int t = 0, l = numArgs << 1; t < l && match; t += 2) { + final int numArgs = (int) (tmp.getTypeAttr().length / 2.0); + boolean match = true; + for (int t = 0, l = numArgs * 2; t < l && match; t += 2) { final String archvalue = arch.getAttributeString(tmp.getTypeAttr()[t], true); if (!archvalue.equals(tmp.getTypeAttr()[t + 1]) && !("0".equals(tmp.getTypeAttr()[t + 1]) && archvalue.length() == 0)) { match = false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-10-28 16:19:50
|
Revision: 589 http://svn.sourceforge.net/gridarta/?rev=589&view=rev Author: akirschbaum Date: 2006-10-28 09:19:45 -0700 (Sat, 28 Oct 2006) Log Message: ----------- Unify logging statements. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMapFileEncode.java Modified: trunk/daimonin/src/daieditor/CMapFileEncode.java =================================================================== --- trunk/daimonin/src/daieditor/CMapFileEncode.java 2006-10-28 16:02:47 UTC (rev 588) +++ trunk/daimonin/src/daieditor/CMapFileEncode.java 2006-10-28 16:19:45 UTC (rev 589) @@ -36,6 +36,7 @@ import net.sf.gridarta.gameobject.Archetype; import net.sf.gridarta.map.MapSquare; import net.sf.gridarta.io.IOUtils; +import org.apache.log4j.Logger; /** * The <code>CMapFileEncode</code> is used to write a map to a file. @@ -46,6 +47,8 @@ @SuppressWarnings({"HardcodedLineSeparator"}) public final class CMapFileEncode { + private static final Logger log = Logger.getLogger(CMapFileEncode.class); + /** * Formatter to use for writing maps. * @note use '\n' for line endings only. The fileformat requires Unix LF only. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-10-28 16:02:57
|
Revision: 588 http://svn.sourceforge.net/gridarta/?rev=588&view=rev Author: akirschbaum Date: 2006-10-28 09:02:47 -0700 (Sat, 28 Oct 2006) Log Message: ----------- Fix typo in (commented) variable name. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMapFileDecode.java Modified: trunk/crossfire/src/cfeditor/CMapFileDecode.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapFileDecode.java 2006-10-28 16:01:17 UTC (rev 587) +++ trunk/crossfire/src/cfeditor/CMapFileDecode.java 2006-10-28 16:02:47 UTC (rev 588) @@ -178,7 +178,7 @@ gameObject.addMsgText(thisLine2 + "\n"); } } else if (animflag) { - //arch.addArchText(thisLine + "\n"); + //gameObject.addArchText(thisLine + "\n"); if (thisLine.regionMatches(0, "mina", 0, 4)) { animflag = false; } else { // we not include anim yet in panel @@ -205,7 +205,7 @@ } return gameObject; } else if (thisLine.regionMatches(0, "msg", 0, 3)) { - // arch.addArchText(thisLine + "\n"); + // gameObject.addArchText(thisLine + "\n"); gameObject.addMsgText(""); // this init the msg text buffer // in the case of msg/endmsg // with no content to overrule def msg @@ -216,7 +216,7 @@ } else if (thisLine.regionMatches(0, "anim_speed", 0, 10)) { gameObject.addObjectText(thisLine + "\n"); } else if (thisLine.regionMatches(0, "anim", 0, 4)) { - //arch.addArchText(thisLine + "\n"); + //gameObject.addArchText(thisLine + "\n"); animflag = true; } else if (thisLine.startsWith("event_")) { // here's something about a scripted event This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-10-28 16:01:24
|
Revision: 587 http://svn.sourceforge.net/gridarta/?rev=587&view=rev Author: akirschbaum Date: 2006-10-28 09:01:17 -0700 (Sat, 28 Oct 2006) Log Message: ----------- Unify logging statements. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMapFileDecode.java Modified: trunk/daimonin/src/daieditor/CMapFileDecode.java =================================================================== --- trunk/daimonin/src/daieditor/CMapFileDecode.java 2006-10-28 15:48:14 UTC (rev 586) +++ trunk/daimonin/src/daieditor/CMapFileDecode.java 2006-10-28 16:01:17 UTC (rev 587) @@ -35,6 +35,7 @@ import java.util.ArrayList; import java.util.List; import net.sf.gridarta.io.IOUtils; +import org.apache.log4j.Logger; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -50,6 +51,8 @@ */ public final class CMapFileDecode { + private static final Logger log = Logger.getLogger(CMapFileDecode.class); + /** ArchObjects that are read from the map. */ private List<GameObject> objects; @@ -148,15 +151,21 @@ // ok, we had a full arch... don't care here about map or object // now we test for a new arch - thats stuf in inventory // or the end... thats the end of this shit - //System.err.println("GO INVENTORY: " + arch + " - " + thisLine); + if (log.isDebugEnabled()) { + log.debug("GO INVENTORY: " + gameObject + " - " + thisLine); + } gameObject.addLast(readArch(myInput, thisLine)); - //System.err.println("GO INVENTORY2: " + arch + " - " + thisLine); + if (log.isDebugEnabled()) { + log.debug("GO INVENTORY2: " + gameObject + " - " + thisLine); + } } else if (thisLine.startsWith("end")) { // chain this to temp list objects.add(gameObject); archflag = false; - // System.err.println("LEAVE!: " + arch + " - " + thisLine); + if (log.isDebugEnabled()) { + log.debug("LEAVE!: " + gameObject + " - " + thisLine); + } return gameObject; } else if (thisLine.startsWith("msg")) { gameObject.addMsgText(""); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-10-28 15:48:22
|
Revision: 586 http://svn.sourceforge.net/gridarta/?rev=586&view=rev Author: akirschbaum Date: 2006-10-28 08:48:14 -0700 (Sat, 28 Oct 2006) Log Message: ----------- Unify logging statements. Modified Paths: -------------- trunk/daimonin/src/daieditor/CGUIUtils.java Modified: trunk/daimonin/src/daieditor/CGUIUtils.java =================================================================== --- trunk/daimonin/src/daieditor/CGUIUtils.java 2006-10-28 14:22:27 UTC (rev 585) +++ trunk/daimonin/src/daieditor/CGUIUtils.java 2006-10-28 15:48:14 UTC (rev 586) @@ -29,6 +29,7 @@ import java.util.HashMap; import java.util.Map; import javax.swing.ImageIcon; +import org.apache.log4j.Logger; /** * <code>CGUtils</code> is a collection of GUI utility methods. @@ -39,6 +40,8 @@ */ public final class CGUIUtils { + private static final Logger log = Logger.getLogger(CGUIUtils.class); + /** Do not subclass. */ private CGUIUtils() { /* nothing to do - never invoked. */ @@ -85,11 +88,11 @@ if (imageResource != null) { icon = new ImageIcon(imageResource); } else { - System.err.println("Failed to load icon '" + strIconName + "'!"); + log.warn("Failed to load icon '" + strIconName + "'!"); icon = null; } } else { - System.err.println("Failed to load icon '" + strIconName + "'!"); + log.warn("Failed to load icon '" + strIconName + "'!"); icon = null; } } @@ -98,7 +101,7 @@ if (icon != null) { imageCache.put(strIconName, icon); } else { - System.err.println("NO ICON FOR " + strIconName + "!!!"); + log.warn("NO ICON FOR " + strIconName + "!!!"); } return icon; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-10-28 14:38:21
|
Revision: 578 http://svn.sourceforge.net/gridarta/?rev=578&view=rev Author: akirschbaum Date: 2006-10-28 06:34:21 -0700 (Sat, 28 Oct 2006) Log Message: ----------- Unify implementation. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CAttribDialog.java trunk/daimonin/src/daieditor/CAttribDialog.java Modified: trunk/crossfire/src/cfeditor/CAttribDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-10-24 20:26:18 UTC (rev 577) +++ trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-10-28 13:34:21 UTC (rev 578) @@ -912,12 +912,11 @@ newAttr.ref = type.getAttr()[i]; // textfield (no direct input, text is set by the treasurelist dialog) - final JTextField input; String treasureName = gameObject.getAttributeString(type.getAttr()[i].getNameOld()); if (treasureName.trim().length() == 0 || treasureName.trim().equalsIgnoreCase("none")) { treasureName = CFTreasureListTree.NONE_SYM; } - input = new JTextField(" " + treasureName, textFieldColumns); + final JTextField input = new JTextField(" " + treasureName, textFieldColumns); input.setEditable(false); viewTTree.addActionListener(new ViewTreasurelistAL((StringAttrib) newAttr, this)); @@ -936,30 +935,29 @@ ((StringAttrib) newAttr).input = input; } break; - default: { + default: newAttr = null; + assert false; + break; + } // switch (dType) + + assert newAttr != null; + if (newAttr.helpButton != null) { + // help button: popup Info Window when clicked + newAttr.helpButton.addActionListener(new HelpAL(newAttr.ref)); } - break; + + // now attach the new attribute into the list + if (attrHead == null) { + attrHead = attrTail = newAttr; + } else { + attrTail.next = newAttr; + attrTail = attrTail.next; } - if (newAttr != null) { - if (newAttr.helpButton != null) { - // help button: popup Info Window when clicked - newAttr.helpButton.addActionListener(new HelpAL(newAttr.ref)); - } - - // now attach the new attribute into the list - if (attrHead == null) { - attrHead = attrTail = newAttr; - } else { - attrTail.next = newAttr; - attrTail = attrTail.next; - } - - if (!isText) { - panel2.setSize(new Dimension(width - 70, 20)); - panel.add(panel2); - } + if (!isText) { + panel2.setSize(new Dimension(width - 70, 20)); + panel.add(panel2); } } } Modified: trunk/daimonin/src/daieditor/CAttribDialog.java =================================================================== --- trunk/daimonin/src/daieditor/CAttribDialog.java 2006-10-24 20:26:18 UTC (rev 577) +++ trunk/daimonin/src/daieditor/CAttribDialog.java 2006-10-28 13:34:21 UTC (rev 578) @@ -831,7 +831,9 @@ default: newAttr = null; assert false; + break; } // switch (dType) + assert newAttr != null; dialogAttribs.add(newAttr); helpButton.addActionListener(new HelpActionListener(newAttr.ref)); @@ -853,6 +855,7 @@ } } } + if (!isText) { // if the component does not already have glue, put glue inside to align its contents to the top. panel.add(Box.createGlue(), glueGbc); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |