From: <aki...@us...> - 2008-02-04 14:59:11
|
Revision: 3501 http://gridarta.svn.sourceforge.net/gridarta/?rev=3501&view=rev Author: akirschbaum Date: 2008-02-04 06:59:08 -0800 (Mon, 04 Feb 2008) Log Message: ----------- Move MapControl.isPickmap to common code base. Modified Paths: -------------- trunk/crossfire/src/cfeditor/map/MapControl.java trunk/daimonin/src/daieditor/map/MapControl.java trunk/src/app/net/sf/gridarta/map/AbstractMapControl.java Modified: trunk/crossfire/src/cfeditor/map/MapControl.java =================================================================== --- trunk/crossfire/src/cfeditor/map/MapControl.java 2008-02-04 14:51:08 UTC (rev 3500) +++ trunk/crossfire/src/cfeditor/map/MapControl.java 2008-02-04 14:59:08 UTC (rev 3501) @@ -72,11 +72,6 @@ private SoftReference<SimpleLevelRenderer> simpleLevelRendererReference; /** - * Flag that indicates whether this is a pickmap or not. - */ - private final boolean isPickmap; - - /** * Each view of this map will get a unique number. */ private int viewCounter = 0; @@ -89,18 +84,13 @@ * @param isPickmap true if this is a pickmap */ public MapControl(final CMainControl mainControl, final List<GameObject> objects, final MapArchObject mapArchObject, final boolean isPickmap) { + super(isPickmap); this.mainControl = mainControl; - this.isPickmap = isPickmap; // is this a pickmap? // we create model (= data) mapModel = new DefaultMapModel(mainControl, this, objects, mapArchObject); init(); } - /** {@inheritDoc} */ - public boolean isPickmap() { - return isPickmap; - } - /** * Repaints all views. */ Modified: trunk/daimonin/src/daieditor/map/MapControl.java =================================================================== --- trunk/daimonin/src/daieditor/map/MapControl.java 2008-02-04 14:51:08 UTC (rev 3500) +++ trunk/daimonin/src/daieditor/map/MapControl.java 2008-02-04 14:59:08 UTC (rev 3501) @@ -72,11 +72,6 @@ private SoftReference<SimpleLevelRenderer> simpleLevelRendererReference; /** - * Flag that indicates whether this is a pickmap or not. - */ - private final boolean isPickmap; - - /** * Each view of this map will get a unique number. */ private int viewCounter = 0; @@ -89,18 +84,13 @@ * @param isPickmap true if this is a pickmap */ public MapControl(final CMainControl mainControl, final List<GameObject> objects, final MapArchObject mapArchObject, final boolean isPickmap) { + super(isPickmap); this.mainControl = mainControl; - this.isPickmap = isPickmap; // is this a pickmap? // we create model (= data) mapModel = new DefaultMapModel(mainControl, this, objects, mapArchObject); init(); } - /** {@inheritDoc} */ - public boolean isPickmap() { - return isPickmap; - } - /** * Repaints all views. */ Modified: trunk/src/app/net/sf/gridarta/map/AbstractMapControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/map/AbstractMapControl.java 2008-02-04 14:51:08 UTC (rev 3500) +++ trunk/src/app/net/sf/gridarta/map/AbstractMapControl.java 2008-02-04 14:59:08 UTC (rev 3501) @@ -54,6 +54,11 @@ private final EventListenerList listenerList = new EventListenerList(); /** + * Flag that indicates whether this is a pickmap or not. + */ + private final boolean isPickmap; + + /** * Set if the map has changed since last save. */ private boolean modified = false; @@ -105,8 +110,11 @@ /** * Create a new instance. + * + * @param isPickmap true if this is a pickmap */ - protected AbstractMapControl() { + protected AbstractMapControl(final boolean isPickmap) { + this.isPickmap = isPickmap; } /** @@ -361,4 +369,9 @@ mapViews.add(0, mapView); } + /** {@inheritDoc} */ + public boolean isPickmap() { + return isPickmap; + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-02-04 15:05:21
|
Revision: 3502 http://gridarta.svn.sourceforge.net/gridarta/?rev=3502&view=rev Author: akirschbaum Date: 2008-02-04 07:05:03 -0800 (Mon, 04 Feb 2008) Log Message: ----------- Move MapControl.getFullImage() to common code base. Modified Paths: -------------- trunk/crossfire/src/cfeditor/map/MapControl.java trunk/daimonin/src/daieditor/map/MapControl.java trunk/src/app/net/sf/gridarta/map/AbstractMapControl.java trunk/src/app/net/sf/gridarta/map/MapControl.java Modified: trunk/crossfire/src/cfeditor/map/MapControl.java =================================================================== --- trunk/crossfire/src/cfeditor/map/MapControl.java 2008-02-04 14:59:08 UTC (rev 3501) +++ trunk/crossfire/src/cfeditor/map/MapControl.java 2008-02-04 15:05:03 UTC (rev 3502) @@ -25,7 +25,6 @@ import cfeditor.gameobject.GameObject; import cfeditor.gui.map.SimpleLevelRenderer; import java.awt.Point; -import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.lang.ref.SoftReference; @@ -233,12 +232,8 @@ } } - /** - * Return a <code>LevelRenderer</code> of the map. If no renderer is - * available a new one is created and returned. - * @return a <code>LevelRenderer</code> which may have to be created - */ - public LevelRenderer getRenderer() { + /** {@inheritDoc} */ + @Override public LevelRenderer getRenderer() { final SimpleLevelRenderer tmpLevelRenderer = simpleLevelRendererReference == null ? null : simpleLevelRendererReference.get(); final SimpleLevelRenderer simpleLevelRenderer; if (tmpLevelRenderer == null) { @@ -251,11 +246,6 @@ } /** {@inheritDoc} */ - public BufferedImage getFullImage() { - return getRenderer().getFullImage(); - } - - /** {@inheritDoc} */ @NotNull @Override protected MapView<GameObject, MapArchObject, Archetype, MapControl, CMapViewBasic> newMapView(@Nullable final Point viewPosition) { return new MapView<GameObject, MapArchObject, Archetype, MapControl, CMapViewBasic>(mainControl, this, ++viewCounter, new CMapViewBasic(mainControl, this, viewPosition), ActionFactory.getFactory("cfeditor")); } Modified: trunk/daimonin/src/daieditor/map/MapControl.java =================================================================== --- trunk/daimonin/src/daieditor/map/MapControl.java 2008-02-04 14:59:08 UTC (rev 3501) +++ trunk/daimonin/src/daieditor/map/MapControl.java 2008-02-04 15:05:03 UTC (rev 3502) @@ -25,7 +25,6 @@ import daieditor.gameobject.GameObject; import daieditor.gui.map.SimpleLevelRenderer; import java.awt.Point; -import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.lang.ref.SoftReference; @@ -233,12 +232,8 @@ } } - /** - * Return a <code>LevelRenderer</code> of the map. If no renderer is - * available a new one is created and returned. - * @return a <code>LevelRenderer</code> which may have to be created - */ - public LevelRenderer getRenderer() { + /** {@inheritDoc} */ + @Override public LevelRenderer getRenderer() { final SimpleLevelRenderer tmpLevelRenderer = simpleLevelRendererReference == null ? null : simpleLevelRendererReference.get(); final SimpleLevelRenderer simpleLevelRenderer; if (tmpLevelRenderer == null) { @@ -251,11 +246,6 @@ } /** {@inheritDoc} */ - public BufferedImage getFullImage() { - return getRenderer().getFullImage(); - } - - /** {@inheritDoc} */ @NotNull @Override protected MapView<GameObject, MapArchObject, Archetype, MapControl, CMapViewBasic> newMapView(@Nullable final Point viewPosition) { return new MapView<GameObject, MapArchObject, Archetype, MapControl, CMapViewBasic>(mainControl, this, ++viewCounter, new CMapViewBasic(mainControl, this, viewPosition), ActionFactory.getFactory("daieditor")); } Modified: trunk/src/app/net/sf/gridarta/map/AbstractMapControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/map/AbstractMapControl.java 2008-02-04 14:59:08 UTC (rev 3501) +++ trunk/src/app/net/sf/gridarta/map/AbstractMapControl.java 2008-02-04 15:05:03 UTC (rev 3502) @@ -20,6 +20,7 @@ package net.sf.gridarta.map; import java.awt.Point; +import java.awt.image.BufferedImage; import java.io.File; import java.util.ArrayList; import java.util.LinkedList; @@ -374,4 +375,9 @@ return isPickmap; } + /** {@inheritDoc} */ + public BufferedImage getFullImage() { + return getRenderer().getFullImage(); + } + } Modified: trunk/src/app/net/sf/gridarta/map/MapControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/map/MapControl.java 2008-02-04 14:59:08 UTC (rev 3501) +++ trunk/src/app/net/sf/gridarta/map/MapControl.java 2008-02-04 15:05:03 UTC (rev 3502) @@ -25,6 +25,7 @@ import java.util.List; import net.sf.gridarta.gameobject.Archetype; import net.sf.gridarta.gameobject.GameObject; +import net.sf.gridarta.gui.map.LevelRenderer; import net.sf.gridarta.gui.map.MapView; import net.sf.gridarta.gui.map.MapViewBasic; import org.jetbrains.annotations.NotNull; @@ -199,4 +200,11 @@ */ void levelCloseNotify(); + /** + * Return a <code>LevelRenderer</code> of the map. If no renderer is + * available a new one is created and returned. + * @return a <code>LevelRenderer</code> which may have to be created + */ + LevelRenderer getRenderer(); + } // interface MapControl This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-02-04 15:42:41
|
Revision: 3503 http://gridarta.svn.sourceforge.net/gridarta/?rev=3503&view=rev Author: akirschbaum Date: 2008-02-04 07:42:44 -0800 (Mon, 04 Feb 2008) Log Message: ----------- Move MapControl.encodeMapFile() to common code base. Modified Paths: -------------- trunk/crossfire/src/cfeditor/map/MapControl.java trunk/daimonin/src/daieditor/map/MapControl.java trunk/src/app/net/sf/gridarta/MapImageCache.java trunk/src/app/net/sf/gridarta/map/AbstractMapControl.java Modified: trunk/crossfire/src/cfeditor/map/MapControl.java =================================================================== --- trunk/crossfire/src/cfeditor/map/MapControl.java 2008-02-04 15:05:03 UTC (rev 3502) +++ trunk/crossfire/src/cfeditor/map/MapControl.java 2008-02-04 15:42:44 UTC (rev 3503) @@ -29,12 +29,9 @@ import java.io.IOException; import java.lang.ref.SoftReference; import java.util.List; -import net.sf.gridarta.MapImageCache; import net.sf.gridarta.gui.map.LevelRenderer; import net.sf.gridarta.gui.map.MapView; import net.sf.gridarta.gui.map.MapViewBasic; -import net.sf.gridarta.io.DefaultMapWriter; -import net.sf.gridarta.io.MapWriter; import net.sf.gridarta.map.AbstractMapControl; import net.sf.gridarta.map.MapModel; import net.sf.gridarta.map.MapSquare; @@ -61,11 +58,6 @@ private final MapModel<GameObject, MapArchObject, Archetype> mapModel; /** - * Action Factory. - */ - private static final ActionFactory ACTION_FACTORY = ActionFactory.getFactory("cfeditor"); - - /** * Reference to SimpleLevelRenderer, which is only used to get images. */ private SoftReference<SimpleLevelRenderer> simpleLevelRendererReference; @@ -110,7 +102,7 @@ if (isModified()) { mapModel.getMapArchObject().updateModifiedAttribute(); } - if (!encodeMapFile(mapFile, mapModel)) { + if (!encodeMapFile(mapFile, mapModel, mainControl)) { return; } /* if we open a pickmap in the editor, is handled as normal map. @@ -137,7 +129,7 @@ */ public void saveAs(@NotNull final File file) { mainControl.getMainView().setStatusText("Saving the map to a file..."); - if (!encodeMapFile(file, mapModel)) { + if (!encodeMapFile(file, mapModel, mainControl)) { return; } mapFile = file; @@ -255,27 +247,4 @@ return mapModel; } - /** - * Save a map. - * @param file File to save to - * @param mapModel MapModel to save - * @return Whether saving was successful. - */ - private boolean encodeMapFile(@NotNull final File file, final MapModel<GameObject, MapArchObject, Archetype> mapModel) { - try { - final MapWriter<GameObject, MapArchObject, Archetype> mapFileEncoder = new DefaultMapWriter<GameObject, MapArchObject, Archetype>(mainControl, file); - try { - mapFileEncoder.encodeMapFile(mapModel); - } finally { - mapFileEncoder.close(); - } - - mainControl.getMapImageCache().updateCaches(file, this, MapImageCache.Type.ICON); - } catch (final IOException e) { - ACTION_FACTORY.showMessageDialog(mainControl.getMainView(), "encodeMapFile", file, e.getMessage()); - return false; - } - return true; - } - } // class MapControl Modified: trunk/daimonin/src/daieditor/map/MapControl.java =================================================================== --- trunk/daimonin/src/daieditor/map/MapControl.java 2008-02-04 15:05:03 UTC (rev 3502) +++ trunk/daimonin/src/daieditor/map/MapControl.java 2008-02-04 15:42:44 UTC (rev 3503) @@ -29,12 +29,9 @@ import java.io.IOException; import java.lang.ref.SoftReference; import java.util.List; -import net.sf.gridarta.MapImageCache; import net.sf.gridarta.gui.map.LevelRenderer; import net.sf.gridarta.gui.map.MapView; import net.sf.gridarta.gui.map.MapViewBasic; -import net.sf.gridarta.io.DefaultMapWriter; -import net.sf.gridarta.io.MapWriter; import net.sf.gridarta.map.AbstractMapControl; import net.sf.gridarta.map.MapModel; import net.sf.gridarta.map.MapSquare; @@ -61,11 +58,6 @@ private final MapModel<GameObject, MapArchObject, Archetype> mapModel; /** - * Action Factory. - */ - private static final ActionFactory ACTION_FACTORY = ActionFactory.getFactory("daieditor"); - - /** * Reference to SimpleLevelRenderer, which is only used to get images. */ private SoftReference<SimpleLevelRenderer> simpleLevelRendererReference; @@ -110,7 +102,7 @@ if (isModified()) { mapModel.getMapArchObject().updateModifiedAttribute(); } - if (!encodeMapFile(mapFile, mapModel)) { + if (!encodeMapFile(mapFile, mapModel, mainControl)) { return; } /* if we open a pickmap in the editor, is handled as normal map. @@ -137,7 +129,7 @@ */ public void saveAs(@NotNull final File file) { mainControl.getMainView().setStatusText("Saving the map to a file..."); - if (!encodeMapFile(file, mapModel)) { + if (!encodeMapFile(file, mapModel, mainControl)) { return; } mapFile = file; @@ -255,27 +247,4 @@ return mapModel; } - /** - * Save a map. - * @param file File to save to - * @param mapModel MapModel to save - * @return Whether saving was successful. - */ - private boolean encodeMapFile(@NotNull final File file, final MapModel<GameObject, MapArchObject, Archetype> mapModel) { - try { - final MapWriter<GameObject, MapArchObject, Archetype> mapFileEncoder = new DefaultMapWriter<GameObject, MapArchObject, Archetype>(mainControl, file); - try { - mapFileEncoder.encodeMapFile(mapModel); - } finally { - mapFileEncoder.close(); - } - - mainControl.getMapImageCache().updateCaches(file, this, MapImageCache.Type.ICON); - } catch (final IOException e) { - ACTION_FACTORY.showMessageDialog(mainControl.getMainView(), "encodeMapFile", file, e.getMessage()); - return false; - } - return true; - } - } // class MapControl Modified: trunk/src/app/net/sf/gridarta/MapImageCache.java =================================================================== --- trunk/src/app/net/sf/gridarta/MapImageCache.java 2008-02-04 15:05:03 UTC (rev 3502) +++ trunk/src/app/net/sf/gridarta/MapImageCache.java 2008-02-04 15:42:44 UTC (rev 3503) @@ -274,7 +274,7 @@ * * @return the image */ - @NotNull public ImageIcon updateCaches(@Nullable final File mapFile, @NotNull final C mapControl, final Type type) { + @NotNull public ImageIcon updateCaches(@Nullable final File mapFile, @NotNull final MapControl<G, A, R> mapControl, final Type type) { final BufferedImage fullImage; final ImageIcon[] images = new ImageIcon[2]; try { Modified: trunk/src/app/net/sf/gridarta/map/AbstractMapControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/map/AbstractMapControl.java 2008-02-04 15:05:03 UTC (rev 3502) +++ trunk/src/app/net/sf/gridarta/map/AbstractMapControl.java 2008-02-04 15:42:44 UTC (rev 3503) @@ -22,16 +22,22 @@ import java.awt.Point; import java.awt.image.BufferedImage; import java.io.File; +import java.io.IOException; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import javax.swing.event.EventListenerList; +import net.sf.gridarta.AbstractMainControl; import net.sf.gridarta.CommonConstants; +import net.sf.gridarta.MapImageCache; import net.sf.gridarta.Size2D; import net.sf.gridarta.gameobject.Archetype; import net.sf.gridarta.gameobject.GameObject; import net.sf.gridarta.gui.map.MapView; import net.sf.gridarta.gui.map.MapViewBasic; +import net.sf.gridarta.io.DefaultMapWriter; +import net.sf.gridarta.io.MapWriter; +import net.sf.japi.swing.ActionFactory; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -44,6 +50,11 @@ public abstract class AbstractMapControl<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> implements MapControl<G, A, R> { /** + * Action Factory. + */ + private static final ActionFactory ACTION_FACTORY = ActionFactory.getFactory("net.sf.gridarta"); + + /** * List of all views of this map. Maps opened in the editor have one or * more views; if the last view is closed, the map is closed, too. Maps * opened by scripts or used internally may have zero or more views. @@ -380,4 +391,27 @@ return getRenderer().getFullImage(); } + /** + * Save a map. + * @param file File to save to + * @param mapModel MapModel to save + * @return Whether saving was successful. + */ + protected <C extends MapControl<G, A, R>, V extends MapViewBasic<G, A, R>> boolean encodeMapFile(@NotNull final File file, final MapModel<G, A, R> mapModel, @NotNull final AbstractMainControl<G, A, R, C, V> mainControl) { + try { + final MapWriter<G, A, R> mapFileEncoder = new DefaultMapWriter<G, A, R>(mainControl, file); + try { + mapFileEncoder.encodeMapFile(mapModel); + } finally { + mapFileEncoder.close(); + } + + mainControl.getMapImageCache().updateCaches(file, this, MapImageCache.Type.ICON); + } catch (final IOException e) { + ACTION_FACTORY.showMessageDialog(mainControl.getMainView(), "encodeMapFile", file, e.getMessage()); + return false; + } + return true; + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-02-04 16:19:42
|
Revision: 3506 http://gridarta.svn.sourceforge.net/gridarta/?rev=3506&view=rev Author: akirschbaum Date: 2008-02-04 08:19:23 -0800 (Mon, 04 Feb 2008) Log Message: ----------- Remove unused import statements. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java trunk/crossfire/src/cfeditor/gui/prefs/GUIPrefs.java trunk/crossfire/src/cfeditor/map/DefaultMapModel.java trunk/crossfire/src/cfeditor/map/MapControl.java trunk/daimonin/src/daieditor/gameobject/ArchetypeSet.java trunk/daimonin/src/daieditor/map/DefaultMapModel.java trunk/daimonin/src/daieditor/map/MapControl.java trunk/src/app/net/sf/gridarta/DefaultMapManager.java trunk/src/app/net/sf/gridarta/gui/ArchetypesActions.java trunk/src/app/net/sf/gridarta/gui/ObjectChoiceDisplay.java trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java Modified: trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java 2008-02-04 16:17:15 UTC (rev 3505) +++ trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java 2008-02-04 16:19:23 UTC (rev 3506) @@ -36,9 +36,7 @@ import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.Arrays; -import java.util.Collection; import java.util.List; -import java.util.Map; import javax.swing.ImageIcon; import net.sf.gridarta.AbstractMainControl; import net.sf.gridarta.gameobject.AbstractArchetypeParser; Modified: trunk/crossfire/src/cfeditor/gui/prefs/GUIPrefs.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/prefs/GUIPrefs.java 2008-02-04 16:17:15 UTC (rev 3505) +++ trunk/crossfire/src/cfeditor/gui/prefs/GUIPrefs.java 2008-02-04 16:19:23 UTC (rev 3506) @@ -19,7 +19,6 @@ package cfeditor.gui.prefs; -import cfeditor.CMainControl; import cfeditor.CMainView; import java.awt.Component; import java.util.Arrays; Modified: trunk/crossfire/src/cfeditor/map/DefaultMapModel.java =================================================================== --- trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2008-02-04 16:17:15 UTC (rev 3505) +++ trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2008-02-04 16:19:23 UTC (rev 3506) @@ -27,7 +27,6 @@ import net.sf.gridarta.gui.GUIConstants; import net.sf.gridarta.map.AbstractMapModel; import net.sf.gridarta.map.MapModel; -import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; /** Modified: trunk/crossfire/src/cfeditor/map/MapControl.java =================================================================== --- trunk/crossfire/src/cfeditor/map/MapControl.java 2008-02-04 16:17:15 UTC (rev 3505) +++ trunk/crossfire/src/cfeditor/map/MapControl.java 2008-02-04 16:19:23 UTC (rev 3506) @@ -31,7 +31,6 @@ import java.util.List; import net.sf.gridarta.gui.map.LevelRenderer; import net.sf.gridarta.gui.map.MapView; -import net.sf.gridarta.gui.map.MapViewBasic; import net.sf.gridarta.map.AbstractMapControl; import net.sf.gridarta.map.MapModel; import net.sf.gridarta.map.MapSquare; Modified: trunk/daimonin/src/daieditor/gameobject/ArchetypeSet.java =================================================================== --- trunk/daimonin/src/daieditor/gameobject/ArchetypeSet.java 2008-02-04 16:17:15 UTC (rev 3505) +++ trunk/daimonin/src/daieditor/gameobject/ArchetypeSet.java 2008-02-04 16:19:23 UTC (rev 3506) @@ -38,7 +38,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import java.util.Map; import javax.swing.ImageIcon; import net.sf.gridarta.AbstractMainControl; import net.sf.gridarta.gameobject.AbstractArchetypeParser; Modified: trunk/daimonin/src/daieditor/map/DefaultMapModel.java =================================================================== --- trunk/daimonin/src/daieditor/map/DefaultMapModel.java 2008-02-04 16:17:15 UTC (rev 3505) +++ trunk/daimonin/src/daieditor/map/DefaultMapModel.java 2008-02-04 16:19:23 UTC (rev 3506) @@ -29,7 +29,6 @@ import net.sf.gridarta.map.AbstractMapModel; import net.sf.gridarta.map.MapModel; import net.sf.japi.swing.ActionFactory; -import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; /** Modified: trunk/daimonin/src/daieditor/map/MapControl.java =================================================================== --- trunk/daimonin/src/daieditor/map/MapControl.java 2008-02-04 16:17:15 UTC (rev 3505) +++ trunk/daimonin/src/daieditor/map/MapControl.java 2008-02-04 16:19:23 UTC (rev 3506) @@ -31,7 +31,6 @@ import java.util.List; import net.sf.gridarta.gui.map.LevelRenderer; import net.sf.gridarta.gui.map.MapView; -import net.sf.gridarta.gui.map.MapViewBasic; import net.sf.gridarta.map.AbstractMapControl; import net.sf.gridarta.map.MapModel; import net.sf.gridarta.map.MapSquare; Modified: trunk/src/app/net/sf/gridarta/DefaultMapManager.java =================================================================== --- trunk/src/app/net/sf/gridarta/DefaultMapManager.java 2008-02-04 16:17:15 UTC (rev 3505) +++ trunk/src/app/net/sf/gridarta/DefaultMapManager.java 2008-02-04 16:19:23 UTC (rev 3506) @@ -28,7 +28,6 @@ import java.util.List; import javax.swing.JOptionPane; import javax.swing.event.EventListenerList; -import net.sf.gridarta.MainControlListener; import net.sf.gridarta.gameobject.Archetype; import net.sf.gridarta.gameobject.GameObject; import net.sf.gridarta.gui.map.MapView; Modified: trunk/src/app/net/sf/gridarta/gui/ArchetypesActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/ArchetypesActions.java 2008-02-04 16:17:15 UTC (rev 3505) +++ trunk/src/app/net/sf/gridarta/gui/ArchetypesActions.java 2008-02-04 16:19:23 UTC (rev 3506) @@ -23,7 +23,6 @@ import net.sf.gridarta.gameobject.Archetype; import net.sf.gridarta.gameobject.ArchetypeSet; import net.sf.gridarta.gameobject.GameObject; -import net.sf.gridarta.gui.InsertionObjectChooser; import net.sf.gridarta.gui.archetypechooser.ArchetypeChooserControl; import net.sf.gridarta.gui.archetypechooser.ArchetypeChooserListener; import net.sf.gridarta.gui.findarchetypes.FindArchetypesDialog; Modified: trunk/src/app/net/sf/gridarta/gui/ObjectChoiceDisplay.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/ObjectChoiceDisplay.java 2008-02-04 16:17:15 UTC (rev 3505) +++ trunk/src/app/net/sf/gridarta/gui/ObjectChoiceDisplay.java 2008-02-04 16:19:23 UTC (rev 3506) @@ -28,7 +28,6 @@ import net.sf.gridarta.MainControl; import net.sf.gridarta.gameobject.Archetype; import net.sf.gridarta.gameobject.GameObject; -import net.sf.gridarta.gui.ReplaceDialog; import net.sf.gridarta.gui.map.MapViewBasic; import net.sf.gridarta.map.MapArchObject; import net.sf.gridarta.map.MapControl; Modified: trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java 2008-02-04 16:17:15 UTC (rev 3505) +++ trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java 2008-02-04 16:19:23 UTC (rev 3506) @@ -28,7 +28,6 @@ import java.util.List; import javax.swing.JOptionPane; import javax.swing.JTabbedPane; -import javax.swing.event.ChangeListener; import net.sf.gridarta.MainControl; import net.sf.gridarta.gameobject.Archetype; import net.sf.gridarta.gameobject.GameObject; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-02-04 16:35:32
|
Revision: 3509 http://gridarta.svn.sourceforge.net/gridarta/?rev=3509&view=rev Author: akirschbaum Date: 2008-02-04 08:35:30 -0800 (Mon, 04 Feb 2008) Log Message: ----------- Fix @NotNull annotations. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gui/InsertionObjectChooser.java trunk/daimonin/src/daieditor/gui/InsertionObjectChooser.java trunk/src/app/net/sf/gridarta/DefaultMapManager.java trunk/src/app/net/sf/gridarta/map/AutoValidator.java Modified: trunk/crossfire/src/cfeditor/gui/InsertionObjectChooser.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/InsertionObjectChooser.java 2008-02-04 16:26:28 UTC (rev 3508) +++ trunk/crossfire/src/cfeditor/gui/InsertionObjectChooser.java 2008-02-04 16:35:30 UTC (rev 3509) @@ -94,7 +94,7 @@ } /** {@inheritDoc} */ - public void displayObjectNamesChanged(@NotNull final boolean displayObjectNamesChanged) { + public void displayObjectNamesChanged(final boolean displayObjectNamesChanged) { // ignore } }); @@ -158,7 +158,7 @@ } /** {@inheritDoc} */ - public ArchetypeChooserControl<GameObject, MapArchObject, Archetype, MapControl, CMapViewBasic> getArchetypeChooserControl() { + @NotNull public ArchetypeChooserControl<GameObject, MapArchObject, Archetype, MapControl, CMapViewBasic> getArchetypeChooserControl() { return archetypeChooserControl; } Modified: trunk/daimonin/src/daieditor/gui/InsertionObjectChooser.java =================================================================== --- trunk/daimonin/src/daieditor/gui/InsertionObjectChooser.java 2008-02-04 16:26:28 UTC (rev 3508) +++ trunk/daimonin/src/daieditor/gui/InsertionObjectChooser.java 2008-02-04 16:35:30 UTC (rev 3509) @@ -86,7 +86,7 @@ } /** {@inheritDoc} */ - public void displayObjectNamesChanged(@NotNull final boolean displayObjectNamesChanged) { + public void displayObjectNamesChanged(final boolean displayObjectNamesChanged) { // ignore } }); @@ -145,7 +145,7 @@ } /** {@inheritDoc} */ - public ArchetypeChooserControl<GameObject, MapArchObject, Archetype, MapControl, CMapViewBasic> getArchetypeChooserControl() { + @NotNull public ArchetypeChooserControl<GameObject, MapArchObject, Archetype, MapControl, CMapViewBasic> getArchetypeChooserControl() { return archetypeChooserControl; } Modified: trunk/src/app/net/sf/gridarta/DefaultMapManager.java =================================================================== --- trunk/src/app/net/sf/gridarta/DefaultMapManager.java 2008-02-04 16:26:28 UTC (rev 3508) +++ trunk/src/app/net/sf/gridarta/DefaultMapManager.java 2008-02-04 16:35:30 UTC (rev 3509) @@ -101,7 +101,7 @@ } /** {@inheritDoc} */ - public void closeView(final MapView<G, A, R, C, V> mapView) { + public void closeView(@NotNull final MapView<G, A, R, C, V> mapView) { final C mapControl = mapView.getMapControl(); if (mapControl.nViews() <= 1) { closeLevel(mapControl); @@ -339,7 +339,7 @@ } /** {@inheritDoc} */ - public List<C> getOpenedMaps() { + @NotNull public List<C> getOpenedMaps() { return Collections.unmodifiableList(levels); } Modified: trunk/src/app/net/sf/gridarta/map/AutoValidator.java =================================================================== --- trunk/src/app/net/sf/gridarta/map/AutoValidator.java 2008-02-04 16:26:28 UTC (rev 3508) +++ trunk/src/app/net/sf/gridarta/map/AutoValidator.java 2008-02-04 16:35:30 UTC (rev 3509) @@ -82,7 +82,7 @@ } /** {@inheritDoc} */ - public void mapCreated(final C mapControl) { + public void mapCreated(@NotNull final C mapControl) { final MapModel<G, A, R> mapModel = mapControl.getMapModel(); mapModel.addMapModelListener(mapModelListener); mapModels.put(mapModel.getMapArchObject(), mapModel); @@ -90,12 +90,12 @@ } /** {@inheritDoc} */ - public void mapViewCreated(final MapView<G, A, R, C, V> mapView) { + public void mapViewCreated(@NotNull final MapView<G, A, R, C, V> mapView) { // ignore } /** {@inheritDoc} */ - public void mapClosing(final C mapControl) { + public void mapClosing(@NotNull final C mapControl) { final MapModel<G, A, R> mapModel = mapControl.getMapModel(); autoValidatorProcessor.removeChangedMapModel(mapModel); mapModels.remove(mapModel.getMapArchObject()); @@ -103,7 +103,7 @@ } /** {@inheritDoc} */ - public void mapViewClosing(final MapView<G, A, R, C, V> mapView) { + public void mapViewClosing(@NotNull final MapView<G, A, R, C, V> mapView) { // ignore } @@ -130,7 +130,7 @@ } /** {@inheritDoc} */ - public void mapMetaChanged(final A mapArchObject) { + public void mapMetaChanged(@NotNull final A mapArchObject) { final MapModel<G, A, R> mapModel = mapModels.get(mapArchObject); assert mapModel != null; autoValidatorProcessor.addChangedMapModel(mapModel); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-02-04 17:02:04
|
Revision: 3515 http://gridarta.svn.sourceforge.net/gridarta/?rev=3515&view=rev Author: akirschbaum Date: 2008-02-04 09:02:01 -0800 (Mon, 04 Feb 2008) Log Message: ----------- Fix Javadoc issues. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainView.java trunk/crossfire/src/cfeditor/filter/Filter.java trunk/crossfire/src/cfeditor/filter/FilterConfig.java trunk/crossfire/src/cfeditor/gui/map/MapRenderer.java trunk/crossfire/src/cfeditor/gui/map/PickmapRenderer.java trunk/daimonin/src/daieditor/CMainView.java trunk/daimonin/src/daieditor/gui/map/MapRenderer.java trunk/daimonin/src/daieditor/gui/map/PickmapRenderer.java trunk/src/app/net/sf/gridarta/gui/archetypechooser/ArchetypeChooserControl.java trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserView.java trunk/src/app/net/sf/gridarta/io/GameObjectParser.java trunk/src/app/net/sf/gridarta/io/MapArchObjectParser.java trunk/src/app/net/sf/gridarta/map/AbstractMapControl.java trunk/src/app/net/sf/gridarta/map/AbstractMapModel.java Modified: trunk/crossfire/src/cfeditor/CMainView.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainView.java 2008-02-04 16:53:41 UTC (rev 3514) +++ trunk/crossfire/src/cfeditor/CMainView.java 2008-02-04 17:02:01 UTC (rev 3515) @@ -376,7 +376,7 @@ /** * Notifies that the level views focus is lost it is inserted * as the second in line to the level view vector. - * @param view the level view who lost the focus + * @param mapView the level view who lost the focus */ private void levelViewFocusLostNotify(final MapView<GameObject, MapArchObject, Archetype, MapControl, CMapViewBasic> mapView) { assert mapViews.contains(mapView); @@ -392,7 +392,7 @@ /** * Notifies that the given level view is now set as the current one. - * @param view the new current level view + * @param mapView the new current level view */ private void levelViewFocusGainedNotify(final MapView<GameObject, MapArchObject, Archetype, MapControl, CMapViewBasic> mapView) { assert mapViews.contains(mapView); Modified: trunk/crossfire/src/cfeditor/filter/Filter.java =================================================================== --- trunk/crossfire/src/cfeditor/filter/Filter.java 2008-02-04 16:53:41 UTC (rev 3514) +++ trunk/crossfire/src/cfeditor/filter/Filter.java 2008-02-04 17:02:01 UTC (rev 3515) @@ -69,9 +69,10 @@ /** * Tells if all the game objects on a square are to be analyzed before a * match result. If all game objects must be analyzed to decide the result - * of a match, the return value of {@link #match(FilterConfig)} is ignored - * and the returning value of {@link #reset(FilterConfig)} is used as - * replacement. This should mainly used by complex analyse filters. + * of a match, the return value of {@link #match(FilterConfig,GameObject)} + * is ignored and the returning value of {@link #reset(FilterConfig)} is + * used as replacement. This should mainly used by complex analyse + * filters. * * @param config The filter configuration to use. * Modified: trunk/crossfire/src/cfeditor/filter/FilterConfig.java =================================================================== --- trunk/crossfire/src/cfeditor/filter/FilterConfig.java 2008-02-04 16:53:41 UTC (rev 3514) +++ trunk/crossfire/src/cfeditor/filter/FilterConfig.java 2008-02-04 17:02:01 UTC (rev 3515) @@ -42,14 +42,14 @@ /** * Add a {@link ConfigListener} to be notified about changes. * - * @param The config listener to add. + * @param listener The config listener to add. */ void addConfigChangeListener(ConfigListener listener); /** * Remove a {@link ConfigListener} to be notified about changes. * - * @param The config listener to remove. + * @param listener The config listener to remove. */ void removeConfigChangeListener(ConfigListener listener); Modified: trunk/crossfire/src/cfeditor/gui/map/MapRenderer.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/map/MapRenderer.java 2008-02-04 16:53:41 UTC (rev 3514) +++ trunk/crossfire/src/cfeditor/gui/map/MapRenderer.java 2008-02-04 17:02:01 UTC (rev 3515) @@ -37,7 +37,7 @@ import org.jetbrains.annotations.Nullable; /** - * A {@link LevelRenderer} to render map files. + * A {@link DefaultLevelRenderer} to render map files. * * @author Andreas Kirschbaum */ Modified: trunk/crossfire/src/cfeditor/gui/map/PickmapRenderer.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/map/PickmapRenderer.java 2008-02-04 16:53:41 UTC (rev 3514) +++ trunk/crossfire/src/cfeditor/gui/map/PickmapRenderer.java 2008-02-04 17:02:01 UTC (rev 3515) @@ -33,7 +33,7 @@ import net.sf.gridarta.gui.map.MapGrid; /** - * A {@link LevelRenderer} to render map files. + * A {@link DefaultLevelRenderer} to render map files. * * @author Andreas Kirschbaum */ Modified: trunk/daimonin/src/daieditor/CMainView.java =================================================================== --- trunk/daimonin/src/daieditor/CMainView.java 2008-02-04 16:53:41 UTC (rev 3514) +++ trunk/daimonin/src/daieditor/CMainView.java 2008-02-04 17:02:01 UTC (rev 3515) @@ -384,7 +384,7 @@ /** * Notifies that the level views focus is lost it is inserted * as the second in line to the level view vector. - * @param view the level view who lost the focus + * @param mapView the level view who lost the focus */ private void levelViewFocusLostNotify(final MapView<GameObject, MapArchObject, Archetype, MapControl, CMapViewBasic> mapView) { assert mapViews.contains(mapView); @@ -400,7 +400,7 @@ /** * Notifies that the given level view is now set as the current one. - * @param view the new current level view + * @param mapView the new current level view */ private void levelViewFocusGainedNotify(final MapView<GameObject, MapArchObject, Archetype, MapControl, CMapViewBasic> mapView) { assert mapViews.contains(mapView); Modified: trunk/daimonin/src/daieditor/gui/map/MapRenderer.java =================================================================== --- trunk/daimonin/src/daieditor/gui/map/MapRenderer.java 2008-02-04 16:53:41 UTC (rev 3514) +++ trunk/daimonin/src/daieditor/gui/map/MapRenderer.java 2008-02-04 17:02:01 UTC (rev 3515) @@ -32,7 +32,7 @@ import org.jetbrains.annotations.NotNull; /** - * A {@link LevelRenderer} to render map files. + * A {@link DefaultLevelRenderer} to render map files. * * @author Andreas Kirschbaum */ Modified: trunk/daimonin/src/daieditor/gui/map/PickmapRenderer.java =================================================================== --- trunk/daimonin/src/daieditor/gui/map/PickmapRenderer.java 2008-02-04 16:53:41 UTC (rev 3514) +++ trunk/daimonin/src/daieditor/gui/map/PickmapRenderer.java 2008-02-04 17:02:01 UTC (rev 3515) @@ -29,7 +29,7 @@ import org.jetbrains.annotations.NotNull; /** - * A {@link LevelRenderer} to render map files. + * A {@link DefaultLevelRenderer} to render map files. * * @author Andreas Kirschbaum */ Modified: trunk/src/app/net/sf/gridarta/gui/archetypechooser/ArchetypeChooserControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/archetypechooser/ArchetypeChooserControl.java 2008-02-04 16:53:41 UTC (rev 3514) +++ trunk/src/app/net/sf/gridarta/gui/archetypechooser/ArchetypeChooserControl.java 2008-02-04 17:02:01 UTC (rev 3515) @@ -256,7 +256,6 @@ /** * Fire a MapSquaresChangedEvent. - * @param squares Squares to fire event for */ private void fireDisplayObjectNamesChangedEvent() { for (final ArchetypeChooserListener listener : listenerList.getListeners(ArchetypeChooserListener.class)) { Modified: trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserView.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserView.java 2008-02-04 16:53:41 UTC (rev 3514) +++ trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserView.java 2008-02-04 17:02:01 UTC (rev 3515) @@ -70,7 +70,7 @@ * * @param index The tab index. * - * @param name The new title. + * @param title The new title. */ public void setTitle(final int index, final String title) { pickmapPanel.setTitleAt(index, title); Modified: trunk/src/app/net/sf/gridarta/io/GameObjectParser.java =================================================================== --- trunk/src/app/net/sf/gridarta/io/GameObjectParser.java 2008-02-04 16:53:41 UTC (rev 3514) +++ trunk/src/app/net/sf/gridarta/io/GameObjectParser.java 2008-02-04 17:02:01 UTC (rev 3515) @@ -75,7 +75,7 @@ /** * Write a map arch object to a stream. * - * @param writer The stream to write to. + * @param appendable The stream to write to. * * @param gameObject The game object to write. * Modified: trunk/src/app/net/sf/gridarta/io/MapArchObjectParser.java =================================================================== --- trunk/src/app/net/sf/gridarta/io/MapArchObjectParser.java 2008-02-04 16:53:41 UTC (rev 3514) +++ trunk/src/app/net/sf/gridarta/io/MapArchObjectParser.java 2008-02-04 17:02:01 UTC (rev 3515) @@ -46,7 +46,7 @@ /** * Write a map arch object to a stream. * - * @param writer The stream to write to. + * @param appendable The stream to write to. * * @param mapArchObject The map arch object to write. * Modified: trunk/src/app/net/sf/gridarta/map/AbstractMapControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/map/AbstractMapControl.java 2008-02-04 16:53:41 UTC (rev 3514) +++ trunk/src/app/net/sf/gridarta/map/AbstractMapControl.java 2008-02-04 17:02:01 UTC (rev 3515) @@ -373,7 +373,7 @@ /** * Set a view as main view. - * @param view the new main view + * @param mapView the new main view */ public void setFocus(final MapView<G, A, R, ?, ?> mapView) { assert mapViews.contains(mapView); Modified: trunk/src/app/net/sf/gridarta/map/AbstractMapModel.java =================================================================== --- trunk/src/app/net/sf/gridarta/map/AbstractMapModel.java 2008-02-04 16:53:41 UTC (rev 3514) +++ trunk/src/app/net/sf/gridarta/map/AbstractMapModel.java 2008-02-04 17:02:01 UTC (rev 3515) @@ -64,7 +64,7 @@ /** * The CMainControl used for various operations. - * @deprecated it's not a good idea to require the MapModel implementation to know such a heavy-weight strongly UI-related glue class like {@link CMainControl}. + * @deprecated it's not a good idea to require the MapModel implementation to know such a heavy-weight strongly UI-related glue class like {@link MainControl}. */ @Deprecated protected final transient MainControl<G, A, R, ?, ?> mainControl; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-02-04 17:06:07
|
Revision: 3516 http://gridarta.svn.sourceforge.net/gridarta/?rev=3516&view=rev Author: akirschbaum Date: 2008-02-04 09:06:10 -0800 (Mon, 04 Feb 2008) Log Message: ----------- Add final modifiers. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java trunk/daimonin/src/daieditor/gui/GameObjectAttributesPanel.java trunk/src/app/net/sf/gridarta/AutojoinList.java trunk/src/app/net/sf/gridarta/CFArchTypeList.java trunk/src/app/net/sf/gridarta/textedit/textarea/KeywordMap.java trunk/src/app/net/sf/gridarta/textedit/textarea/TextAreaDefaults.java trunk/src/app/net/sf/gridarta/textedit/textarea/TokenMarker.java Modified: trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java 2008-02-04 17:02:01 UTC (rev 3515) +++ trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java 2008-02-04 17:06:10 UTC (rev 3516) @@ -91,7 +91,7 @@ private final JPanel archPanel; /** Panel with message text. */ - private JPanel textPanel; + private final JPanel textPanel; /** The {@link ErrorListView} holding the error information. */ private final ErrorListView errorListView; Modified: trunk/daimonin/src/daieditor/gui/GameObjectAttributesPanel.java =================================================================== --- trunk/daimonin/src/daieditor/gui/GameObjectAttributesPanel.java 2008-02-04 17:02:01 UTC (rev 3515) +++ trunk/daimonin/src/daieditor/gui/GameObjectAttributesPanel.java 2008-02-04 17:06:10 UTC (rev 3516) @@ -104,7 +104,7 @@ private final JPanel archPanel; /** Panel with message text. */ - private JPanel textPanel; + private final JPanel textPanel; /** The {@link ErrorListView} holding the error information. */ private final ErrorListView errorListView; Modified: trunk/src/app/net/sf/gridarta/AutojoinList.java =================================================================== --- trunk/src/app/net/sf/gridarta/AutojoinList.java 2008-02-04 17:02:01 UTC (rev 3515) +++ trunk/src/app/net/sf/gridarta/AutojoinList.java 2008-02-04 17:06:10 UTC (rev 3516) @@ -50,7 +50,7 @@ private static final int WEST = 8; - private ArchetypeSet<G, A, R> archetypeSet; // reference to the stack of default arches + private final ArchetypeSet<G, A, R> archetypeSet; // reference to the stack of default arches // the arches' node numbers, interpreted in following order (0-15): //index: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 Modified: trunk/src/app/net/sf/gridarta/CFArchTypeList.java =================================================================== --- trunk/src/app/net/sf/gridarta/CFArchTypeList.java 2008-02-04 17:02:01 UTC (rev 3515) +++ trunk/src/app/net/sf/gridarta/CFArchTypeList.java 2008-02-04 17:06:10 UTC (rev 3516) @@ -52,10 +52,10 @@ private static final Logger log = Logger.getLogger(CFArchTypeList.class); /** DocumentBuilder. */ - private DocumentBuilder documentBuilder; + private final DocumentBuilder documentBuilder; /** The XPath for using XPath. */ - private XPath xpath; + private final XPath xpath; /** The default type. */ private final CFArchType defaultArchType; Modified: trunk/src/app/net/sf/gridarta/textedit/textarea/KeywordMap.java =================================================================== --- trunk/src/app/net/sf/gridarta/textedit/textarea/KeywordMap.java 2008-02-04 17:02:01 UTC (rev 3515) +++ trunk/src/app/net/sf/gridarta/textedit/textarea/KeywordMap.java 2008-02-04 17:06:10 UTC (rev 3516) @@ -27,7 +27,7 @@ private final Keyword[] map; - private boolean ignoringCase; + private final boolean ignoringCase; /** * Creates a new <code>KeywordMap</code>. Modified: trunk/src/app/net/sf/gridarta/textedit/textarea/TextAreaDefaults.java =================================================================== --- trunk/src/app/net/sf/gridarta/textedit/textarea/TextAreaDefaults.java 2008-02-04 17:02:01 UTC (rev 3515) +++ trunk/src/app/net/sf/gridarta/textedit/textarea/TextAreaDefaults.java 2008-02-04 17:06:10 UTC (rev 3516) @@ -20,7 +20,7 @@ */ public final class TextAreaDefaults { - private static TextAreaDefaults DEFAULTS = new TextAreaDefaults(); + private static final TextAreaDefaults DEFAULTS = new TextAreaDefaults(); private final InputHandler inputHandler = new DefaultInputHandler(); Modified: trunk/src/app/net/sf/gridarta/textedit/textarea/TokenMarker.java =================================================================== --- trunk/src/app/net/sf/gridarta/textedit/textarea/TokenMarker.java 2008-02-04 17:02:01 UTC (rev 3515) +++ trunk/src/app/net/sf/gridarta/textedit/textarea/TokenMarker.java 2008-02-04 17:06:10 UTC (rev 3516) @@ -31,7 +31,7 @@ /** * The collected tokens. */ - private List<Token> tokens = new LinkedList<Token>(); + private final List<Token> tokens = new LinkedList<Token>(); /** * A wrapper for the lower-level <code>markTokensImpl</code> method that is This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-02-04 17:13:13
|
Revision: 3519 http://gridarta.svn.sourceforge.net/gridarta/?rev=3519&view=rev Author: akirschbaum Date: 2008-02-04 09:13:17 -0800 (Mon, 04 Feb 2008) Log Message: ----------- Add final modifiers. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CFilterControl.java trunk/crossfire/src/cfeditor/gui/GameObjectAttributesDialog.java trunk/daimonin/src/daieditor/gui/GameObjectAttributesDialog.java trunk/src/app/net/sf/gridarta/gui/ArchetypesActions.java trunk/src/app/net/sf/gridarta/gui/archetypechooser/ArchetypePanel.java trunk/src/app/net/sf/gridarta/gui/findarchetypes/FindArchetypesDialog.java trunk/src/app/net/sf/gridarta/gui/gameobjecttexteditor/GameObjectTextEditor.java trunk/src/app/net/sf/gridarta/io/AbstractGameObjectParser.java Modified: trunk/crossfire/src/cfeditor/CFilterControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CFilterControl.java 2008-02-04 17:10:34 UTC (rev 3518) +++ trunk/crossfire/src/cfeditor/CFilterControl.java 2008-02-04 17:13:17 UTC (rev 3519) @@ -75,7 +75,7 @@ * @param mapControl MapControl to create FilterControl for. * @param mainControl The main control. */ - public CFilterControl(@Nullable final MapControl mapControl, @NotNull final CMainControl mainControl, NamedFilterList filterList) { + public CFilterControl(@Nullable final MapControl mapControl, @NotNull final CMainControl mainControl, final NamedFilterList filterList) { this.filterList = filterList; this.mainControl = mainControl; filterOutConfig = (NamedFilterConfig) filterList.createConfig(); Modified: trunk/crossfire/src/cfeditor/gui/GameObjectAttributesDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/GameObjectAttributesDialog.java 2008-02-04 17:10:34 UTC (rev 3518) +++ trunk/crossfire/src/cfeditor/gui/GameObjectAttributesDialog.java 2008-02-04 17:13:17 UTC (rev 3519) @@ -131,7 +131,7 @@ @Override protected JComboBox buildInvSpellBox(final CFArchAttrib attr) { final boolean isOptionalSpell = attr.getDataType() == ArchAttribType.INV_SPELL_OPTIONAL; final Vector<String> content = new Vector<String>(); - int selectedIndex; + final int selectedIndex; final String title; switch (gameObject.countInvObjects()) { case 0: Modified: trunk/daimonin/src/daieditor/gui/GameObjectAttributesDialog.java =================================================================== --- trunk/daimonin/src/daieditor/gui/GameObjectAttributesDialog.java 2008-02-04 17:10:34 UTC (rev 3518) +++ trunk/daimonin/src/daieditor/gui/GameObjectAttributesDialog.java 2008-02-04 17:13:17 UTC (rev 3519) @@ -131,7 +131,7 @@ @Override protected JComboBox buildInvSpellBox(final CFArchAttrib attr) { final boolean isOptionalSpell = attr.getDataType() == ArchAttribType.INV_SPELL_OPTIONAL; final Vector<String> content = new Vector<String>(); - int selectedIndex; + final int selectedIndex; final String title; switch (gameObject.countInvObjects()) { case 0: Modified: trunk/src/app/net/sf/gridarta/gui/ArchetypesActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/ArchetypesActions.java 2008-02-04 17:10:34 UTC (rev 3518) +++ trunk/src/app/net/sf/gridarta/gui/ArchetypesActions.java 2008-02-04 17:13:17 UTC (rev 3519) @@ -66,7 +66,7 @@ } /** {@inheritDoc} */ - public void displayObjectNamesChanged(boolean displayObjectNames) { + public void displayObjectNamesChanged(final boolean displayObjectNames) { updateActions(displayObjectNames); } Modified: trunk/src/app/net/sf/gridarta/gui/archetypechooser/ArchetypePanel.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/archetypechooser/ArchetypePanel.java 2008-02-04 17:10:34 UTC (rev 3518) +++ trunk/src/app/net/sf/gridarta/gui/archetypechooser/ArchetypePanel.java 2008-02-04 17:13:17 UTC (rev 3519) @@ -130,7 +130,7 @@ } /** {@inheritDoc} */ - public void displayObjectNamesChanged(boolean displayObjectNames) { + public void displayObjectNamesChanged(final boolean displayObjectNames) { updateCellRenderer(displayObjectNames); } Modified: trunk/src/app/net/sf/gridarta/gui/findarchetypes/FindArchetypesDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/findarchetypes/FindArchetypesDialog.java 2008-02-04 17:10:34 UTC (rev 3518) +++ trunk/src/app/net/sf/gridarta/gui/findarchetypes/FindArchetypesDialog.java 2008-02-04 17:13:17 UTC (rev 3519) @@ -130,12 +130,12 @@ } /** {@inheritDoc} */ - public void insertUpdate(DocumentEvent e) { + public void insertUpdate(final DocumentEvent e) { doSearch(false); } /** {@inheritDoc} */ - public void removeUpdate(DocumentEvent e) { + public void removeUpdate(final DocumentEvent e) { doSearch(false); } Modified: trunk/src/app/net/sf/gridarta/gui/gameobjecttexteditor/GameObjectTextEditor.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjecttexteditor/GameObjectTextEditor.java 2008-02-04 17:10:34 UTC (rev 3518) +++ trunk/src/app/net/sf/gridarta/gui/gameobjecttexteditor/GameObjectTextEditor.java 2008-02-04 17:13:17 UTC (rev 3519) @@ -92,7 +92,7 @@ archEdit.setCaretPosition(0); } - public void applyDirectionChanges(@NotNull GameObject<?, ?, ?> gameObject, final int dir, final int archDir) { + public void applyDirectionChanges(@NotNull final GameObject<?, ?, ?> gameObject, final int dir, final int archDir) { final StringBuilder newText = new StringBuilder(); final String text = archEdit.getText(); final int len = text.length(); Modified: trunk/src/app/net/sf/gridarta/io/AbstractGameObjectParser.java =================================================================== --- trunk/src/app/net/sf/gridarta/io/AbstractGameObjectParser.java 2008-02-04 17:10:34 UTC (rev 3518) +++ trunk/src/app/net/sf/gridarta/io/AbstractGameObjectParser.java 2008-02-04 17:13:17 UTC (rev 3519) @@ -59,7 +59,7 @@ * @param gridartaObjectsFactory The gridarta objects factory for creating * new game object instances. */ - protected AbstractGameObjectParser(@NotNull GridartaObjectsFactory<G, A, R, ?, ?> gridartaObjectsFactory) { + protected AbstractGameObjectParser(@NotNull final GridartaObjectsFactory<G, A, R, ?, ?> gridartaObjectsFactory) { this.gridartaObjectsFactory = gridartaObjectsFactory; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-02-04 17:36:08
|
Revision: 3523 http://gridarta.svn.sourceforge.net/gridarta/?rev=3523&view=rev Author: akirschbaum Date: 2008-02-04 09:28:36 -0800 (Mon, 04 Feb 2008) Log Message: ----------- Move code between classes. Modified Paths: -------------- trunk/crossfire/crossfire.iml trunk/crossfire/src/cfeditor/CFilterControl.java trunk/crossfire/src/cfeditor/filter/NamedFilterList.java trunk/daimonin/daimonin.iml trunk/gridarta.iml trunk/gridarta.ipr trunk/textedit.iml Modified: trunk/crossfire/crossfire.iml =================================================================== --- trunk/crossfire/crossfire.iml 2008-02-04 17:22:18 UTC (rev 3522) +++ trunk/crossfire/crossfire.iml 2008-02-04 17:28:36 UTC (rev 3523) @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<module relativePaths="true" type="JAVA_MODULE" version="4"> +<module version="4" relativePaths="true" type="JAVA_MODULE"> + <component name="ModuleRootManager" /> <component name="NewModuleRootManager" inherit-compiler-output="false"> <output url="file://$MODULE_DIR$/classes" /> <exclude-output /> @@ -21,10 +22,23 @@ <SOURCES /> </library> </orderEntry> + <orderEntry type="library" name="log4j-1.2.13" level="project" /> + <orderEntry type="library" name="junit-4.2" level="project" /> + <orderEntry type="library" name="annotations" level="project" /> + <orderEntry type="library" name="japi-lib-lang-0.1" level="project" /> + <orderEntry type="library" name="japi-lib-xml-0.1" level="project" /> + <orderEntry type="library" name="japi-lib-swing-action-0.1" level="project" /> + <orderEntry type="library" name="japi-lib-util-0.1" level="project" /> + <orderEntry type="library" name="japi-lib-swing-misc-0.1" level="project" /> + <orderEntry type="library" name="japi-lib-swing-prefs-0.1" level="project" /> + <orderEntry type="library" name="japi-lib-swing-extlib-0.1" level="project" /> + <orderEntry type="library" name="japi-lib-swing-about-0.1" level="project" /> + <orderEntry type="module" module-name="textedit" /> + <orderEntry type="library" name="japi-lib-swing-tod-0.1" level="project" /> <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/bsh-classgen.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/bsh-commands-2.0b4.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -33,7 +47,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/bsh-commands.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/bsh-classgen-2.0b4.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -42,7 +56,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/bsh-util.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/bsh-core-2.0b4.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -51,25 +65,12 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/bsh-core.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/bsh-util-2.0b4.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> </library> </orderEntry> - <orderEntry type="library" name="log4j-1.2.13" level="project" /> - <orderEntry type="library" name="junit-4.2" level="project" /> - <orderEntry type="library" name="annotations" level="project" /> - <orderEntry type="library" name="japi-lib-lang-0.1" level="project" /> - <orderEntry type="library" name="japi-lib-xml-0.1" level="project" /> - <orderEntry type="library" name="japi-lib-swing-action-0.1" level="project" /> - <orderEntry type="library" name="japi-lib-util-0.1" level="project" /> - <orderEntry type="library" name="japi-lib-swing-misc-0.1" level="project" /> - <orderEntry type="library" name="japi-lib-swing-prefs-0.1" level="project" /> - <orderEntry type="library" name="japi-lib-swing-extlib-0.1" level="project" /> - <orderEntry type="library" name="japi-lib-swing-about-0.1" level="project" /> - <orderEntry type="module" module-name="textedit" /> - <orderEntry type="library" name="japi-lib-swing-tod-0.1" level="project" /> <orderEntryProperties /> </component> <component name="copyright"> Modified: trunk/crossfire/src/cfeditor/CFilterControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CFilterControl.java 2008-02-04 17:22:18 UTC (rev 3522) +++ trunk/crossfire/src/cfeditor/CFilterControl.java 2008-02-04 17:28:36 UTC (rev 3523) @@ -132,13 +132,7 @@ if (!filterOutConfig.isEnabled()) { return true; } - filterList.reset(filterOutConfig); - if (filterList.hasGlobalMatch(filterOutConfig)) { - filterList.match(filterOutConfig, gameObject); - return !filterList.reset(filterOutConfig); - } - - return !filterList.match(filterOutConfig, gameObject); + return filterList.canShow(gameObject, filterOutConfig); } public void nameFilterChanged(final NamedFilterEvent event) { Modified: trunk/crossfire/src/cfeditor/filter/NamedFilterList.java =================================================================== --- trunk/crossfire/src/cfeditor/filter/NamedFilterList.java 2008-02-04 17:22:18 UTC (rev 3522) +++ trunk/crossfire/src/cfeditor/filter/NamedFilterList.java 2008-02-04 17:28:36 UTC (rev 3523) @@ -238,6 +238,16 @@ return result; } + public boolean canShow(final GameObject<?, ?, ?> gameObject, final NamedFilterConfig filterOutConfig) { + reset(filterOutConfig); + if (hasGlobalMatch(filterOutConfig)) { + match(filterOutConfig, gameObject); + return !reset(filterOutConfig); + } + + return !match(filterOutConfig, gameObject); + } + private class FilterMenuEntry extends JMenu implements NamedFilterListener { /** The serial version UID. */ Modified: trunk/daimonin/daimonin.iml =================================================================== --- trunk/daimonin/daimonin.iml 2008-02-04 17:22:18 UTC (rev 3522) +++ trunk/daimonin/daimonin.iml 2008-02-04 17:28:36 UTC (rev 3523) @@ -1,11 +1,12 @@ <?xml version="1.0" encoding="UTF-8"?> -<module relativePaths="true" type="JAVA_MODULE" version="4"> +<module version="4" relativePaths="true" type="JAVA_MODULE"> <component name="BuildJarSettings"> <containerInfo /> <setting name="jarUrl" value="file://$MODULE_DIR$/daimonin.jar" /> <setting name="buildJar" value="true" /> <setting name="mainClass" value="" /> </component> + <component name="ModuleRootManager" /> <component name="NewModuleRootManager" inherit-compiler-output="false"> <output url="file://$MODULE_DIR$/classes" /> <exclude-output /> Modified: trunk/gridarta.iml =================================================================== --- trunk/gridarta.iml 2008-02-04 17:22:18 UTC (rev 3522) +++ trunk/gridarta.iml 2008-02-04 17:28:36 UTC (rev 3523) @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<module relativePaths="true" type="JAVA_MODULE" version="4"> +<module version="4" relativePaths="true" type="JAVA_MODULE"> + <component name="ModuleRootManager" /> <component name="NewModuleRootManager" inherit-compiler-output="false"> <output url="file://$MODULE_DIR$/classes" /> <exclude-output /> Modified: trunk/gridarta.ipr =================================================================== --- trunk/gridarta.ipr 2008-02-04 17:22:18 UTC (rev 3522) +++ trunk/gridarta.ipr 2008-02-04 17:28:36 UTC (rev 3523) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<project relativePaths="false" version="4"> +<project version="4" relativePaths="false"> <component name="AntConfiguration"> <defaultAnt bundledAnt="true" /> </component> @@ -50,15 +50,6 @@ <option name="CLASS_ANNOTATION_WRAP" value="1" /> <option name="FIELD_ANNOTATION_WRAP" value="1" /> <option name="ENUM_CONSTANTS_WRAP" value="2" /> - <ADDITIONAL_INDENT_OPTIONS fileType="js"> - <option name="INDENT_SIZE" value="4" /> - <option name="CONTINUATION_INDENT_SIZE" value="8" /> - <option name="TAB_SIZE" value="4" /> - <option name="USE_TAB_CHARACTER" value="false" /> - <option name="SMART_TABS" value="false" /> - <option name="LABEL_INDENT_SIZE" value="0" /> - <option name="LABEL_INDENT_ABSOLUTE" value="false" /> - </ADDITIONAL_INDENT_OPTIONS> </value> </option> <option name="USE_PER_PROJECT_SETTINGS" value="true" /> @@ -84,11 +75,11 @@ </wildcardResourcePatterns> </component> <component name="CppTools.Loader" warnedAboutFileOutOfSourceRoot="true" /> + <component name="DataSourceManagerImpl" /> <component name="DependenciesAnalyzeManager"> <option name="myForwardDirection" value="false" /> </component> <component name="DependencyValidationManager"> - <option name="SKIP_IMPORT_STATEMENTS" value="false" /> <scope name="Project without textedit" pattern="!src[gridarta]:net.sf.gridarta.textedit.scripteditor..*&&!src[gridarta]:net.sf.gridarta.textedit.textarea..*&&!src[textedit]:*..*" /> </component> <component name="EclipseCompilerSettings"> @@ -106,13 +97,14 @@ <option name="MAXIMUM_HEAP_SIZE" value="128" /> </component> <component name="EntryPointsManager"> - <entry_points version="2.0" /> + <entry_points /> </component> <component name="ExportToHTMLSettings"> <option name="PRINT_LINE_NUMBERS" value="false" /> <option name="OPEN_IN_BROWSER" value="false" /> <option name="OUTPUT_DIRECTORY" /> </component> + <component name="GUI Designer component loader factory" /> <component name="IdProvider" IDEtalkID="2C998304C446463F0F811673874877B6" /> <component name="InspectionProjectProfileManager"> <option name="PROJECT_PROFILE" value="No errors allowed here" /> @@ -122,6 +114,24 @@ <profile version="1.0" is_locked="false"> <option name="myName" value="Javadoc Issues" /> <option name="myLocal" value="false" /> + <used_levels> + <error> + <option name="myName" value="ERROR" /> + <option name="myVal" value="400" /> + </error> + <warning> + <option name="myName" value="WARNING" /> + <option name="myVal" value="300" /> + </warning> + <information> + <option name="myName" value="INFO" /> + <option name="myVal" value="200" /> + </information> + <server> + <option name="myName" value="SERVER PROBLEM" /> + <option name="myVal" value="100" /> + </server> + </used_levels> <inspection_tool class="CheckEmptyScriptTag" level="WARNING" enabled="false" /> <inspection_tool class="FunctionWithInconsistentReturnsJS" level="WARNING" enabled="false" /> <inspection_tool class="InfiniteLoopStatement" level="WARNING" enabled="false" /> @@ -160,7 +170,6 @@ <inspection_tool class="Glassfish" level="ERROR" enabled="false" /> <inspection_tool class="ConstantConditions" level="WARNING" enabled="false"> <option name="SUGGEST_NULLABLE_ANNOTATIONS" value="false" /> - <option name="DONT_REPORT_TRUE_ASSERT_STATEMENTS" value="false" /> </inspection_tool> <inspection_tool class="GwtServiceNotRegistered" level="ERROR" enabled="false" /> <inspection_tool class="EjbErrorInspection" level="ERROR" enabled="false" /> @@ -189,7 +198,6 @@ <option name="METHOD" value="true" /> <option name="CLASS" value="true" /> <option name="PARAMETER" value="true" /> - <option name="REPORT_PARAMETER_FOR_PUBLIC_METHODS" value="true" /> <option name="INJECTION_ANNOS"> <value> <list size="0" /> @@ -236,9 +244,7 @@ <inspection_tool class="RedundantCast" level="WARNING" enabled="false" /> <inspection_tool class="UnnecessaryReturn" level="WARNING" enabled="false" /> <inspection_tool class="FinalStaticMethod" level="WARNING" enabled="false" /> - <inspection_tool class="SuspiciousMethodCalls" level="WARNING" enabled="false"> - <option name="REPORT_CONVERTIBLE_METHOD_CALLS" value="true" /> - </inspection_tool> + <inspection_tool class="SuspiciousMethodCalls" level="WARNING" enabled="false" /> <inspection_tool class="UnnecessaryUnboxing" level="WARNING" enabled="false" /> <inspection_tool class="SameParameterValue" level="WARNING" enabled="false" /> <inspection_tool class="NoExplicitFinalizeCalls" level="WARNING" enabled="false" /> @@ -260,9 +266,6 @@ <option name="REPORT_NOT_ANNOTATED_METHOD_OVERRIDES_NOTNULL" value="true" /> <option name="REPORT_NOTNULL_PARAMETER_OVERRIDES_NULLABLE" value="true" /> <option name="REPORT_NOT_ANNOTATED_PARAMETER_OVERRIDES_NOTNULL" value="true" /> - <option name="REPORT_NOT_ANNOTATED_GETTER" value="true" /> - <option name="REPORT_NOT_ANNOTATED_SETTER_PARAMETER" value="true" /> - <option name="REPORT_ANNOTATION_NOT_PROPAGATED_TO_OVERRIDERS" value="true" /> </inspection_tool> <inspection_tool class="ReferencesToClassesFromDefaultPackagesInJSPFile" level="ERROR" enabled="false" /> <inspection_tool class="TrivialIf" level="WARNING" enabled="false" /> @@ -296,7 +299,6 @@ <inspection_tool class="EmptyCatchBlock" level="WARNING" enabled="false"> <option name="m_includeComments" value="true" /> <option name="m_ignoreTestCases" value="true" /> - <option name="m_ignoreIgnoreParameter" value="true" /> </inspection_tool> <inspection_tool class="Dependency" level="ERROR" enabled="false" /> <inspection_tool class="UnnecessaryLocalVariable" level="WARNING" enabled="false"> @@ -309,9 +311,7 @@ <option name="m_reportEmptyBlocks" value="false" /> </inspection_tool> <inspection_tool class="ThrowFromFinallyBlockJS" level="WARNING" enabled="false" /> - <inspection_tool class="ForCanBeForeach" level="WARNING" enabled="false"> - <option name="REPORT_INDEXED_LOOP" value="true" /> - </inspection_tool> + <inspection_tool class="ForCanBeForeach" level="WARNING" enabled="false" /> <inspection_tool class="TypeParameterExtendsObject" level="WARNING" enabled="false" /> <inspection_tool class="FieldCanBeLocal" level="WARNING" enabled="false" /> <inspection_tool class="UNCHECKED_WARNING" level="WARNING" enabled="false" /> @@ -338,7 +338,13 @@ <inspection_tool class="RedundantArrayCreation" level="WARNING" enabled="false" /> <inspection_tool class="UnnecessaryLabelOnContinueStatementJS" level="WARNING" enabled="false" /> <inspection_tool class="CheckImageSize" level="WARNING" enabled="false" /> - <inspection_tool class="EmptyMethod" level="WARNING" enabled="false" /> + <inspection_tool class="EmptyMethod" level="WARNING" enabled="false"> + <option name="EXCLUDE_ANNOS"> + <value> + <list size="0" /> + </value> + </option> + </inspection_tool> <inspection_tool class="EmptyTryBlock" level="WARNING" enabled="false" /> <inspection_tool class="MalformedFormatString" level="WARNING" enabled="false" /> <inspection_tool class="ComponentRegistrationProblems" level="ERROR" enabled="false"> @@ -378,17 +384,11 @@ <inspection_tool class="JBoss" level="ERROR" enabled="false" /> <inspection_tool class="UnusedDeclaration" level="WARNING" enabled="false"> <option name="ADD_MAINS_TO_ENTRIES" value="true" /> + <option name="ADD_JUNIT_TO_ENTRIES" value="true" /> + <option name="ADD_EJB_TO_ENTRIES" value="true" /> <option name="ADD_APPLET_TO_ENTRIES" value="true" /> <option name="ADD_SERVLET_TO_ENTRIES" value="true" /> <option name="ADD_NONJAVA_TO_ENTRIES" value="true" /> - <option name="ADDITIONAL_ANNOTATIONS"> - <value> - <list size="0" /> - </value> - </option> - <option name="ADD_EJB_TO_ENTRIES" value="true" /> - <option name="ADD_JUNIT_TO_ENTRIES" value="true" /> - <option name="ADD_TESTNG_TO_ENTRIES" value="true" /> </inspection_tool> <inspection_tool class="Deprecation" level="WARNING" enabled="false" /> <inspection_tool class="StrutsInspection" level="ERROR" enabled="false" /> @@ -426,6 +426,24 @@ <profile version="1.0" is_locked="true"> <option name="myName" value="No errors allowed here" /> <option name="myLocal" value="false" /> + <used_levels> + <error> + <option name="myName" value="ERROR" /> + <option name="myVal" value="400" /> + </error> + <warning> + <option name="myName" value="WARNING" /> + <option name="myVal" value="300" /> + </warning> + <information> + <option name="myName" value="INFO" /> + <option name="myVal" value="200" /> + </information> + <server> + <option name="myName" value="SERVER PROBLEM" /> + <option name="myVal" value="100" /> + </server> + </used_levels> <inspection_tool class="CheckEmptyScriptTag" level="WARNING" enabled="false" /> <inspection_tool class="FunctionWithInconsistentReturnsJS" level="WARNING" enabled="false" /> <inspection_tool class="InfiniteLoopStatement" level="WARNING" enabled="true" /> @@ -464,7 +482,6 @@ <inspection_tool class="Glassfish" level="ERROR" enabled="false" /> <inspection_tool class="ConstantConditions" level="WARNING" enabled="true"> <option name="SUGGEST_NULLABLE_ANNOTATIONS" value="true" /> - <option name="DONT_REPORT_TRUE_ASSERT_STATEMENTS" value="false" /> </inspection_tool> <inspection_tool class="GwtServiceNotRegistered" level="ERROR" enabled="false" /> <inspection_tool class="EjbErrorInspection" level="ERROR" enabled="false" /> @@ -493,7 +510,6 @@ <option name="METHOD" value="true" /> <option name="CLASS" value="true" /> <option name="PARAMETER" value="true" /> - <option name="REPORT_PARAMETER_FOR_PUBLIC_METHODS" value="true" /> <option name="INJECTION_ANNOS"> <value> <list size="0" /> @@ -538,9 +554,7 @@ <inspection_tool class="RedundantCast" level="WARNING" enabled="true" /> <inspection_tool class="UnnecessaryReturn" level="WARNING" enabled="true" /> <inspection_tool class="FinalStaticMethod" level="WARNING" enabled="true" /> - <inspection_tool class="SuspiciousMethodCalls" level="WARNING" enabled="true"> - <option name="REPORT_CONVERTIBLE_METHOD_CALLS" value="true" /> - </inspection_tool> + <inspection_tool class="SuspiciousMethodCalls" level="WARNING" enabled="true" /> <inspection_tool class="SameParameterValue" level="WARNING" enabled="false" /> <inspection_tool class="ReservedWordUsedAsNameJS" level="WARNING" enabled="false" /> <inspection_tool class="UnnecessaryReturnJS" level="WARNING" enabled="false" /> @@ -558,9 +572,6 @@ <option name="REPORT_NOT_ANNOTATED_METHOD_OVERRIDES_NOTNULL" value="true" /> <option name="REPORT_NOTNULL_PARAMETER_OVERRIDES_NULLABLE" value="true" /> <option name="REPORT_NOT_ANNOTATED_PARAMETER_OVERRIDES_NOTNULL" value="true" /> - <option name="REPORT_NOT_ANNOTATED_GETTER" value="true" /> - <option name="REPORT_NOT_ANNOTATED_SETTER_PARAMETER" value="true" /> - <option name="REPORT_ANNOTATION_NOT_PROPAGATED_TO_OVERRIDERS" value="true" /> </inspection_tool> <inspection_tool class="ReferencesToClassesFromDefaultPackagesInJSPFile" level="ERROR" enabled="false" /> <inspection_tool class="TrivialIf" level="WARNING" enabled="true" /> @@ -593,7 +604,6 @@ <inspection_tool class="EmptyCatchBlock" level="WARNING" enabled="false"> <option name="m_includeComments" value="true" /> <option name="m_ignoreTestCases" value="true" /> - <option name="m_ignoreIgnoreParameter" value="true" /> </inspection_tool> <inspection_tool class="UnnecessaryLocalVariable" level="WARNING" enabled="false"> <option name="m_ignoreImmediatelyReturnedVariables" value="false" /> @@ -626,7 +636,13 @@ <inspection_tool class="RedundantArrayCreation" level="WARNING" enabled="true" /> <inspection_tool class="UnnecessaryLabelOnContinueStatementJS" level="WARNING" enabled="false" /> <inspection_tool class="CheckImageSize" level="WARNING" enabled="false" /> - <inspection_tool class="EmptyMethod" level="WARNING" enabled="false" /> + <inspection_tool class="EmptyMethod" level="WARNING" enabled="false"> + <option name="EXCLUDE_ANNOS"> + <value> + <list size="0" /> + </value> + </option> + </inspection_tool> <inspection_tool class="EmptyTryBlock" level="WARNING" enabled="false" /> <inspection_tool class="MalformedFormatString" level="WARNING" enabled="true" /> <inspection_tool class="ComponentRegistrationProblems" level="ERROR" enabled="false"> @@ -662,17 +678,11 @@ <inspection_tool class="JBoss" level="ERROR" enabled="false" /> <inspection_tool class="UnusedDeclaration" level="WARNING" enabled="false"> <option name="ADD_MAINS_TO_ENTRIES" value="true" /> + <option name="ADD_JUNIT_TO_ENTRIES" value="true" /> + <option name="ADD_EJB_TO_ENTRIES" value="true" /> <option name="ADD_APPLET_TO_ENTRIES" value="true" /> <option name="ADD_SERVLET_TO_ENTRIES" value="true" /> <option name="ADD_NONJAVA_TO_ENTRIES" value="true" /> - <option name="ADDITIONAL_ANNOTATIONS"> - <value> - <list size="0" /> - </value> - </option> - <option name="ADD_EJB_TO_ENTRIES" value="true" /> - <option name="ADD_JUNIT_TO_ENTRIES" value="true" /> - <option name="ADD_TESTNG_TO_ENTRIES" value="true" /> </inspection_tool> <inspection_tool class="Deprecation" level="WARNING" enabled="false" /> <inspection_tool class="StrutsInspection" level="ERROR" enabled="false" /> @@ -706,9 +716,7 @@ <option name="IGNORE_JAVADOC_PERIOD" value="false" /> <option name="myAdditionalJavadocTags" value="todo,note,todo,xxx,note,todo,fixme,fixme,warning,invariant,retval,pre" /> </inspection_tool> - <inspection_tool class="MissingOverrideAnnotation" level="WARNING" enabled="true"> - <option name="useJdk6Rules" value="false" /> - </inspection_tool> + <inspection_tool class="MissingOverrideAnnotation" level="WARNING" enabled="true" /> <inspection_tool class="AbstractMethodWithMissingImplementations" level="WARNING" enabled="true" /> <inspection_tool class="EqualsAndHashcode" level="WARNING" enabled="true" /> <inspection_tool class="Dependency" level="ERROR" enabled="false" /> @@ -747,9 +755,7 @@ <inspection_tool class="TypeParameterExtendsFinalClass" level="WARNING" enabled="true" /> <inspection_tool class="AbstractMethodCallInConstructor" level="WARNING" enabled="true" /> <inspection_tool class="IndexOfReplaceableByContains" level="WARNING" enabled="true" /> - <inspection_tool class="ForCanBeForeach" level="WARNING" enabled="true"> - <option name="REPORT_INDEXED_LOOP" value="true" /> - </inspection_tool> + <inspection_tool class="ForCanBeForeach" level="WARNING" enabled="true" /> <inspection_tool class="UnnecessaryBoxing" level="WARNING" enabled="true" /> <inspection_tool class="UnnecessaryUnboxing" level="WARNING" enabled="true" /> <inspection_tool class="WhileCanBeForeach" level="WARNING" enabled="true" /> @@ -817,7 +823,7 @@ <option name="m_maxLength" value="32" /> </inspection_tool> <inspection_tool class="NonBooleanMethodNameMayNotStartWithQuestion" level="WARNING" enabled="true"> - <option name="questionString" value="is,can,has,should,could,will,shall,check,contains,equals,startsWith,endsWith" /> + <option name="nameCheckString" value="is,can,has,should,could,will,shall,check,contains,equals,startsWith,endsWith" /> </inspection_tool> <inspection_tool class="RedundantSuppression" level="WARNING" enabled="true" /> <inspection_tool class="UpperCaseFieldNameNotConstant" level="WARNING" enabled="true" /> @@ -827,7 +833,7 @@ <option name="m_ignoreOverridesOfLibraryMethods" value="false" /> </inspection_tool> <inspection_tool class="QuestionableName" level="WARNING" enabled="true"> - <option name="nameString" value="aa,abc,bad,bar,bar2,baz,baz1,baz2,baz3,bb,blah,bogus,bool,cc,dd,defau1t,dummy,dummy2,ee,fa1se,ff,foo,foo1,foo2,foo3,foobar,four,fred,fred1,fred2,gg,hh,hello,hello1,hello2,hello3,ii,nu11,one,silly,silly2,string,two,that,then,three,whi1e,var" /> + <option name="nameCheckString" value="foo,bar,baz" /> </inspection_tool> <inspection_tool class="StaticMethodNamingConvention" level="WARNING" enabled="true"> <option name="m_regex" value="[a-z][A-Za-z\d]*" /> @@ -886,7 +892,7 @@ <inspection_tool class="CachedNumberConstructorCall" level="WARNING" enabled="false" /> <inspection_tool class="ProtectedField" level="WARNING" enabled="false" /> <inspection_tool class="BadExceptionDeclared" level="WARNING" enabled="false"> - <option name="exceptionsString" value="java.lang.Throwable,java.lang.Exception,java.lang.Error,java.lang.RuntimeException,java.lang.NullPointerException,java.lang.ClassCastException,java.lang.ArrayIndexOutOfBoundsException" /> + <option name="exceptionCheckString" value="java.lang.Throwable,java.lang.Exception,java.lang.Error,java.lang.RuntimeException,java.lang.NullPointerException,java.lang.ClassCastException,java.lang.ArrayIndexOutOfBoundsException" /> <option name="ignoreTestCases" value="false" /> </inspection_tool> <inspection_tool class="NotifyWithoutCorrespondingWait" level="WARNING" enabled="false" /> @@ -968,9 +974,7 @@ </inspection_tool> <inspection_tool class="RedundantThrowsDeclaration" level="WARNING" enabled="false" /> <inspection_tool class="ChainedEqualityJS" level="WARNING" enabled="false" /> - <inspection_tool class="MultiplyOrDivideByPowerOfTwo" level="WARNING" enabled="false"> - <option name="checkDivision" value="false" /> - </inspection_tool> + <inspection_tool class="MultiplyOrDivideByPowerOfTwo" level="WARNING" enabled="false" /> <inspection_tool class="RuntimeExec" level="WARNING" enabled="false" /> <inspection_tool class="StringLiteralBreaksHTMLJS" level="WARNING" enabled="false" /> <inspection_tool class="SerializableWithUnconstructableAncestor" level="WARNING" enabled="false" /> @@ -984,15 +988,11 @@ <inspection_tool class="FieldRepeatedlyAccessed" level="WARNING" enabled="false"> <option name="m_ignoreFinalFields" value="false" /> </inspection_tool> - <inspection_tool class="UnnecessaryFinalOnParameter" level="WARNING" enabled="false"> - <option name="onlyWarnOnAbstractMethods" value="false" /> - </inspection_tool> + <inspection_tool class="UnnecessaryFinalOnParameter" level="WARNING" enabled="false" /> <inspection_tool class="RedundantMethodOverride" level="WARNING" enabled="true" /> <inspection_tool class="TestMethodInProductCode" level="WARNING" enabled="false" /> <inspection_tool class="ThreadDeathRethrown" level="WARNING" enabled="false" /> - <inspection_tool class="OverlyStrongTypeCast" level="WARNING" enabled="true"> - <option name="ignoreInMatchingInstanceof" value="false" /> - </inspection_tool> + <inspection_tool class="OverlyStrongTypeCast" level="WARNING" enabled="true" /> <inspection_tool class="LocalVariableOfConcreteClass" level="WARNING" enabled="false" /> <inspection_tool class="RedundantImplements" level="WARNING" enabled="false" /> <inspection_tool class="IfStatementWithTooManyBranches" level="WARNING" enabled="false"> @@ -1065,16 +1065,13 @@ <option name="m_limit" value="30" /> </inspection_tool> <inspection_tool class="HashCodeUsesNonFinalVariable" level="WARNING" enabled="true" /> - <inspection_tool class="Since15" level="ERROR" enabled="false"> - <option name="FORBID_15_API" value="true" /> - <option name="FORBID_16_API" value="true" /> - </inspection_tool> + <inspection_tool class="Since15" level="ERROR" enabled="false" /> <inspection_tool class="NegatedIfElse" level="WARNING" enabled="false"> <option name="m_ignoreNegatedNullComparison" value="true" /> </inspection_tool> <inspection_tool class="ReuseOfLocalVariable" level="WARNING" enabled="false" /> <inspection_tool class="SerializableInnerClassWithNonSerializableOuterClass" level="WARNING" enabled="false"> - <option name="superClassString" value="java.awt.Component" /> + <option name="m_ignoreSerializableDueToInheritance" value="true" /> </inspection_tool> <inspection_tool class="ConstantOnLHSOfComparisonJS" level="WARNING" enabled="false" /> <inspection_tool class="DebuggerStatementJS" level="WARNING" enabled="false" /> @@ -1160,15 +1157,11 @@ <inspection_tool class="DynamicallyGeneratedCodeJS" level="WARNING" enabled="false" /> <inspection_tool class="TimeToString" level="WARNING" enabled="false" /> <inspection_tool class="SubstringZero" level="WARNING" enabled="true" /> - <inspection_tool class="ObsoleteCollection" level="WARNING" enabled="false"> - <option name="ignoreLibraryArguments" value="false" /> - </inspection_tool> + <inspection_tool class="ObsoleteCollection" level="WARNING" enabled="false" /> <inspection_tool class="ClassWithoutNoArgConstructor" level="WARNING" enabled="false"> <option name="m_ignoreClassesWithNoConstructors" value="true" /> </inspection_tool> - <inspection_tool class="PublicField" level="WARNING" enabled="true"> - <option name="ignoreEnums" value="false" /> - </inspection_tool> + <inspection_tool class="PublicField" level="WARNING" enabled="true" /> <inspection_tool class="ConstantDeclaredInAbstractClass" level="WARNING" enabled="false" /> <inspection_tool class="TooBroadCatch" level="WARNING" enabled="false" /> <inspection_tool class="ThrownExceptionsPerMethod" level="WARNING" enabled="false"> @@ -1268,9 +1261,7 @@ <inspection_tool class="ConfusingFloatingPointLiteralJS" level="WARNING" enabled="false" /> <inspection_tool class="ClassEscapesItsScope" level="WARNING" enabled="true" /> <inspection_tool class="InstantiationOfUtilityClass" level="WARNING" enabled="true" /> - <inspection_tool class="WhileLoopSpinsOnField" level="WARNING" enabled="false"> - <option name="ignoreNonEmtpyLoops" value="false" /> - </inspection_tool> + <inspection_tool class="WhileLoopSpinsOnField" level="WARNING" enabled="false" /> <inspection_tool class="IfStatementWithIdenticalBranches" level="WARNING" enabled="false" /> <inspection_tool class="TestMethodIsPublicVoidNoArg" level="WARNING" enabled="false" /> <inspection_tool class="ObjectToString" level="WARNING" enabled="true" /> @@ -1279,8 +1270,6 @@ <option name="m_ignoreStaticMethods" value="true" /> </inspection_tool> <inspection_tool class="MultipleReturnPointsPerMethod" level="WARNING" enabled="false"> - <option name="ignoreGuardClauses" value="false" /> - <option name="ignoreEqualsMethod" value="false" /> <option name="m_limit" value="1" /> </inspection_tool> <inspection_tool class="BreakStatementWithLabel" level="WARNING" enabled="false" /> @@ -1352,7 +1341,7 @@ </inspection_tool> <inspection_tool class="CompareToUsesNonFinalVariable" level="WARNING" enabled="true" /> <inspection_tool class="NonSerializableFieldInSerializableClass" level="WARNING" enabled="false"> - <option name="superClassString" value="java.awt.Component" /> + <option name="ignoreSerializableDueToInheritance" value="true" /> </inspection_tool> <inspection_tool class="UnqualifiedStaticUsage" level="WARNING" enabled="false"> <option name="m_ignoreStaticFieldAccesses" value="false" /> @@ -1377,7 +1366,7 @@ <inspection_tool class="BreakStatementJS" level="WARNING" enabled="false" /> <inspection_tool class="TextLabelInSwitchStatementJS" level="WARNING" enabled="false" /> <inspection_tool class="SerializableHasSerialVersionUIDField" level="WARNING" enabled="false"> - <option name="superClassString" value="java.awt.Component" /> + <option name="m_ignoreSerializableDueToInheritance" value="true" /> </inspection_tool> <inspection_tool class="ContinueStatementWithLabelJS" level="WARNING" enabled="false" /> <inspection_tool class="SystemProperties" level="WARNING" enabled="false" /> @@ -1386,9 +1375,7 @@ <option name="m_ignoreFieldInitializations" value="true" /> </inspection_tool> <inspection_tool class="UseOfSunClasses" level="WARNING" enabled="true" /> - <inspection_tool class="PublicInnerClass" level="WARNING" enabled="false"> - <option name="ignoreEnums" value="false" /> - </inspection_tool> + <inspection_tool class="PublicInnerClass" level="WARNING" enabled="false" /> <inspection_tool class="NotifyNotInSynchronizedContext" level="WARNING" enabled="false" /> <inspection_tool class="ForLoopReplaceableByWhileJS" level="WARNING" enabled="false"> <option name="m_ignoreLoopsWithoutConditions" value="false" /> @@ -1419,21 +1406,19 @@ <option name="m_includeLibraryClasses" value="false" /> <option name="m_limit" value="15" /> </inspection_tool> - <inspection_tool class="DoubleCheckedLocking" level="WARNING" enabled="false"> - <option name="ignoreOnVolatileVariables" value="false" /> - </inspection_tool> + <inspection_tool class="DoubleCheckedLocking" level="WARNING" enabled="false" /> <inspection_tool class="ContinueStatementJS" level="WARNING" enabled="false" /> <inspection_tool class="InstanceofChain" level="INFO" enabled="true" /> <inspection_tool class="StringBufferReplaceableByString" level="WARNING" enabled="true" /> <inspection_tool class="BooleanMethodNameMustStartWithQuestion" level="WARNING" enabled="false"> - <option name="questionString" value="is,can,has,should,could,will,shall,check,contains,equals,add,put,remove,startsWith,endsWith" /> + <option name="nameCheckString" value="is,can,has,should,could,will,shall,check,contains,equals,add,put,remove,startsWith,endsWith" /> </inspection_tool> <inspection_tool class="ClassNameSameAsAncestorName" level="WARNING" enabled="false" /> <inspection_tool class="AccessToStaticFieldLockedOnInstance" level="WARNING" enabled="false" /> <inspection_tool class="CovariantCompareTo" level="WARNING" enabled="true" /> <inspection_tool class="ErrorRethrown" level="WARNING" enabled="false" /> <inspection_tool class="SerializableHasSerializationMethods" level="WARNING" enabled="false"> - <option name="superClassString" value="java.awt.Component" /> + <option name="m_ignoreSerializableDueToInheritance" value="true" /> </inspection_tool> <inspection_tool class="MisspelledSetUp" level="WARNING" enabled="false" /> <inspection_tool class="SetupIsPublicVoidNoArg" level="WARNING" enabled="false" /> @@ -1461,7 +1446,7 @@ </inspection_tool> <inspection_tool class="ClassWithoutToString" level="WARNING" enabled="false" /> <inspection_tool class="BadExceptionCaught" level="WARNING" enabled="false"> - <option name="exceptionsString" value="java.lang.NullPointerException,java.lang.IllegalMonitorStateException,java.lang.ArrayIndexOutOfBoundsException" /> + <option name="exceptionCheckString" value="java.lang.NullPointerException,java.lang.IllegalMonitorStateException,java.lang.ArrayIndexOutOfBoundsException" /> </inspection_tool> <inspection_tool class="AssignmentToCollectionFieldFromParameter" level="WARNING" enabled="false"> <option name="ignorePrivateMethods" value="true" /> @@ -1476,12 +1461,11 @@ <inspection_tool class="ChainedFunctionCallJS" level="WARNING" enabled="false" /> <inspection_tool class="SerialVersionUIDNotStaticFinal" level="WARNING" enabled="false" /> <inspection_tool class="SerializableInnerClassHasSerialVersionUIDField" level="WARNING" enabled="false"> - <option name="superClassString" value="java.awt.Component" /> + <option name="m_ignoreSerializableDueToInheritance" value="true" /> </inspection_tool> <inspection_tool class="NonSerializableObjectBoundToHttpSession" level="WARNING" enabled="false" /> <inspection_tool class="DuplicateStringLiteralInspection" level="WARNING" enabled="false"> <option name="MIN_STRING_LENGTH" value="5" /> - <option name="IGNORE_PROPERTY_KEYS" value="false" /> </inspection_tool> <inspection_tool class="SystemOutErr" level="WARNING" enabled="false" /> <inspection_tool class="FieldHasSetterButNoGetter" level="WARNING" enabled="false" /> @@ -1535,7 +1519,6 @@ <inspection_tool class="UnusedCatchParameter" level="WARNING" enabled="false"> <option name="m_ignoreCatchBlocksWithComments" value="false" /> <option name="m_ignoreTestCases" value="false" /> - <option name="m_ignoreIgnoreParameter" value="true" /> </inspection_tool> <inspection_tool class="ClassInTopLevelPackage" level="WARNING" enabled="true" /> <inspection_tool class="ConfusingElse" level="WARNING" enabled="true" /> @@ -1557,9 +1540,7 @@ </inspection_tool> <inspection_tool class="CollectionsMustHaveInitialCapacity" level="WARNING" enabled="false" /> <inspection_tool class="AnonymousInnerClass" level="WARNING" enabled="false" /> - <inspection_tool class="LoopConditionNotUpdatedInsideLoop" level="WARNING" enabled="false"> - <option name="ignoreIterators" value="false" /> - </inspection_tool> + <inspection_tool class="LoopConditionNotUpdatedInsideLoop" level="WARNING" enabled="false" /> <inspection_tool class="NegatedConditional" level="WARNING" enabled="false"> <option name="m_ignoreNegatedNullComparison" value="true" /> </inspection_tool> @@ -1579,9 +1560,7 @@ <option name="m_recognizeExampleMediaType" value="false" /> </inspection_tool> <inspection_tool class="EnumClass" level="WARNING" enabled="false" /> - <inspection_tool class="FeatureEnvy" level="WARNING" enabled="true"> - <option name="ignoreTestCases" value="false" /> - </inspection_tool> + <inspection_tool class="FeatureEnvy" level="WARNING" enabled="true" /> <inspection_tool class="EmptyTryBlockJS" level="WARNING" enabled="false" /> <inspection_tool class="SetReplaceableByEnumSet" level="WARNING" enabled="true" /> <inspection_tool class="PublicMethodNotExposedInInterface" level="WARNING" enabled="false" /> @@ -1594,9 +1573,7 @@ <inspection_tool class="ThreeNegationsPerFunctionJS" level="WARNING" enabled="false" /> <inspection_tool class="StaticImport" level="ERROR" enabled="false" /> <inspection_tool class="SillyAssignment" level="WARNING" enabled="true" /> - <inspection_tool class="AutoBoxing" level="WARNING" enabled="false"> - <option name="ignoreAddedToCollection" value="false" /> - </inspection_tool> + <inspection_tool class="AutoBoxing" level="WARNING" enabled="false" /> <inspection_tool class="NonStaticInnerClassInSecureContext" level="WARNING" enabled="false" /> <inspection_tool class="TailRecursion" level="WARNING" enabled="false" /> <inspection_tool class="OverlyComplexArithmeticExpressionJS" level="WARNING" enabled="false"> @@ -1604,9 +1581,7 @@ </inspection_tool> <inspection_tool class="ArithmeticOnVolatileField" level="WARNING" enabled="false" /> <inspection_tool class="PublicStaticCollectionField" level="WARNING" enabled="false" /> - <inspection_tool class="SizeReplaceableByIsEmpty" level="WARNING" enabled="true"> - <option name="ignoreNegations" value="false" /> - </inspection_tool> + <inspection_tool class="SizeReplaceableByIsEmpty" level="WARNING" enabled="true" /> <inspection_tool class="JavadocReference" level="WARNING" enabled="true" /> <inspection_tool class="UnaryPlus" level="WARNING" enabled="false" /> <inspection_tool class="IOResource" level="WARNING" enabled="true" /> @@ -1619,7 +1594,7 @@ <inspection_tool class="FinalMethod" level="WARNING" enabled="false" /> <inspection_tool class="TransientFieldInNonSerializableClass" level="WARNING" enabled="false" /> <inspection_tool class="BadExceptionThrown" level="WARNING" enabled="false"> - <option name="exceptionsString" value="java.lang.Throwable,java.lang.Exception,java.lang.Error,java.lang.RuntimeException,java.lang.NullPointerException,java.lang.ClassCastException,java.lang.ArrayIndexOutOfBoundsException" /> + <option name="exceptionCheckString" value="java.lang.Throwable,java.lang.Exception,java.lang.Error,java.lang.RuntimeException,java.lang.NullPointerException,java.lang.ClassCastException,java.lang.ArrayIndexOutOfBoundsException" /> </inspection_tool> <inspection_tool class="InstanceVariableUninitializedUse" level="WARNING" enabled="false"> <option name="m_ignorePrimitives" value="false" /> @@ -1658,20 +1633,35 @@ </inspection_tool> <inspection_tool class="DoubleNegation" level="WARNING" enabled="true" /> <inspection_tool class="ForLoopThatDoesntUseLoopVariableJS" level="WARNING" enabled="false" /> - <inspection_tool class="TestCaseWithNoTestMethods" level="WARNING" enabled="false"> - <option name="ignoreSupers" value="false" /> - </inspection_tool> + <inspection_tool class="TestCaseWithNoTestMethods" level="WARNING" enabled="false" /> <inspection_tool class="ArrayEquals" level="WARNING" enabled="true" /> <inspection_tool class="CloneableImplementsClone" level="INFO" enabled="true"> <option name="m_ignoreCloneableDueToInheritance" value="true" /> </inspection_tool> <inspection_tool class="ConstantOnRHSOfComparisonJS" level="WARNING" enabled="false" /> <inspection_tool class="ConstantDeclaredInInterface" level="WARNING" enabled="false" /> - <inspection_tool class="SuspiciousIndentAfterControlStatement" level="WARNING" enabled="false" /> </profile> <profile version="1.0" is_locked="false"> <option name="myName" value="Project Default" /> <option name="myLocal" value="false" /> + <used_levels> + <error> + <option name="myName" value="ERROR" /> + <option name="myVal" value="400" /> + </error> + <warning> + <option name="myName" value="WARNING" /> + <option name="myVal" value="300" /> + </warning> + <information> + <option name="myName" value="INFO" /> + <option name="myVal" value="200" /> + </information> + <server> + <option name="myName" value="SERVER PROBLEM" /> + <option name="myVal" value="100" /> + </server> + </used_levels> <inspection_tool class="InstanceVariableNamingConvention" level="WARNING" enabled="true"> <option name="m_regex" value="[a-z][A-Za-z\d]*" /> <option name="m_minLength" value="5" /> @@ -1690,9 +1680,7 @@ </inspection_tool> <inspection_tool class="AssignmentToStaticFieldFromInstanceMethod" level="WARNING" enabled="true" /> <inspection_tool class="MissingDeprecatedAnnotation" level="WARNING" enabled="true" /> - <inspection_tool class="MissingOverrideAnnotation" level="WARNING" enabled="true"> - <option name="useJdk6Rules" value="false" /> - </inspection_tool> + <inspection_tool class="MissingOverrideAnnotation" level="WARNING" enabled="true" /> <inspection_tool class="PublicConstructorInNonPublicClass" level="WARNING" enabled="true" /> <inspection_tool class="ProtectedMemberInFinalClass" level="WARNING" enabled="true" /> <inspection_tool class="StaticNonFinalField" level="WARNING" enabled="true" /> @@ -1708,12 +1696,6 @@ <inspection_tool class="FloatingPointEquality" level="WARNING" enabled="true" /> </profile> </profiles> - <list size="4"> - <item index="0" class="java.lang.String" itemvalue="SERVER PROBLEM" /> - <item index="1" class="java.lang.String" itemvalue="INFO" /> - <item index="2" class="java.lang.String" itemvalue="WARNING" /> - <item index="3" class="java.lang.String" itemvalue="ERROR" /> - </list> </component> <component name="JavacSettings"> <option name="DEBUGGING_INFO" value="true" /> @@ -1897,8 +1879,6 @@ <option name="VM_PARAMETERS" value="" /> <option name="PARAMETERS" value="" /> <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" /> - <option name="ENV_VARIABLES" /> - <option name="PASS_PARENT_ENVS" value="true" /> <option name="ADDITIONAL_CLASS_PATH" /> <option name="TEST_SEARCH_SCOPE"> <value defaultName="singleModule" /> @@ -1938,9 +1918,11 @@ <option name="GENERATE_IIOP_STUBS" value="false" /> <option name="ADDITIONAL_OPTIONS_STRING" value="" /> </component> + <component name="StarteamVcsAdapter" /> <component name="VcsDirectoryMappings"> <mapping directory="" vcs="svn" /> </component> + <component name="VssVcs" /> <component name="WebServicesPlugin" addRequiredLibraries="true" /> <component name="com.intellij.jsf.UserDefinedFacesConfigs"> <option name="USER_DEFINED_CONFIGS"> @@ -2241,5 +2223,11 @@ <SOURCES /> </library> </component> + <component name="uidesigner-configuration"> + <option name="INSTRUMENT_CLASSES" value="true" /> + <option name="COPY_FORMS_RUNTIME_TO_OUTPUT" value="true" /> + <option name="DEFAULT_LAYOUT_MANAGER" value="GridLayoutManager" /> + </component> + <UsedPathMacros /> </project> Modified: trunk/textedit.iml =================================================================== --- trunk/textedit.iml 2008-02-04 17:22:18 UTC (rev 3522) +++ trunk/textedit.iml 2008-02-04 17:28:36 UTC (rev 3523) @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<module relativePaths="true" type="JAVA_MODULE" version="4"> +<module version="4" relativePaths="true" type="JAVA_MODULE"> + <component name="ModuleRootManager" /> <component name="NewModuleRootManager" inherit-compiler-output="false"> <output url="file://$MODULE_DIR$/classes" /> <exclude-output /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-02-04 17:48:45
|
Revision: 3526 http://gridarta.svn.sourceforge.net/gridarta/?rev=3526&view=rev Author: akirschbaum Date: 2008-02-04 09:48:49 -0800 (Mon, 04 Feb 2008) Log Message: ----------- Revert incorrect commit. Modified Paths: -------------- trunk/crossfire/crossfire.iml trunk/daimonin/daimonin.iml trunk/gridarta.iml trunk/gridarta.ipr trunk/textedit.iml Modified: trunk/crossfire/crossfire.iml =================================================================== --- trunk/crossfire/crossfire.iml 2008-02-04 17:34:27 UTC (rev 3525) +++ trunk/crossfire/crossfire.iml 2008-02-04 17:48:49 UTC (rev 3526) @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<module version="4" relativePaths="true" type="JAVA_MODULE"> - <component name="ModuleRootManager" /> +<module relativePaths="true" type="JAVA_MODULE" version="4"> <component name="NewModuleRootManager" inherit-compiler-output="false"> <output url="file://$MODULE_DIR$/classes" /> <exclude-output /> @@ -22,23 +21,10 @@ <SOURCES /> </library> </orderEntry> - <orderEntry type="library" name="log4j-1.2.13" level="project" /> - <orderEntry type="library" name="junit-4.2" level="project" /> - <orderEntry type="library" name="annotations" level="project" /> - <orderEntry type="library" name="japi-lib-lang-0.1" level="project" /> - <orderEntry type="library" name="japi-lib-xml-0.1" level="project" /> - <orderEntry type="library" name="japi-lib-swing-action-0.1" level="project" /> - <orderEntry type="library" name="japi-lib-util-0.1" level="project" /> - <orderEntry type="library" name="japi-lib-swing-misc-0.1" level="project" /> - <orderEntry type="library" name="japi-lib-swing-prefs-0.1" level="project" /> - <orderEntry type="library" name="japi-lib-swing-extlib-0.1" level="project" /> - <orderEntry type="library" name="japi-lib-swing-about-0.1" level="project" /> - <orderEntry type="module" module-name="textedit" /> - <orderEntry type="library" name="japi-lib-swing-tod-0.1" level="project" /> <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/bsh-commands-2.0b4.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/bsh-classgen.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -47,7 +33,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/bsh-classgen-2.0b4.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/bsh-commands.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -56,7 +42,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/bsh-core-2.0b4.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/bsh-util.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -65,12 +51,25 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/bsh-util-2.0b4.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/bsh-core.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> </library> </orderEntry> + <orderEntry type="library" name="log4j-1.2.13" level="project" /> + <orderEntry type="library" name="junit-4.2" level="project" /> + <orderEntry type="library" name="annotations" level="project" /> + <orderEntry type="library" name="japi-lib-lang-0.1" level="project" /> + <orderEntry type="library" name="japi-lib-xml-0.1" level="project" /> + <orderEntry type="library" name="japi-lib-swing-action-0.1" level="project" /> + <orderEntry type="library" name="japi-lib-util-0.1" level="project" /> + <orderEntry type="library" name="japi-lib-swing-misc-0.1" level="project" /> + <orderEntry type="library" name="japi-lib-swing-prefs-0.1" level="project" /> + <orderEntry type="library" name="japi-lib-swing-extlib-0.1" level="project" /> + <orderEntry type="library" name="japi-lib-swing-about-0.1" level="project" /> + <orderEntry type="module" module-name="textedit" /> + <orderEntry type="library" name="japi-lib-swing-tod-0.1" level="project" /> <orderEntryProperties /> </component> <component name="copyright"> Modified: trunk/daimonin/daimonin.iml =================================================================== --- trunk/daimonin/daimonin.iml 2008-02-04 17:34:27 UTC (rev 3525) +++ trunk/daimonin/daimonin.iml 2008-02-04 17:48:49 UTC (rev 3526) @@ -1,12 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> -<module version="4" relativePaths="true" type="JAVA_MODULE"> +<module relativePaths="true" type="JAVA_MODULE" version="4"> <component name="BuildJarSettings"> <containerInfo /> <setting name="jarUrl" value="file://$MODULE_DIR$/daimonin.jar" /> <setting name="buildJar" value="true" /> <setting name="mainClass" value="" /> </component> - <component name="ModuleRootManager" /> <component name="NewModuleRootManager" inherit-compiler-output="false"> <output url="file://$MODULE_DIR$/classes" /> <exclude-output /> Modified: trunk/gridarta.iml =================================================================== --- trunk/gridarta.iml 2008-02-04 17:34:27 UTC (rev 3525) +++ trunk/gridarta.iml 2008-02-04 17:48:49 UTC (rev 3526) @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<module version="4" relativePaths="true" type="JAVA_MODULE"> - <component name="ModuleRootManager" /> +<module relativePaths="true" type="JAVA_MODULE" version="4"> <component name="NewModuleRootManager" inherit-compiler-output="false"> <output url="file://$MODULE_DIR$/classes" /> <exclude-output /> Modified: trunk/gridarta.ipr =================================================================== --- trunk/gridarta.ipr 2008-02-04 17:34:27 UTC (rev 3525) +++ trunk/gridarta.ipr 2008-02-04 17:48:49 UTC (rev 3526) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<project version="4" relativePaths="false"> +<project relativePaths="false" version="4"> <component name="AntConfiguration"> <defaultAnt bundledAnt="true" /> </component> @@ -50,6 +50,15 @@ <option name="CLASS_ANNOTATION_WRAP" value="1" /> <option name="FIELD_ANNOTATION_WRAP" value="1" /> <option name="ENUM_CONSTANTS_WRAP" value="2" /> + <ADDITIONAL_INDENT_OPTIONS fileType="js"> + <option name="INDENT_SIZE" value="4" /> + <option name="CONTINUATION_INDENT_SIZE" value="8" /> + <option name="TAB_SIZE" value="4" /> + <option name="USE_TAB_CHARACTER" value="false" /> + <option name="SMART_TABS" value="false" /> + <option name="LABEL_INDENT_SIZE" value="0" /> + <option name="LABEL_INDENT_ABSOLUTE" value="false" /> + </ADDITIONAL_INDENT_OPTIONS> </value> </option> <option name="USE_PER_PROJECT_SETTINGS" value="true" /> @@ -75,11 +84,11 @@ </wildcardResourcePatterns> </component> <component name="CppTools.Loader" warnedAboutFileOutOfSourceRoot="true" /> - <component name="DataSourceManagerImpl" /> <component name="DependenciesAnalyzeManager"> <option name="myForwardDirection" value="false" /> </component> <component name="DependencyValidationManager"> + <option name="SKIP_IMPORT_STATEMENTS" value="false" /> <scope name="Project without textedit" pattern="!src[gridarta]:net.sf.gridarta.textedit.scripteditor..*&&!src[gridarta]:net.sf.gridarta.textedit.textarea..*&&!src[textedit]:*..*" /> </component> <component name="EclipseCompilerSettings"> @@ -97,14 +106,13 @@ <option name="MAXIMUM_HEAP_SIZE" value="128" /> </component> <component name="EntryPointsManager"> - <entry_points /> + <entry_points version="2.0" /> </component> <component name="ExportToHTMLSettings"> <option name="PRINT_LINE_NUMBERS" value="false" /> <option name="OPEN_IN_BROWSER" value="false" /> <option name="OUTPUT_DIRECTORY" /> </component> - <component name="GUI Designer component loader factory" /> <component name="IdProvider" IDEtalkID="2C998304C446463F0F811673874877B6" /> <component name="InspectionProjectProfileManager"> <option name="PROJECT_PROFILE" value="No errors allowed here" /> @@ -114,24 +122,6 @@ <profile version="1.0" is_locked="false"> <option name="myName" value="Javadoc Issues" /> <option name="myLocal" value="false" /> - <used_levels> - <error> - <option name="myName" value="ERROR" /> - <option name="myVal" value="400" /> - </error> - <warning> - <option name="myName" value="WARNING" /> - <option name="myVal" value="300" /> - </warning> - <information> - <option name="myName" value="INFO" /> - <option name="myVal" value="200" /> - </information> - <server> - <option name="myName" value="SERVER PROBLEM" /> - <option name="myVal" value="100" /> - </server> - </used_levels> <inspection_tool class="CheckEmptyScriptTag" level="WARNING" enabled="false" /> <inspection_tool class="FunctionWithInconsistentReturnsJS" level="WARNING" enabled="false" /> <inspection_tool class="InfiniteLoopStatement" level="WARNING" enabled="false" /> @@ -170,6 +160,7 @@ <inspection_tool class="Glassfish" level="ERROR" enabled="false" /> <inspection_tool class="ConstantConditions" level="WARNING" enabled="false"> <option name="SUGGEST_NULLABLE_ANNOTATIONS" value="false" /> + <option name="DONT_REPORT_TRUE_ASSERT_STATEMENTS" value="false" /> </inspection_tool> <inspection_tool class="GwtServiceNotRegistered" level="ERROR" enabled="false" /> <inspection_tool class="EjbErrorInspection" level="ERROR" enabled="false" /> @@ -198,6 +189,7 @@ <option name="METHOD" value="true" /> <option name="CLASS" value="true" /> <option name="PARAMETER" value="true" /> + <option name="REPORT_PARAMETER_FOR_PUBLIC_METHODS" value="true" /> <option name="INJECTION_ANNOS"> <value> <list size="0" /> @@ -244,7 +236,9 @@ <inspection_tool class="RedundantCast" level="WARNING" enabled="false" /> <inspection_tool class="UnnecessaryReturn" level="WARNING" enabled="false" /> <inspection_tool class="FinalStaticMethod" level="WARNING" enabled="false" /> - <inspection_tool class="SuspiciousMethodCalls" level="WARNING" enabled="false" /> + <inspection_tool class="SuspiciousMethodCalls" level="WARNING" enabled="false"> + <option name="REPORT_CONVERTIBLE_METHOD_CALLS" value="true" /> + </inspection_tool> <inspection_tool class="UnnecessaryUnboxing" level="WARNING" enabled="false" /> <inspection_tool class="SameParameterValue" level="WARNING" enabled="false" /> <inspection_tool class="NoExplicitFinalizeCalls" level="WARNING" enabled="false" /> @@ -266,6 +260,9 @@ <option name="REPORT_NOT_ANNOTATED_METHOD_OVERRIDES_NOTNULL" value="true" /> <option name="REPORT_NOTNULL_PARAMETER_OVERRIDES_NULLABLE" value="true" /> <option name="REPORT_NOT_ANNOTATED_PARAMETER_OVERRIDES_NOTNULL" value="true" /> + <option name="REPORT_NOT_ANNOTATED_GETTER" value="true" /> + <option name="REPORT_NOT_ANNOTATED_SETTER_PARAMETER" value="true" /> + <option name="REPORT_ANNOTATION_NOT_PROPAGATED_TO_OVERRIDERS" value="true" /> </inspection_tool> <inspection_tool class="ReferencesToClassesFromDefaultPackagesInJSPFile" level="ERROR" enabled="false" /> <inspection_tool class="TrivialIf" level="WARNING" enabled="false" /> @@ -299,6 +296,7 @@ <inspection_tool class="EmptyCatchBlock" level="WARNING" enabled="false"> <option name="m_includeComments" value="true" /> <option name="m_ignoreTestCases" value="true" /> + <option name="m_ignoreIgnoreParameter" value="true" /> </inspection_tool> <inspection_tool class="Dependency" level="ERROR" enabled="false" /> <inspection_tool class="UnnecessaryLocalVariable" level="WARNING" enabled="false"> @@ -311,7 +309,9 @@ <option name="m_reportEmptyBlocks" value="false" /> </inspection_tool> <inspection_tool class="ThrowFromFinallyBlockJS" level="WARNING" enabled="false" /> - <inspection_tool class="ForCanBeForeach" level="WARNING" enabled="false" /> + <inspection_tool class="ForCanBeForeach" level="WARNING" enabled="false"> + <option name="REPORT_INDEXED_LOOP" value="true" /> + </inspection_tool> <inspection_tool class="TypeParameterExtendsObject" level="WARNING" enabled="false" /> <inspection_tool class="FieldCanBeLocal" level="WARNING" enabled="false" /> <inspection_tool class="UNCHECKED_WARNING" level="WARNING" enabled="false" /> @@ -338,13 +338,7 @@ <inspection_tool class="RedundantArrayCreation" level="WARNING" enabled="false" /> <inspection_tool class="UnnecessaryLabelOnContinueStatementJS" level="WARNING" enabled="false" /> <inspection_tool class="CheckImageSize" level="WARNING" enabled="false" /> - <inspection_tool class="EmptyMethod" level="WARNING" enabled="false"> - <option name="EXCLUDE_ANNOS"> - <value> - <list size="0" /> - </value> - </option> - </inspection_tool> + <inspection_tool class="EmptyMethod" level="WARNING" enabled="false" /> <inspection_tool class="EmptyTryBlock" level="WARNING" enabled="false" /> <inspection_tool class="MalformedFormatString" level="WARNING" enabled="false" /> <inspection_tool class="ComponentRegistrationProblems" level="ERROR" enabled="false"> @@ -384,11 +378,17 @@ <inspection_tool class="JBoss" level="ERROR" enabled="false" /> <inspection_tool class="UnusedDeclaration" level="WARNING" enabled="false"> <option name="ADD_MAINS_TO_ENTRIES" value="true" /> - <option name="ADD_JUNIT_TO_ENTRIES" value="true" /> - <option name="ADD_EJB_TO_ENTRIES" value="true" /> <option name="ADD_APPLET_TO_ENTRIES" value="true" /> <option name="ADD_SERVLET_TO_ENTRIES" value="true" /> <option name="ADD_NONJAVA_TO_ENTRIES" value="true" /> + <option name="ADDITIONAL_ANNOTATIONS"> + <value> + <list size="0" /> + </value> + </option> + <option name="ADD_EJB_TO_ENTRIES" value="true" /> + <option name="ADD_JUNIT_TO_ENTRIES" value="true" /> + <option name="ADD_TESTNG_TO_ENTRIES" value="true" /> </inspection_tool> <inspection_tool class="Deprecation" level="WARNING" enabled="false" /> <inspection_tool class="StrutsInspection" level="ERROR" enabled="false" /> @@ -426,24 +426,6 @@ <profile version="1.0" is_locked="true"> <option name="myName" value="No errors allowed here" /> <option name="myLocal" value="false" /> - <used_levels> - <error> - <option name="myName" value="ERROR" /> - <option name="myVal" value="400" /> - </error> - <warning> - <option name="myName" value="WARNING" /> - <option name="myVal" value="300" /> - </warning> - <information> - <option name="myName" value="INFO" /> - <option name="myVal" value="200" /> - </information> - <server> - <option name="myName" value="SERVER PROBLEM" /> - <option name="myVal" value="100" /> - </server> - </used_levels> <inspection_tool class="CheckEmptyScriptTag" level="WARNING" enabled="false" /> <inspection_tool class="FunctionWithInconsistentReturnsJS" level="WARNING" enabled="false" /> <inspection_tool class="InfiniteLoopStatement" level="WARNING" enabled="true" /> @@ -482,6 +464,7 @@ <inspection_tool class="Glassfish" level="ERROR" enabled="false" /> <inspection_tool class="ConstantConditions" level="WARNING" enabled="true"> <option name="SUGGEST_NULLABLE_ANNOTATIONS" value="true" /> + <option name="DONT_REPORT_TRUE_ASSERT_STATEMENTS" value="false" /> </inspection_tool> <inspection_tool class="GwtServiceNotRegistered" level="ERROR" enabled="false" /> <inspection_tool class="EjbErrorInspection" level="ERROR" enabled="false" /> @@ -510,6 +493,7 @@ <option name="METHOD" value="true" /> <option name="CLASS" value="true" /> <option name="PARAMETER" value="true" /> + <option name="REPORT_PARAMETER_FOR_PUBLIC_METHODS" value="true" /> <option name="INJECTION_ANNOS"> <value> <list size="0" /> @@ -554,7 +538,9 @@ <inspection_tool class="RedundantCast" level="WARNING" enabled="true" /> <inspection_tool class="UnnecessaryReturn" level="WARNING" enabled="true" /> <inspection_tool class="FinalStaticMethod" level="WARNING" enabled="true" /> - <inspection_tool class="SuspiciousMethodCalls" level="WARNING" enabled="true" /> + <inspection_tool class="SuspiciousMethodCalls" level="WARNING" enabled="true"> + <option name="REPORT_CONVERTIBLE_METHOD_CALLS" value="true" /> + </inspection_tool> <inspection_tool class="SameParameterValue" level="WARNING" enabled="false" /> <inspection_tool class="ReservedWordUsedAsNameJS" level="WARNING" enabled="false" /> <inspection_tool class="UnnecessaryReturnJS" level="WARNING" enabled="false" /> @@ -572,6 +558,9 @@ <option name="REPORT_NOT_ANNOTATED_METHOD_OVERRIDES_NOTNULL" value="true" /> <option name="REPORT_NOTNULL_PARAMETER_OVERRIDES_NULLABLE" value="true" /> <option name="REPORT_NOT_ANNOTATED_PARAMETER_OVERRIDES_NOTNULL" value="true" /> + <option name="REPORT_NOT_ANNOTATED_GETTER" value="true" /> + <option name="REPORT_NOT_ANNOTATED_SETTER_PARAMETER" value="true" /> + <option name="REPORT_ANNOTATION_NOT_PROPAGATED_TO_OVERRIDERS" value="true" /> </inspection_tool> <inspection_tool class="ReferencesToClassesFromDefaultPackagesInJSPFile" level="ERROR" enabled="false" /> <inspection_tool class="TrivialIf" level="WARNING" enabled="true" /> @@ -604,6 +593,7 @@ <inspection_tool class="EmptyCatchBlock" level="WARNING" enabled="false"> <option name="m_includeComments" value="true" /> <option name="m_ignoreTestCases" value="true" /> + <option name="m_ignoreIgnoreParameter" value="true" /> </inspection_tool> <inspection_tool class="UnnecessaryLocalVariable" level="WARNING" enabled="false"> <option name="m_ignoreImmediatelyReturnedVariables" value="false" /> @@ -636,13 +626,7 @@ <inspection_tool class="RedundantArrayCreation" level="WARNING" enabled="true" /> <inspection_tool class="UnnecessaryLabelOnContinueStatementJS" level="WARNING" enabled="false" /> <inspection_tool class="CheckImageSize" level="WARNING" enabled="false" /> - <inspection_tool class="EmptyMethod" level="WARNING" enabled="false"> - <option name="EXCLUDE_ANNOS"> - <value> - <list size="0" /> - </value> - </option> - </inspection_tool> + <inspection_tool class="EmptyMethod" level="WARNING" enabled="false" /> <inspection_tool class="EmptyTryBlock" level="WARNING" enabled="false" /> <inspection_tool class="MalformedFormatString" level="WARNING" enabled="true" /> <inspection_tool class="ComponentRegistrationProblems" level="ERROR" enabled="false"> @@ -678,11 +662,17 @@ <inspection_tool class="JBoss" level="ERROR" enabled="false" /> <inspection_tool class="UnusedDeclaration" level="WARNING" enabled="false"> <option name="ADD_MAINS_TO_ENTRIES" value="true" /> - <option name="ADD_JUNIT_TO_ENTRIES" value="true" /> - <option name="ADD_EJB_TO_ENTRIES" value="true" /> <option name="ADD_APPLET_TO_ENTRIES" value="true" /> <option name="ADD_SERVLET_TO_ENTRIES" value="true" /> <option name="ADD_NONJAVA_TO_ENTRIES" value="true" /> + <option name="ADDITIONAL_ANNOTATIONS"> + <value> + <list size="0" /> + </value> + </option> + <option name="ADD_EJB_TO_ENTRIES" value="true" /> + <option name="ADD_JUNIT_TO_ENTRIES" value="true" /> + <option name="ADD_TESTNG_TO_ENTRIES" value="true" /> </inspection_tool> <inspection_tool class="Deprecation" level="WARNING" enabled="false" /> <inspection_tool class="StrutsInspection" level="ERROR" enabled="false" /> @@ -716,7 +706,9 @@ <option name="IGNORE_JAVADOC_PERIOD" value="false" /> <option name="myAdditionalJavadocTags" value="todo,note,todo,xxx,note,todo,fixme,fixme,warning,invariant,retval,pre" /> </inspection_tool> - <inspection_tool class="MissingOverrideAnnotation" level="WARNING" enabled="true" /> + <inspection_tool class="MissingOverrideAnnotation" level="WARNING" enabled="true"> + <option name="useJdk6Rules" value="false" /> + </inspection_tool> <inspection_tool class="AbstractMethodWithMissingImplementations" level="WARNING" enabled="true" /> <inspection_tool class="EqualsAndHashcode" level="WARNING" enabled="true" /> <inspection_tool class="Dependency" level="ERROR" enabled="false" /> @@ -755,7 +747,9 @@ <inspection_tool class="TypeParameterExtendsFinalClass" level="WARNING" enabled="true" /> <inspection_tool class="AbstractMethodCallInConstructor" level="WARNING" enabled="true" /> <inspection_tool class="IndexOfReplaceableByContains" level="WARNING" enabled="true" /> - <inspection_tool class="ForCanBeForeach" level="WARNING" enabled="true" /> + <inspection_tool class="ForCanBeForeach" level="WARNING" enabled="true"> + <option name="REPORT_INDEXED_LOOP" value="true" /> + </inspection_tool> <inspection_tool class="UnnecessaryBoxing" level="WARNING" enabled="true" /> <inspection_tool class="UnnecessaryUnboxing" level="WARNING" enabled="true" /> <inspection_tool class="WhileCanBeForeach" level="WARNING" enabled="true" /> @@ -823,7 +817,7 @@ <option name="m_maxLength" value="32" /> </inspection_tool> <inspection_tool class="NonBooleanMethodNameMayNotStartWithQuestion" level="WARNING" enabled="true"> - <option name="nameCheckString" value="is,can,has,should,could,will,shall,check,contains,equals,startsWith,endsWith" /> + <option name="questionString" value="is,can,has,should,could,will,shall,check,contains,equals,startsWith,endsWith" /> </inspection_tool> <inspection_tool class="RedundantSuppression" level="WARNING" enabled="true" /> <inspection_tool class="UpperCaseFieldNameNotConstant" level="WARNING" enabled="true" /> @@ -833,7 +827,7 @@ <option name="m_ignoreOverridesOfLibraryMethods" value="false" /> </inspection_tool> <inspection_tool class="QuestionableName" level="WARNING" enabled="true"> - <option name="nameCheckString" value="foo,bar,baz" /> + <option name="nameString" value="aa,abc,bad,bar,bar2,baz,baz1,baz2,baz3,bb,blah,bogus,bool,cc,dd,defau1t,dummy,dummy2,ee,fa1se,ff,foo,foo1,foo2,foo3,foobar,four,fred,fred1,fred2,gg,hh,hello,hello1,hello2,hello3,ii,nu11,one,silly,silly2,string,two,that,then,three,whi1e,var" /> </inspection_tool> <inspection_tool class="StaticMethodNamingConvention" level="WARNING" enabled="true"> <option name="m_regex" value="[a-z][A-Za-z\d]*" /> @@ -892,7 +886,7 @@ <inspection_tool class="CachedNumberConstructorCall" level="WARNING" enabled="false" /> <inspection_tool class="ProtectedField" level="WARNING" enabled="false" /> <inspection_tool class="BadExceptionDeclared" level="WARNING" enabled="false"> - <option name="exceptionCheckString" value="java.lang.Throwable,java.lang.Exception,java.lang.Error,java.lang.RuntimeException,java.lang.NullPointerException,java.lang.ClassCastException,java.lang.ArrayIndexOutOfBoundsException" /> + <option name="exceptionsString" value="java.lang.Throwable,java.lang.Exception,java.lang.Error,java.lang.RuntimeException,java.lang.NullPointerException,java.lang.ClassCastException,java.lang.ArrayIndexOutOfBoundsException" /> <option name="ignoreTestCases" value="false" /> </inspection_tool> <inspection_tool class="NotifyWithoutCorrespondingWait" level="WARNING" enabled="false" /> @@ -974,7 +968,9 @@ </inspection_tool> <inspection_tool class="RedundantThrowsDeclaration" level="WARNING" enabled="false" /> <inspection_tool class="ChainedEqualityJS" level="WARNING" enabled="false" /> - <inspection_tool class="MultiplyOrDivideByPowerOfTwo" level="WARNING" enabled="false" /> + <inspection_tool class="MultiplyOrDivideByPowerOfTwo" level="WARNING" enabled="false"> + <option name="checkDivision" value="false" /> + </inspection_tool> <inspection_tool class="RuntimeExec" level="WARNING" enabled="false" /> <inspection_tool class="StringLiteralBreaksHTMLJS" level="WARNING" enabled="false" /> <inspection_tool class="SerializableWithUnconstructableAncestor" level="WARNING" enabled="false" /> @@ -988,11 +984,15 @@ <inspection_tool class="FieldRepeatedlyAccessed" level="WARNING" enabled="false"> <option name="m_ignoreFinalFields" value="false" /> </inspection_tool> - <inspection_tool class="UnnecessaryFinalOnParameter" level="WARNING" enabled="false" /> + <inspection_tool class="UnnecessaryFinalOnParameter" level="WARNING" enabled="false"> + <option name="onlyWarnOnAbstractMethods" value="false" /> + </inspection_tool> <inspection_tool class="RedundantMethodOverride" level="WARNING" enabled="true" /> <inspection_tool class="TestMethodInProductCode" level="WARNING" enabled="false" /> <inspection_tool class="ThreadDeathRethrown" level="WARNING" enabled="false" /> - <inspection_tool class="OverlyStrongTypeCast" level="WARNING" enabled="true" /> + <inspection_tool class="OverlyStrongTypeCast" level="WARNING" enabled="true"> + <option name="ignoreInMatchingInstanceof" value="false" /> + </inspection_tool> <inspection_tool class="LocalVariableOfConcreteClass" level="WARNING" enabled="false" /> <inspection_tool class="RedundantImplements" level="WARNING" enabled="false" /> <inspection_tool class="IfStatementWithTooManyBranches" level="WARNING" enabled="false"> @@ -1065,13 +1065,16 @@ <option name="m_limit" value="30" /> </inspection_tool> <inspection_tool class="HashCodeUsesNonFinalVariable" level="WARNING" enabled="true" /> - <inspection_tool class="Since15" level="ERROR" enabled="false" /> + <inspection_tool class="Since15" level="ERROR" enabled="false"> + <option name="FORBID_15_API" value="true" /> + <option name="FORBID_16_API" value="true" /> + </inspection_tool> <inspection_tool class="NegatedIfElse" level="WARNING" enabled="false"> <option name="m_ignoreNegatedNullComparison" value="true" /> </inspection_tool> <inspection_tool class="ReuseOfLocalVariable" level="WARNING" enabled="false" /> <inspection_tool class="SerializableInnerClassWithNonSerializableOuterClass" level="WARNING" enabled="false"> - <option name="m_ignoreSerializableDueToInheritance" value="true" /> + <option name="superClassString" value="java.awt.Component" /> </inspection_tool> <inspection_tool class="ConstantOnLHSOfComparisonJS" level="WARNING" enabled="false" /> <inspection_tool class="DebuggerStatementJS" level="WARNING" enabled="false" /> @@ -1157,11 +1160,15 @@ <inspection_tool class="DynamicallyGeneratedCodeJS" level="WARNING" enabled="false" /> <inspection_tool class="TimeToString" level="WARNING" enabled="false" /> <inspection_tool class="SubstringZero" level="WARNING" enabled="true" /> - <inspection_tool class="ObsoleteCollection" level="WARNING" enabled="false" /> + <inspection_tool class="ObsoleteCollection" level="WARNING" enabled="false"> + <option name="ignoreLibraryArguments" value="false" /> + </inspection_tool> <inspection_tool class="ClassWithoutNoArgConstructor" level="WARNING" enabled="false"> <option name="m_ignoreClassesWithNoConstructors" value="true" /> </inspection_tool> - <inspection_tool class="PublicField" level="WARNING" enabled="true" /> + <inspection_tool class="PublicField" level="WARNING" enabled="true"> + <option name="ignoreEnums" value="false" /> + </inspection_tool> <inspection_tool class="ConstantDeclaredInAbstractClass" level="WARNING" enabled="false" /> <inspection_tool class="TooBroadCatch" level="WARNING" enabled="false" /> <inspection_tool class="ThrownExceptionsPerMethod" level="WARNING" enabled="false"> @@ -1261,7 +1268,9 @@ <inspection_tool class="ConfusingFloatingPointLiteralJS" level="WARNING" enabled="false" /> <inspection_tool class="ClassEscapesItsScope" level="WARNING" enabled="true" /> <inspection_tool class="InstantiationOfUtilityClass" level="WARNING" enabled="true" /> - <inspection_tool class="WhileLoopSpinsOnField" level="WARNING" enabled="false" /> + <inspection_tool class="WhileLoopSpinsOnField" level="WARNING" enabled="false"> + <option name="ignoreNonEmtpyLoops" value="false" /> + </inspection_tool> <inspection_tool class="IfStatementWithIdenticalBranches" level="WARNING" enabled="false" /> <inspection_tool class="TestMethodIsPublicVoidNoArg" level="WARNING" enabled="false" /> <inspection_tool class="ObjectToString" level="WARNING" enabled="true" /> @@ -1270,6 +1279,8 @@ <option name="m_ignoreStaticMethods" value="true" /> </inspection_tool> <inspection_tool class="MultipleReturnPointsPerMethod" level="WARNING" enabled="false"> + <option name="ignoreGuardClauses" value="false" /> + <option name="ignoreEqualsMethod" value="false" /> <option name="m_limit" value="1" /> </inspection_tool> <inspection_tool class="BreakStatementWithLabel" level="WARNING" enabled="false" /> @@ -1341,7 +1352,7 @@ </inspection_tool> <inspection_tool class="CompareToUsesNonFinalVariable" level="WARNING" enabled="true" /> <inspection_tool class="NonSerializableFieldInSerializableClass" level="WARNING" enabled="false"> - <option name="ignoreSerializableDueToInheritance" value="true" /> + <option name="superClassString" value="java.awt.Component" /> </inspection_tool> <inspection_tool class="UnqualifiedStaticUsage" level="WARNING" enabled="false"> <option name="m_ignoreStaticFieldAccesses" value="false" /> @@ -1366,7 +1377,7 @@ <inspection_tool class="BreakStatementJS" level="WARNING" enabled="false" /> <inspection_tool class="TextLabelInSwitchStatementJS" level="WARNING" enabled="false" /> <inspection_tool class="SerializableHasSerialVersionUIDField" level="WARNING" enabled="false"> - <option name="m_ignoreSerializableDueToInheritance" value="true" /> + <option name="superClassString" value="java.awt.Component" /> </inspection_tool> <inspection_tool class="ContinueStatementWithLabelJS" level="WARNING" enabled="false" /> <inspection_tool class="SystemProperties" level="WARNING" enabled="false" /> @@ -1375,7 +1386,9 @@ <option name="m_ignoreFieldInitializations" value="true" /> </inspection_tool> <inspection_tool class="UseOfSunClasses" level="WARNING" enabled="true" /> - <inspection_tool class="PublicInnerClass" level="WARNING" enabled="false" /> + <inspection_tool class="PublicInnerClass" level="WARNING" enabled="false"> + <option name="ignoreEnums" value="false" /> + </inspection_tool> <inspection_tool class="NotifyNotInSynchronizedContext" level="WARNING" enabled="false" /> <inspection_tool class="ForLoopReplaceableByWhileJS" level="WARNING" enabled="false"> <option name="m_ignoreLoopsWithoutConditions" value="false" /> @@ -1406,19 +1419,21 @@ <option name="m_includeLibraryClasses" value="false" /> <option name="m_limit" value="15" /> </inspection_tool> - <inspection_tool class="DoubleCheckedLocking" level="WARNING" enabled="false" /> + <inspection_tool class="DoubleCheckedLocking" level="WARNING" enabled="false"> + <option name="ignoreOnVolatileVariables" value="false" /> + </inspection_tool> <inspection_tool class="ContinueStatementJS" level="WARNING" enabled="false" /> <inspection_tool class="InstanceofChain" level="INFO" enabled="true" /> <inspection_tool class="StringBufferReplaceableByString" level="WARNING" enabled="true" /> <inspection_tool class="BooleanMethodNameMustStartWithQuestion" level="WARNING" enabled="false"> - <option name="nameCheckString" value="is,can,has,should,could,will,shall,check,contains,equals,add,put,remove,startsWith,endsWith" /> + <option name="questionString" value="is,can,has,should,could,will,shall,check,contains,equals,add,put,remove,startsWith,endsWith" /> </inspection_tool> <inspection_tool class="ClassNameSameAsAncestorName" level="WARNING" enabled="false" /> <inspection_tool class="AccessToStaticFieldLockedOnInstance" level="WARNING" enabled="false" /> <inspection_tool class="CovariantCompareTo" level="WARNING" enabled="true" /> <inspection_tool class="ErrorRethrown" level="WARNING" enabled="false" /> <inspection_tool class="SerializableHasSerializationMethods" level="WARNING" enabled="false"> - <option name="m_ignoreSerializableDueToInheritance" value="true" /> + <option name="superClassString" value="java.awt.Component" /> </inspection_tool> <inspection_tool class="MisspelledSetUp" level="WARNING" enabled="false" /> <inspection_tool class="SetupIsPublicVoidNoArg" level="WARNING" enabled="false" /> @@ -1446,7 +1461,7 @@ </inspection_tool> <inspection_tool class="ClassWithoutToString" level="WARNING" enabled="false" /> <inspection_tool class="BadExceptionCaught" level="WARNING" enabled="false"> - <option name="exceptionCheckString" value="java.lang.NullPointerException,java.lang.IllegalMonitorStateException,java.lang.ArrayIndexOutOfBoundsException" /> + <option name="exceptionsString" value="java.lang.NullPointerException,java.lang.IllegalMonitorStateException,java.lang.ArrayIndexOutOfBoundsException" /> </inspection_tool> <inspection_tool class="AssignmentToCollectionFieldFromParameter" level="WARNING" enabled="false"> <option name="ignorePrivateMethods" value="true" /> @@ -1461,11 +1476,12 @@ <inspection_tool class="ChainedFunctionCallJS" level="WARNING" enabled="false" /> <inspection_tool class="SerialVersionUIDNotStaticFinal" level="WARNING" enabled="false" /> <inspection_tool class="SerializableInnerClassHasSerialVersionUIDField" level="WARNING" enabled="false"> - <option name="m_ignoreSerializableDueToInheritance" value="true" /> + <option name="superClassString" value="java.awt.Component" /> </inspection_tool> <inspection_tool class="NonSerializableObjectBoundToHttpSession" level="WARNING" enabled="false" /> <inspection_tool class="DuplicateStringLiteralInspection" level="WARNING" enabled="false"> <option name="MIN_STRING_LENGTH" value="5" /> + <option name="IGNORE_PROPERTY_KEYS" value="false" /> </inspection_tool> <inspection_tool class="SystemOutErr" level="WARNING" enabled="false" /> <inspection_tool class="FieldHasSetterButNoGetter" level="WARNING" enabled="false" /> @@ -1519,6 +1535,7 @@ <inspection_tool class="UnusedCatchParameter" level="WARNING" enabled="false"> <option name="m_ignoreCatchBlocksWithComments" value="false" /> <option name="m_ignoreTestCases" value="false" /> + <option name="m_ignoreIgnoreParameter" value="true" /> </inspection_tool> <inspection_tool class="ClassInTopLevelPackage" level="WARNING" enabled="true" /> <inspection_tool class="ConfusingElse" level="WARNING" enabled="true" /> @@ -1540,7 +1557,9 @@ </inspection_tool> <inspection_tool class="CollectionsMustHaveInitialCapacity" level="WARNING" enabled="false" /> <inspection_tool class="AnonymousInnerClass" level="WARNING" enabled="false" /> - <inspection_tool class="LoopConditionNotUpdatedInsideLoop" level="WARNING" enabled="false" /> + <inspection_tool class="LoopConditionNotUpdatedInsideLoop" level="WARNING" enabled="false"> + <option name="ignoreIterators" value="false" /> + </inspection_tool> <inspection_tool class="NegatedConditional" level="WARNING" enabled="false"> <option name="m_ignoreNegatedNullComparison" value="true" /> </inspection_tool> @@ -1560,7 +1579,9 @@ <option name="m_recognizeExampleMediaType" value="false" /> </inspection_tool> <inspection_tool class="EnumClass" level="WARNING" enabled="false" /> - <inspection_tool class="FeatureEnvy" level="WARNING" enabled="true" /> + <inspection_tool class="FeatureEnvy" level="WARNING" enabled="true"> + <option name="ignoreTestCases" value="false" /> + </inspection_tool> <inspection_tool class="EmptyTryBlockJS" level="WARNING" enabled="false" /> <inspection_tool class="SetReplaceableByEnumSet" level="WARNING" enabled="true" /> <inspection_tool class="PublicMethodNotExposedInInterface" level="WARNING" enabled="false" /> @@ -1573,7 +1594,9 @@ <inspection_tool class="ThreeNegationsPerFunctionJS" level="WARNING" enabled="false" /> <inspection_tool class="StaticImport" level="ERROR" enabled="false" /> <inspection_tool class="SillyAssignment" level="WARNING" enabled="true" /> - <inspection_tool class="AutoBoxing" level="WARNING" enabled="false" /> + <inspection_tool class="AutoBoxing" level="WARNING" enabled="false"> + <option name="ignoreAddedToCollection" value="false" /> + </inspection_tool> <inspection_tool class="NonStaticInnerClassInSecureContext" level="WARNING" enabled="false" /> <inspection_tool class="TailRecursion" level="WARNING" enabled="false" /> <inspection_tool class="OverlyComplexArithmeticExpressionJS" level="WARNING" enabled="false"> @@ -1581,7 +1604,9 @@ </inspection_tool> <inspection_tool class="ArithmeticOnVolatileField" level="WARNING" enabled="false" /> <inspection_tool class="PublicStaticCollectionField" level="WARNING" enabled="false" /> - <inspection_tool class="SizeReplaceableByIsEmpty" level="WARNING" enabled="true" /> + <inspection_tool class="SizeReplaceableByIsEmpty" level="WARNING" enabled="true"> + <option name="ignoreNegations" value="false" /> + </inspection_tool> <inspection_tool class="JavadocReference" level="WARNING" enabled="true" /> <inspection_tool class="UnaryPlus" level="WARNING" enabled="false" /> <inspection_tool class="IOResource" level="WARNING" enabled="true" /> @@ -1594,7 +1619,7 @@ <inspection_tool class="FinalMethod" level="WARNING" enabled="false" /> <inspection_tool class="TransientFieldInNonSerializableClass" level="WARNING" enabled="false" /> <inspection_tool class="BadExceptionThrown" level="WARNING" enabled="false"> - <option name="exceptionCheckString" value="java.lang.Throwable,java.lang.Exception,java.lang.Error,java.lang.RuntimeException,java.lang.NullPointerException,java.lang.ClassCastException,java.lang.ArrayIndexOutOfBoundsException" /> + <option name="exceptionsString" value="java.lang.Throwable,java.lang.Exception,java.lang.Error,java.lang.RuntimeException,java.lang.NullPointerException,java.lang.ClassCastException,java.lang.ArrayIndexOutOfBoundsException" /> </inspection_tool> <inspection_tool class="InstanceVariableUninitializedUse" level="WARNING" enabled="false"> <option name="m_ignorePrimitives" value="false" /> @@ -1633,35 +1658,20 @@ </inspection_tool> <inspection_tool class="DoubleNegation" level="WARNING" enabled="true" /> <inspection_tool class="ForLoopThatDoesntUseLoopVariableJS" level="WARNING" enabled="false" /> - <inspection_tool class="TestCaseWithNoTestMethods" level="WARNING" enabled="false" /> + <inspection_tool class="TestCaseWithNoTestMethods" level="WARNING" enabled="false"> + <option name="ignoreSupers" value="false" /> + </inspection_tool> <inspection_tool class="ArrayEquals" level="WARNING" enabled="true" /> <inspection_tool class="CloneableImplementsClone" level="INFO" enabled="true"> <option name="m_ignoreCloneableDueToInheritance" value="true" /> </inspection_tool> <inspection_tool class="ConstantOnRHSOfComparisonJS" level="WARNING" enabled="false" /> <inspection_tool class="ConstantDeclaredInInterface" level="WARNING" enabled="false" /> + <inspection_tool class="SuspiciousIndentAfterControlStatement" level="WARNING" enabled="false" /> </profile> <profile version="1.0" is_locked="false"> <option name="myName" value="Project Default" /> <option name="myLocal" value="false" /> - <used_levels> - <error> - <option name="myName" value="ERROR" /> - <option name="myVal" value="400" /> - </error> - <warning> - <option name="myName" value="WARNING" /> - <option name="myVal" value="300" /> - </warning> - <information> - <option name="myName" value="INFO" /> - <option name="myVal" value="200" /> - </information> - <server> - <option name="myName" value="SERVER PROBLEM" /> - <option name="myVal" value="100" /> - </server> - </used_levels> <inspection_tool class="InstanceVariableNamingConvention" level="WARNING" enabled="true"> <option name="m_regex" value="[a-z][A-Za-z\d]*" /> <option name="m_minLength" value="5" /> @@ -1680,7 +1690,9 @@ </inspection_tool> <inspection_tool class="AssignmentToStaticFieldFromInstanceMethod" level="WARNING" enabled="true" /> <inspection_tool class="MissingDeprecatedAnnotation" level="WARNING" enabled="true" /> - <inspection_tool class="MissingOverrideAnnotation" level="WARNING" enabled="true" /> + <inspection_tool class="MissingOverrideAnnotation" level="WARNING" enabled="true"> + <option name="useJdk6Rules" value="false" /> + </inspection_tool> <inspection_tool class="PublicConstructorInNonPublicClass" level="WARNING" enabled="true" /> <inspection_tool class="ProtectedMemberInFinalClass" level="WARNING" enabled="true" /> <inspection_tool class="StaticNonFinalField" level="WARNING" enabled="true" /> @@ -1696,6 +1708,12 @@ <inspection_tool class="FloatingPointEquality" level="WARNING" enabled="true" /> </profile> </profiles> + <list size="4"> + <item index="0" class="java.lang.String" itemvalue="SERVER PROBLEM" /> + <item index="1" class="java.lang.String" itemvalue="INFO" /> + <item index="2" class="java.lang.String" itemvalue="WARNING" /> + <item index="3" class="java.lang.String" itemvalue="ERROR" /> + </list> </component> <component name="JavacSettings"> <option name="DEBUGGING_INFO" value="true" /> @@ -1879,6 +1897,8 @@ <option name="VM_PARAMETERS" value="" /> <option name="PARAMETERS" value="" /> <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" /> + <option name="ENV_VARIABLES" /> + <option name="PASS_PARENT_ENVS" value="true" /> <option name="ADDITIONAL_CLASS_PATH" /> <option name="TEST_SEARCH_SCOPE"> <value defaultName="singleModule" /> @@ -1918,11 +1938,9 @@ <option name="GENERATE_IIOP_STUBS" value="false" /> <option name="ADDITIONAL_OPTIONS_STRING" value="" /> </component> - <component name="StarteamVcsAdapter" /> <component name="VcsDirectoryMappings"> <mapping directory="" vcs="svn" /> </component> - <component name="VssVcs" /> <component name="WebServicesPlugin" addRequiredLibraries="true" /> <component name="com.intellij.jsf.UserDefinedFacesConfigs"> <option name="USER_DEFINED_CONFIGS"> @@ -2223,11 +2241,5 @@ <SOURCES /> </library> </component> - <component name="uidesigner-configuration"> - <option name="INSTRUMENT_CLASSES" value="true" /> - <option name="COPY_FORMS_RUNTIME_TO_OUTPUT" value="true" /> - <option name="DEFAULT_LAYOUT_MANAGER" value="GridLayoutManager" /> - </component> - <UsedPathMacros /> </project> Modified: trunk/textedit.iml =================================================================== --- trunk/textedit.iml 2008-02-04 17:34:27 UTC (rev 3525) +++ trunk/textedit.iml 2008-02-04 17:48:49 UTC (rev 3526) @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<module version="4" relativePaths="true" type="JAVA_MODULE"> - <component name="ModuleRootManager" /> +<module relativePaths="true" type="JAVA_MODULE" version="4"> <component name="NewModuleRootManager" inherit-compiler-output="false"> <output url="file://$MODULE_DIR$/classes" /> <exclude-output /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-02-04 18:31:44
|
Revision: 3533 http://gridarta.svn.sourceforge.net/gridarta/?rev=3533&view=rev Author: akirschbaum Date: 2008-02-04 10:31:48 -0800 (Mon, 04 Feb 2008) Log Message: ----------- Enable "save" for new maps; map it to "save as" instead. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/src/app/net/sf/gridarta/gui/map/MapFileActions.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2008-02-04 18:08:36 UTC (rev 3532) +++ trunk/crossfire/ChangeLog 2008-02-04 18:31:48 UTC (rev 3533) @@ -1,3 +1,7 @@ +2008-02-04 Andreas Kirschbaum + + * Enable "save" for new maps; map it to "save as" instead. + 2008-02-03 Andreas Kirschbaum * Add archetype loader error dialog: reports duplicate archetypes. Modified: trunk/src/app/net/sf/gridarta/gui/map/MapFileActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/MapFileActions.java 2008-02-04 18:08:36 UTC (rev 3532) +++ trunk/src/app/net/sf/gridarta/gui/map/MapFileActions.java 2008-02-04 18:31:48 UTC (rev 3533) @@ -122,7 +122,7 @@ */ @Nullable private C getSaveEnabled() { final C mapControl = currentMapListener.getCurrentMap(); - return mapControl != null && mapControl.isPlainSaveEnabled() && mapControl.isModified() ? mapControl : null; + return mapControl != null && mapControl.isModified() ? mapControl : null; } /** @@ -178,7 +178,11 @@ public void save() { final C mapControl = getSaveEnabled(); if (mapControl != null) { - mapControl.save(); + if (mapControl.isPlainSaveEnabled()) { + mapControl.save(); + } else { + mainControl.saveLevelAsWanted(mapControl); + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-02-05 14:12:29
|
Revision: 3534 http://gridarta.svn.sourceforge.net/gridarta/?rev=3534&view=rev Author: akirschbaum Date: 2008-02-05 06:12:33 -0800 (Tue, 05 Feb 2008) Log Message: ----------- Add shift operation: shifts selected map tiles into the given direction. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/action.properties trunk/daimonin/src/daieditor/action.properties trunk/src/app/net/sf/gridarta/gui/MainActions.java trunk/src/app/net/sf/gridarta/gui/map/MapGrid.java trunk/src/app/net/sf/gridarta/messages.properties trunk/src/app/net/sf/gridarta/messages_de.properties trunk/src/app/net/sf/gridarta/messages_fr.properties trunk/src/app/net/sf/gridarta/messages_sv.properties Added Paths: ----------- trunk/src/app/net/sf/gridarta/gui/ShiftProcessor.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2008-02-04 18:31:48 UTC (rev 3533) +++ trunk/crossfire/ChangeLog 2008-02-05 14:12:33 UTC (rev 3534) @@ -1,5 +1,8 @@ 2008-02-04 Andreas Kirschbaum + * Add shift operation: shifts selected map tiles into the given + direction. + * Enable "save" for new maps; map it to "save as" instead. 2008-02-03 Andreas Kirschbaum Modified: trunk/crossfire/src/cfeditor/action.properties =================================================================== --- trunk/crossfire/src/cfeditor/action.properties 2008-02-04 18:31:48 UTC (rev 3533) +++ trunk/crossfire/src/cfeditor/action.properties 2008-02-05 14:12:33 UTC (rev 3534) @@ -29,7 +29,7 @@ main.menubar=file edit map cursor archetypes pickmaps resources tools analyze view plugins window help file.menu=createNew open recent close - save saveAs revert createImage - options - exit -edit.menu=undo redo - clear cut copy paste - replace fillAbove fillBelow randFillAbove randFillBelow floodfill - selectAll +edit.menu=undo redo - clear cut copy paste - shift - replace fillAbove fillBelow randFillAbove randFillBelow floodfill - selectAll map.menu=autoJoin - gridVisible enterExit enterNorthMap enterEastMap enterSouthMap enterWestMap tileShow - mapCreateView mapProperties cursor.menu=moveCursor - selectTile startStopDrag addToSelection subFromSelection releaseDrag - insertArch deleteArch - selectArchAbove selectArchBelow - archAttributes archetypes.menu=displayObjectNames findArchetypes @@ -45,7 +45,7 @@ mapwindow.menubar=mapwindowFile mapwindowEdit mapwindowMap mapwindowCursor mapwindowView mapwindowFile.menu=save saveAs createImage - revert - close -mapwindowEdit.menu=undo redo - clear cut copy paste - replace fillAbove fillBelow randFillAbove randFillBelow floodfill +mapwindowEdit.menu=undo redo - clear cut copy paste - shift - replace fillAbove fillBelow randFillAbove randFillBelow floodfill mapwindowMap.menu=gridVisible enterExit enterNorthMap enterEastMap enterSouthMap enterWestMap tileShow - mapCreateView mapProperties mapwindowCursor.menu=moveCursor - selectTile startStopDrag addToSelection subFromSelection releaseDrag - insertArch deleteArch - selectArchAbove selectArchBelow - archAttributes mapwindowView.menu=showMonster showExit showBackground showDoor showWall showEquipment showTreasure showConnected resetView @@ -82,6 +82,8 @@ paste.icon=general/Paste16 +shift.menu=shiftNorth shiftEast shiftSouth shiftWest shiftNorthEast shiftSouthEast shiftSouthWest shiftNorthWest + replace.icon=general/Replace16 fillAbove.icon=EmptySmallIcon Modified: trunk/daimonin/src/daieditor/action.properties =================================================================== --- trunk/daimonin/src/daieditor/action.properties 2008-02-04 18:31:48 UTC (rev 3533) +++ trunk/daimonin/src/daieditor/action.properties 2008-02-05 14:12:33 UTC (rev 3534) @@ -28,7 +28,7 @@ # Menus main.menubar=file edit map cursor archetypes pickmaps resources tools view window help file.menu=createNew open recent close - save saveAs revert createImage - options - exit -edit.menu=undo redo - clear cut copy paste - replace fillAbove fillBelow randFillAbove randFillBelow floodfill - selectAll +edit.menu=undo redo - clear cut copy paste - shift - replace fillAbove fillBelow randFillAbove randFillBelow floodfill - selectAll map.menu=enterExit enterNorthMap enterEastMap enterSouthMap enterWestMap enterNorthEastMap enterSouthEastMap enterSouthWestMap enterNorthWestMap - mapCreateView mapProperties cursor.menu=moveCursor - selectTile startStopDrag addToSelection subFromSelection releaseDrag - insertArch deleteArch - selectArchAbove selectArchBelow - archAttributes archetypes.menu=displayObjectNames findArchetypes @@ -48,7 +48,7 @@ mapwindow.menubar=mapwindowFile mapwindowEdit mapwindowMap mapwindowCursor mapwindowFile.menu=save saveAs createImage - revert - close -mapwindowEdit.menu=undo redo - clear cut copy paste - replace fillAbove fillBelow randFillAbove randFillBelow floodfill - selectAll +mapwindowEdit.menu=undo redo - clear cut copy paste - shift - replace fillAbove fillBelow randFillAbove randFillBelow floodfill - selectAll mapwindowMap.menu=enterExit enterNorthMap enterEastMap enterSouthMap enterWestMap enterNorthEastMap enterSouthEastMap enterSouthWestMap enterNorthWestMap - mapCreateView mapProperties mapwindowCursor.menu=moveCursor - selectTile startStopDrag addToSelection subFromSelection releaseDrag - insertArch deleteArch - selectArchAbove selectArchBelow - archAttributes @@ -88,6 +88,8 @@ paste.icon=general/Paste16 +shift.menu=shiftNorth shiftEast shiftSouth shiftWest shiftNorthEast shiftSouthEast shiftSouthWest shiftNorthWest + replace.icon=general/Replace16 fillAbove.icon=EmptySmallIcon Modified: trunk/src/app/net/sf/gridarta/gui/MainActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/MainActions.java 2008-02-04 18:31:48 UTC (rev 3533) +++ trunk/src/app/net/sf/gridarta/gui/MainActions.java 2008-02-05 14:12:33 UTC (rev 3534) @@ -62,6 +62,30 @@ /** Action called for "copy". */ private final Action aCopy; + /** Action called for "shift north". */ + private final Action aShiftNorth; + + /** Action called for "shift north east". */ + private final Action aShiftNorthEast; + + /** Action called for "shift east". */ + private final Action aShiftEast; + + /** Action called for "shift south east". */ + private final Action aShiftSouthEast; + + /** Action called for "shift south". */ + private final Action aShiftSouth; + + /** Action called for "shift south west". */ + private final Action aShiftSouthWest; + + /** Action called for "shift west". */ + private final Action aShiftWest; + + /** Action called for "shift north west". */ + private final Action aShiftNorthWest; + /** Action called for "paste". */ private final Action aPaste; @@ -233,6 +257,14 @@ aCut = actionFactory.createAction(true, "cut", this); aCopy = actionFactory.createAction(true, "copy", this); aPaste = actionFactory.createAction(true, "paste", this); + aShiftNorth = actionFactory.createAction(true, "shiftNorth", this); + aShiftNorthEast = actionFactory.createAction(true, "shiftNorthEast", this); + aShiftEast = actionFactory.createAction(true, "shiftEast", this); + aShiftSouthEast = actionFactory.createAction(true, "shiftSouthEast", this); + aShiftSouth = actionFactory.createAction(true, "shiftSouth", this); + aShiftSouthWest = actionFactory.createAction(true, "shiftSouthWest", this); + aShiftWest = actionFactory.createAction(true, "shiftWest", this); + aShiftNorthWest = actionFactory.createAction(true, "shiftNorthWest", this); aReplace = actionFactory.createAction(true, "replace", this); aFillAbove = actionFactory.createAction(true, "fillAbove", this); aFillBelow = actionFactory.createAction(true, "fillBelow", this); @@ -265,6 +297,14 @@ aCut.setEnabled(getCutEnabled() != null); aCopy.setEnabled(getCopyEnabled() != null); aPaste.setEnabled(getPasteEnabled() != null); + aShiftNorth.setEnabled(getShiftEnabled(0) != null); + aShiftNorthEast.setEnabled(getShiftEnabled(4) != null); + aShiftEast.setEnabled(getShiftEnabled(1) != null); + aShiftSouthEast.setEnabled(getShiftEnabled(5) != null); + aShiftSouth.setEnabled(getShiftEnabled(2) != null); + aShiftSouthWest.setEnabled(getShiftEnabled(6) != null); + aShiftWest.setEnabled(getShiftEnabled(3) != null); + aShiftNorthWest.setEnabled(getShiftEnabled(7) != null); aReplace.setEnabled(getReplaceEnabled() != null); aFillAbove.setEnabled(getFillAboveEnabled() != null); aFillBelow.setEnabled(getFillBelowEnabled() != null); @@ -309,6 +349,58 @@ } } + /** "Shift North" was selected from the Edit menu. */ + public void shiftNorth() { + shift(0); + } + + /** "Shift North East" was selected from the Edit menu. */ + public void shiftNorthEast() { + shift(4); + } + + /** "Shift East" was selected from the Edit menu. */ + public void shiftEast() { + shift(1); + } + + /** "Shift South East" was selected from the Edit menu. */ + public void shiftSouthEast() { + shift(5); + } + + /** "Shift South" was selected from the Edit menu. */ + public void shiftSouth() { + shift(2); + } + + /** "Shift South West" was selected from the Edit menu. */ + public void shiftSouthWest() { + shift(6); + } + + /** "Shift West" was selected from the Edit menu. */ + public void shiftWest() { + shift(3); + } + + /** "Shift North West" was selected from the Edit menu. */ + public void shiftNorthWest() { + shift(7); + } + + /** + * Shift the selection into the given direction. + * + * @param dir The direction to shift. + */ + private void shift(final int dir) { + final ShiftProcessor shiftProcessor = getShiftEnabled(dir); + if (shiftProcessor != null) { + shiftProcessor.shift(dir); + } + } + /** "Replace" was selected from the Edit menu. */ public void replace() { final MapView<G, A, R, C, V> mapView = getReplaceEnabled(); @@ -481,6 +573,27 @@ } /** + * Determine if "shift" is enabled. + * @param dir The shift direction. + * @return A shift processor if "shift" is enabled, or <code>null</code> + * otherwise. + */ + @Nullable private ShiftProcessor getShiftEnabled(final int dir) { + final C mapControl = currentMap; + if (mapControl == null) { + return null; + } + + final MapView<G, A, R, C, V> mapView = currentMapView; + if (mapView == null) { + return null; + } + + final ShiftProcessor shiftProcessor = new ShiftProcessor(mainControl, mapView, mapControl.getMapModel()); + return shiftProcessor.canShift(dir) ? shiftProcessor : null; + } + + /** * Determine if "replace" is enabled. * @return the map view to replace on if "replace" is enabled, or * <code>null</code> otherwise Added: trunk/src/app/net/sf/gridarta/gui/ShiftProcessor.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/ShiftProcessor.java (rev 0) +++ trunk/src/app/net/sf/gridarta/gui/ShiftProcessor.java 2008-02-05 14:12:33 UTC (rev 3534) @@ -0,0 +1,326 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2007 The Gridarta Developers. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.gui; + +import java.awt.Point; +import java.awt.Rectangle; +import java.util.LinkedList; +import java.util.List; +import net.sf.gridarta.MainControl; +import net.sf.gridarta.Size2D; +import net.sf.gridarta.gameobject.Archetype; +import net.sf.gridarta.gameobject.GameObject; +import net.sf.gridarta.gui.map.MapCursor; +import net.sf.gridarta.gui.map.MapGrid; +import net.sf.gridarta.gui.map.MapView; +import net.sf.gridarta.map.MapArchObject; +import net.sf.gridarta.map.MapModel; +import net.sf.gridarta.map.MapSquare; +import org.jetbrains.annotations.NotNull; + +/** + * Performs a "shift" operation in a map: shift all selected tiles into the + * given direction. + * + * @author Andreas Kirschbaum + */ +public class ShiftProcessor<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> { + + /** + * The main control. + */ + @NotNull private final MainControl<G, A, R, ?, ?> mainControl; + + /** + * The map view to operate on. + */ + @NotNull private final MapView<G, A, R, ?, ?> mapView; + + /** + * The map model to operate on. + */ + @NotNull private final MapModel<G, A, R> mapModel; + + /** + * The map grid to operate on. + */ + private MapGrid mapGrid = null; + + /** + * The selection rectangle to operate on. + */ + private Rectangle selRec = null; + + /** + * The x offset to shift. + */ + private int dx = 0; + + /** + * The y offset to shift. + */ + private int dy = 0; + + /** + * Create a new instance. + * + * @param mainControl The main control. + * + * @param mapView The map view to operate on. + * + * @param mapModel The map model to operate on. + */ + public ShiftProcessor(@NotNull final MainControl<G, A, R, ?, ?> mainControl, @NotNull final MapView<G, A, R, ?, ?> mapView, @NotNull final MapModel<G, A, R> mapModel) { + this.mainControl = mainControl; + this.mapView = mapView; + this.mapModel = mapModel; + } + + /** + * Check whether shifting is possible. + * + * @param dir The direction to shift. + * + * @return Whether shifting is possible. + */ + public boolean canShift(final int dir) { + mapGrid = mapView.getView().getMapGrid(); + selRec = mapGrid.getSelectedRec(); + if (selRec == null) { + return false; + } + + final Size2D size = mapGrid.getSize(); + + dx = MapCursor.direction[dir][0]; + dy = MapCursor.direction[dir][1]; + if (dx < 0) { + if (selRec.x + dx < 0) { + return false; + } + } else if (dx > 0) { + if (selRec.x + selRec.width + dx > size.getWidth()) { + return false; + } + } + + if (dy < 0) { + if (selRec.y + dy < 0) { + return false; + } + } else if (dy > 0) { + if (selRec.y + selRec.height + dy > size.getHeight()) { + return false; + } + } + + return true; + } + + /** + * Shift the map contents by one tile. If shifting is not possible (see + * {@link #canShift(int)}) nothing is changed. + * + * @param dir The direction to shift. + */ + public void shift(final int dir) { + if (canShift(dir)) { + final Point pos = new Point(); + mapModel.beginTransaction("Shift"); + try { + mapGrid.beginTransaction(); + try { + switch (dir) { + case 0: // north + for (int x = selRec.x; x < selRec.x + selRec.width; x++) { + pos.x = x; + pos.y = selRec.y; + shift(pos , selRec.height); + } + break; + + case 1: // east + for (int y = selRec.y; y < selRec.y + selRec.height; y++) { + pos.x = selRec.x + selRec.width - 1; + pos.y = y; + shift(pos, selRec.width); + } + break; + + case 2: // south + for (int x = selRec.x; x < selRec.x + selRec.width; x++) { + pos.x = x; + pos.y = selRec.y + selRec.height - 1; + shift(pos, selRec.height); + } + break; + + case 3: // west + for (int y = selRec.y; y < selRec.y + selRec.height; y++) { + pos.x = selRec.x; + pos.y = y; + shift(pos, selRec.width); + } + break; + + case 4: // north east + for (int x = selRec.x; x < selRec.x + selRec.width; x++) { + pos.x = x; + pos.y = selRec.y; + shift(pos, Math.min(x - selRec.x + 1, selRec.height)); + } + for (int y = selRec.y + 1; y < selRec.y + selRec.height; y++) { + pos.x = selRec.x + selRec.width - 1; + pos.y = y; + shift(pos, Math.min(selRec.y + selRec.height - y, selRec.width)); + } + break; + + case 5: // south east + for (int x = selRec.x; x < selRec.x + selRec.width; x++) { + pos.x = x; + pos.y = selRec.y + selRec.height - 1; + shift(pos, Math.min(x - selRec.x + 1, selRec.height)); + } + for (int y = selRec.y + selRec.height - 2; y >= selRec.y; y--) { + pos.x = selRec.x + selRec.width - 1; + pos.y = y; + shift(pos, Math.min(y - selRec.y + 1, selRec.width)); + } + break; + + case 6: // south west + for (int y = selRec.y; y < selRec.y + selRec.height; y++) { + pos.x = selRec.x; + pos.y = y; + shift(pos, Math.min(y - selRec.y + 1, selRec.width)); + } + for (int x = selRec.x + 1; x < selRec.x + selRec.width; x++) { + pos.x = x; + pos.y = selRec.y + selRec.height - 1; + shift(pos, Math.min(selRec.x + selRec.width - x, selRec.height)); + } + break; + + case 7: // north west + for (int y = selRec.y + selRec.height - 1; y >= selRec.y; y--) { + pos.x = selRec.x; + pos.y = y; + shift(pos, Math.min(selRec.y + selRec.height - y, selRec.width)); + } + for (int x = selRec.x + 1; x < selRec.x + selRec.width; x++) { + pos.x = x; + pos.y = selRec.y; + shift(pos, Math.min(selRec.x + selRec.width - x, selRec.height)); + } + break; + + default: + throw new IllegalArgumentException(); + } + } finally { + mapGrid.endTransaction(); + } + } finally { + mapModel.endTransaction(); + } + } + + mapGrid = null; + selRec = null; + dx = 0; + dy = 0; + } + + /** + * Shift one row. The shift direction is {@link #dx} and {@link #dy}. + * + * @param pos The starting position of the row in absolute map coordinates. + * + * @param len The length of the row in tiles. + */ + private void shift(final Point pos, final int len) { + final List<G> startGameObjects = new LinkedList<G>(); + final List<G> gameObjectsToDelete = new LinkedList<G>(); + final Point endPos = new Point(pos.x - len * dx, pos.y - len * dy); + final Point prevPos = new Point(pos.x + dx, pos.y + dy); + final Point startPos = new Point(); + boolean isStart = true; + final boolean startSelection = (mapGrid.getFlags(prevPos) & MapGrid.GRID_FLAG_SELECTION) > 0; + assert !startSelection; + for (int i = 0; i < len; i++) { + final boolean thisSelection = (mapGrid.getFlags(pos) & MapGrid.GRID_FLAG_SELECTION) > 0; + mapGrid.select(prevPos, prevPos, thisSelection ? MapGrid.SelectionMode.ADD : MapGrid.SelectionMode.SUB); + if (thisSelection) { + if (isStart) { + isStart = false; + startPos.setLocation(prevPos); + // [startGameObjects] = [prevPos] + assert startGameObjects.size() == 0; + for (final G gameObject : mapModel.getMapSquare(prevPos)) { + if (gameObject.isHead() && !gameObject.isInContainer() && mainControl.isEditType(gameObject)) { + startGameObjects.add(gameObject); + gameObjectsToDelete.add(gameObject); + } + } + } + // [prevPos] = [pos] + for (final G gameObject : mapModel.getMapSquare(pos)) { + if (gameObject.isHead() && !gameObject.isInContainer() && mainControl.isEditType(gameObject)) { + mapModel.addGameObjectToMap(gameObject.createClone(prevPos.x, prevPos.y), false); + gameObjectsToDelete.add(gameObject); + } + } + } else { + if (!isStart) { + isStart = true; + // [prevPos] = [startGameObjects] + for (final G gameObject : startGameObjects) { + assert gameObject.isHead() && !gameObject.isInContainer() && mainControl.isEditType(gameObject); + mapModel.addGameObjectToMap(gameObject.createClone(prevPos.x, prevPos.y), false); + } + startGameObjects.clear(); + } else { + // ignore + } + } + + while (!gameObjectsToDelete.isEmpty()) { + gameObjectsToDelete.remove(0).remove(); + } + + prevPos.setLocation(pos); + pos.x -= dx; + pos.y -= dy; + } + if (!isStart) { + isStart = true; + // [prevPos] = [startGameObjects] + for (final G gameObject : startGameObjects) { + assert gameObject.isHead() && !gameObject.isInContainer() && mainControl.isEditType(gameObject); + mapModel.addGameObjectToMap(gameObject.createClone(prevPos.x, prevPos.y), false); + } + startGameObjects.clear(); + } + assert startGameObjects.size() == 0; + mapGrid.select(prevPos, prevPos, startSelection ? MapGrid.SelectionMode.ADD : MapGrid.SelectionMode.SUB); + } + +} // class ShiftProcessor Property changes on: trunk/src/app/net/sf/gridarta/gui/ShiftProcessor.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Modified: trunk/src/app/net/sf/gridarta/gui/map/MapGrid.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/MapGrid.java 2008-02-04 18:31:48 UTC (rev 3533) +++ trunk/src/app/net/sf/gridarta/gui/map/MapGrid.java 2008-02-05 14:12:33 UTC (rev 3534) @@ -471,7 +471,7 @@ break; } } - cachedSelectedRec = new Rectangle(x1, y1, x2 - x1, y2 - y1); + cachedSelectedRec = new Rectangle(x1, y1, x2 - x1 + 1, y2 - y1 + 1); } /** Mark all tiles as selected. */ Modified: trunk/src/app/net/sf/gridarta/messages.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages.properties 2008-02-04 18:31:48 UTC (rev 3533) +++ trunk/src/app/net/sf/gridarta/messages.properties 2008-02-05 14:12:33 UTC (rev 3534) @@ -394,6 +394,22 @@ paste.mnemonic=P paste.accel=ctrl pressed V +shift.text=Shift +shift.mnemonic=H + +shiftNorth.text=Shift North +shiftNorth.mnemonic=N +shiftNorthEast.text=Shift Northeast +shiftEast.text=Shift East +shiftEast.mnemonic=E +shiftSouthEast.text=Shift Southeast +shiftSouth.text=Shift South +shiftSouth.mnemonic=S +shiftSouthWest.text=Shift Southwest +shiftWest.text=Shift West +shiftWest.mnemonic=W +shiftNorthWest.text=Shift Northwest + replace.text=Replace replace.mnemonic=R replace.accel=ctrl pressed R Modified: trunk/src/app/net/sf/gridarta/messages_de.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages_de.properties 2008-02-04 18:31:48 UTC (rev 3533) +++ trunk/src/app/net/sf/gridarta/messages_de.properties 2008-02-05 14:12:33 UTC (rev 3534) @@ -364,6 +364,22 @@ paste.text=Einf\xFCgen paste.mnemonic=E +shift.text=Verschieben +shift.mnemonic=V + +shiftNorth.text=Auswahl nach Nord verschieben +shiftNorth.mnemonic=N +shiftNorthEast.text=Auswahl nach Nordost verschieben +shiftEast.text=Auswahl nach Ost verschieben +shiftEast.mnemonic=O +shiftSouthEast.text=Auswahl nach S\xFCdost verschieben +shiftSouth.text=Auswahl nach S\xFCd verschieben +shiftSouth.mnemonic=S +shiftSouthWest.text=Auswahl nach S\xFCdwest verschieben +shiftWest.text=Auswahl nach West verschieben +shiftWest.mnemonic=W +shiftNorthWest.text=Auswahl nach Nordwest verschieben + replace.text=Ersetzen replace.mnemonic=Z Modified: trunk/src/app/net/sf/gridarta/messages_fr.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages_fr.properties 2008-02-04 18:31:48 UTC (rev 3533) +++ trunk/src/app/net/sf/gridarta/messages_fr.properties 2008-02-05 14:12:33 UTC (rev 3534) @@ -363,6 +363,22 @@ paste.text=Coller paste.mnemonic=L +#shift.text= +#shift.mnemonic= + +#shiftNorth.text= +#shiftNorth.mnemonic= +#shiftNorthEast.text= +#shiftEast.text= +#shiftEast.mnemonic= +#shiftSouthEast.text= +#shiftSouth.text= +#shiftSouth.mnemonic= +#shiftSouthWest.text= +#shiftWest.text= +#shiftWest.mnemonic= +#shiftNorthWest.text= + replace.text=Remplacer replace.mnemonic=R Modified: trunk/src/app/net/sf/gridarta/messages_sv.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages_sv.properties 2008-02-04 18:31:48 UTC (rev 3533) +++ trunk/src/app/net/sf/gridarta/messages_sv.properties 2008-02-05 14:12:33 UTC (rev 3534) @@ -362,6 +362,22 @@ paste.text=Klistra in paste.mnemonic=L +#shift.text= +#shift.mnemonic= + +#shiftNorth.text= +#shiftNorth.mnemonic= +#shiftNorthEast.text= +#shiftEast.text= +#shiftEast.mnemonic= +#shiftSouthEast.text= +#shiftSouth.text= +#shiftSouth.mnemonic= +#shiftSouthWest.text= +#shiftWest.text= +#shiftWest.mnemonic= +#shiftNorthWest.text= + replace.text=Ers\xE4tt replace.mnemonic=E This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-02-05 22:01:27
|
Revision: 3535 http://gridarta.svn.sourceforge.net/gridarta/?rev=3535&view=rev Author: akirschbaum Date: 2008-02-05 14:00:37 -0800 (Tue, 05 Feb 2008) Log Message: ----------- Fix [ 1842539 ] File Options... does not open sometimes. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/lib/japi-lib-swing-prefs-0.1.jar Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2008-02-05 14:12:33 UTC (rev 3534) +++ trunk/crossfire/ChangeLog 2008-02-05 22:00:37 UTC (rev 3535) @@ -1,3 +1,7 @@ +2008-02-05 Andreas Kirschbaum + + * Fix [ 1842539 ] File Options... does not open sometimes. + 2008-02-04 Andreas Kirschbaum * Add shift operation: shifts selected map tiles into the given Modified: trunk/lib/japi-lib-swing-prefs-0.1.jar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-02-07 11:36:38
|
Revision: 3536 http://gridarta.svn.sourceforge.net/gridarta/?rev=3536&view=rev Author: akirschbaum Date: 2008-02-07 03:36:42 -0800 (Thu, 07 Feb 2008) Log Message: ----------- Remove incorrect @Override annotations. Modified Paths: -------------- trunk/crossfire/src/cfeditor/map/MapControl.java trunk/daimonin/src/daieditor/map/MapControl.java Modified: trunk/crossfire/src/cfeditor/map/MapControl.java =================================================================== --- trunk/crossfire/src/cfeditor/map/MapControl.java 2008-02-05 22:00:37 UTC (rev 3535) +++ trunk/crossfire/src/cfeditor/map/MapControl.java 2008-02-07 11:36:42 UTC (rev 3536) @@ -224,7 +224,7 @@ } /** {@inheritDoc} */ - @Override public LevelRenderer getRenderer() { + public LevelRenderer getRenderer() { final SimpleLevelRenderer tmpLevelRenderer = simpleLevelRendererReference == null ? null : simpleLevelRendererReference.get(); final SimpleLevelRenderer simpleLevelRenderer; if (tmpLevelRenderer == null) { Modified: trunk/daimonin/src/daieditor/map/MapControl.java =================================================================== --- trunk/daimonin/src/daieditor/map/MapControl.java 2008-02-05 22:00:37 UTC (rev 3535) +++ trunk/daimonin/src/daieditor/map/MapControl.java 2008-02-07 11:36:42 UTC (rev 3536) @@ -224,7 +224,7 @@ } /** {@inheritDoc} */ - @Override public LevelRenderer getRenderer() { + public LevelRenderer getRenderer() { final SimpleLevelRenderer tmpLevelRenderer = simpleLevelRendererReference == null ? null : simpleLevelRendererReference.get(); final SimpleLevelRenderer simpleLevelRenderer; if (tmpLevelRenderer == null) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-02-10 21:23:19
|
Revision: 3538 http://gridarta.svn.sourceforge.net/gridarta/?rev=3538&view=rev Author: akirschbaum Date: 2008-02-10 13:22:13 -0800 (Sun, 10 Feb 2008) Log Message: ----------- Change layout of 'Scripts' tab in Game Object Attributes Panel. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java trunk/daimonin/src/daieditor/gui/GameObjectAttributesPanel.java Modified: trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java 2008-02-09 23:19:12 UTC (rev 3537) +++ trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java 2008-02-10 21:22:13 UTC (rev 3538) @@ -36,7 +36,6 @@ import java.awt.Toolkit; import java.util.prefs.Preferences; import javax.swing.Action; -import javax.swing.BoxLayout; import javax.swing.DefaultListModel; import javax.swing.JButton; import javax.swing.JLabel; @@ -373,7 +372,7 @@ ssa.setPreferredSize(new Dimension(80, 40)); // create buttons - final JPanel grid = new JPanel(new GridLayout(2, 2)); + final JPanel grid = new JPanel(new GridLayout(4, 1)); grid.add(new JButton(aScriptAddNew)); grid.add(new JButton(aScriptEditData)); grid.add(new JButton(aScriptEdit)); @@ -386,9 +385,9 @@ aScriptRemove.setEnabled(false); final JPanel scriptPanel = new JPanel(); // new panel - scriptPanel.setLayout(new BoxLayout(scriptPanel, BoxLayout.X_AXIS)); - scriptPanel.add(ssa); - scriptPanel.add(grid); + scriptPanel.setLayout(new BorderLayout()); + scriptPanel.add(ssa, BorderLayout.CENTER); + scriptPanel.add(grid, BorderLayout.EAST); scriptPanel.setPreferredSize(new Dimension(100, 40)); return scriptPanel; } Modified: trunk/daimonin/src/daieditor/gui/GameObjectAttributesPanel.java =================================================================== --- trunk/daimonin/src/daieditor/gui/GameObjectAttributesPanel.java 2008-02-09 23:19:12 UTC (rev 3537) +++ trunk/daimonin/src/daieditor/gui/GameObjectAttributesPanel.java 2008-02-10 21:22:13 UTC (rev 3538) @@ -36,7 +36,6 @@ import java.awt.Toolkit; import java.util.prefs.Preferences; import javax.swing.Action; -import javax.swing.BoxLayout; import javax.swing.ButtonGroup; import javax.swing.DefaultListModel; import javax.swing.JButton; @@ -485,7 +484,7 @@ ssa.setPreferredSize(new Dimension(80, 40)); // create buttons - final JPanel grid = new JPanel(new GridLayout(2, 2)); + final JPanel grid = new JPanel(new GridLayout(4, 1)); grid.add(new JButton(aScriptAddNew)); grid.add(new JButton(aScriptEditData)); grid.add(new JButton(aScriptEdit)); @@ -498,9 +497,9 @@ aScriptRemove.setEnabled(false); final JPanel scriptPanel = new JPanel(); // new panel - scriptPanel.setLayout(new BoxLayout(scriptPanel, BoxLayout.X_AXIS)); - scriptPanel.add(ssa); - scriptPanel.add(grid); + scriptPanel.setLayout(new BorderLayout()); + scriptPanel.add(ssa, BorderLayout.CENTER); + scriptPanel.add(grid, BorderLayout.EAST); scriptPanel.setPreferredSize(new Dimension(100, 40)); return scriptPanel; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-02-11 18:41:25
|
Revision: 3539 http://gridarta.svn.sourceforge.net/gridarta/?rev=3539&view=rev Author: akirschbaum Date: 2008-02-11 10:40:46 -0800 (Mon, 11 Feb 2008) Log Message: ----------- Rename field name. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gameobject/GameObject.java trunk/daimonin/src/daieditor/gameobject/GameObject.java Modified: trunk/crossfire/src/cfeditor/gameobject/GameObject.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2008-02-10 21:22:13 UTC (rev 3538) +++ trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2008-02-11 18:40:46 UTC (rev 3539) @@ -52,7 +52,7 @@ /** * Data for scripted events. */ - @NotNull private ScriptArchData script = new ScriptArchData(this); + @NotNull private ScriptArchData scriptArchData = new ScriptArchData(this); /** {@inheritDoc} */ @Override public void propagateElevation(@NotNull final GameObject gameObject) { @@ -133,7 +133,7 @@ clone.archType = archType; // type attribute of the arch - clone.script = new ScriptArchData(clone); + clone.scriptArchData = new ScriptArchData(clone); clone.setMapX(posx); clone.setMapY(posy); @@ -168,7 +168,7 @@ * insufficient ScriptedEvent objects get removed. */ public void validateAllEvents() { - script.validateAllEvents(); + scriptArchData.validateAllEvents(); } /** @@ -189,7 +189,7 @@ * @param list the JList which displays all events for this arch */ public void addEventsToJList(@NotNull final JList list) { - script.addEventsToJList(list); + scriptArchData.addEventsToJList(list); } /** @@ -203,9 +203,9 @@ * @xxx this method knows things it should never know, it is evil! */ public void modifyEventScript(final int eventType, final int task, @NotNull final JList eventList, @NotNull final GameObjectAttributesPanel mapanel) { - script.modifyEventScript(eventType, task, eventList); + scriptArchData.modifyEventScript(eventType, task, eventList); - if (script.isEmpty()) { + if (scriptArchData.isEmpty()) { mapanel.setScriptPanelButtonState(true, false, false, false); } } @@ -218,11 +218,11 @@ * @param mapanel the MapArchPanel */ public void addEventScript(@NotNull final JList eventList, @NotNull final GameObjectAttributesPanel mapanel) { - script.addEventScript(eventList, this); + scriptArchData.addEventScript(eventList, this); - if (!script.isEmpty()) { + if (!scriptArchData.isEmpty()) { mapanel.setScriptPanelButtonState(true, true, true, true); - script.addEventsToJList(eventList); + scriptArchData.addEventsToJList(eventList); } else { mapanel.setScriptPanelButtonState(true, false, false, false); } @@ -231,7 +231,7 @@ /** * This method checks the objectText for syntax errors. More precisely: It * reads every line in the objectText and looks if it matches the - * type-definitions (-> see CFArchTypeList) for this arch. If there is no + * type-definitions (-> see CFArchTypeList) for this arch. If there is no * match, the line is considered wrong. Of course the type-definitions will * never be perfect, this should be kept in mind. * <p/> @@ -317,7 +317,7 @@ return super.isEqual(gameObject) && (gameObject.animText == null ? animText == null : gameObject.animText.equals(animText)) && gameObject.loreText.equals(loreText) - // ignore "script" + // ignore "scriptArchData" && gameObject.archType == archType; } Modified: trunk/daimonin/src/daieditor/gameobject/GameObject.java =================================================================== --- trunk/daimonin/src/daieditor/gameobject/GameObject.java 2008-02-10 21:22:13 UTC (rev 3538) +++ trunk/daimonin/src/daieditor/gameobject/GameObject.java 2008-02-11 18:40:46 UTC (rev 3539) @@ -71,7 +71,7 @@ /** * Data for scripted events. */ - @NotNull private ScriptArchData script = new ScriptArchData(this); + @NotNull private ScriptArchData scriptArchData = new ScriptArchData(this); /** * If set, the game object has no face as default. @@ -344,7 +344,7 @@ clone.multiX = multiX; clone.multiY = multiY; - clone.script = new ScriptArchData(clone); + clone.scriptArchData = new ScriptArchData(clone); clone.setMapX(posx); clone.setMapY(posy); @@ -375,7 +375,7 @@ * insufficient ScriptedEvent objects get removed. */ public void validateAllEvents() { - script.validateAllEvents(); + scriptArchData.validateAllEvents(); } /** @@ -396,7 +396,7 @@ * @param list the JList which displays all events for this arch */ public void addEventsToJList(@NotNull final JList list) { - script.addEventsToJList(list); + scriptArchData.addEventsToJList(list); } /** @@ -410,9 +410,9 @@ * @xxx this method knows things it should never know, it is evil! */ public void modifyEventScript(final int eventType, final int task, @NotNull final JList eventList, @NotNull final GameObjectAttributesPanel mapanel) { - script.modifyEventScript(eventType, task, eventList); + scriptArchData.modifyEventScript(eventType, task, eventList); - if (script.isEmpty()) { + if (scriptArchData.isEmpty()) { mapanel.setScriptPanelButtonState(true, false, false, false); } } @@ -425,11 +425,11 @@ * @param mapanel the MapArchPanel */ public void addEventScript(@NotNull final JList eventList, @NotNull final GameObjectAttributesPanel mapanel) { - script.addEventScript(eventList, this); + scriptArchData.addEventScript(eventList, this); - if (!script.isEmpty()) { + if (!scriptArchData.isEmpty()) { mapanel.setScriptPanelButtonState(true, true, true, true); - script.addEventsToJList(eventList); + scriptArchData.addEventsToJList(eventList); } else { mapanel.setScriptPanelButtonState(true, false, false, false); } @@ -523,7 +523,7 @@ && (gameObject.animName == null ? animName == null : gameObject.animName.equals(animName)) && gameObject.multiPartNr == multiPartNr && gameObject.isLowestPart == isLowestPart - // ignore "script" + // ignore "scriptArchData" && gameObject.noface == noface // ignore "faceobjdesc" (XXX: is this correct?) && gameObject.direction == direction This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-02-11 19:11:25
|
Revision: 3540 http://gridarta.svn.sourceforge.net/gridarta/?rev=3540&view=rev Author: akirschbaum Date: 2008-02-11 11:10:30 -0800 (Mon, 11 Feb 2008) Log Message: ----------- Move ScriptArchData.addEventsToJList() to common code base. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gameobject/scripts/ScriptArchData.java trunk/daimonin/src/daieditor/gameobject/scripts/ScriptArchData.java trunk/src/app/net/sf/gridarta/gameobject/scripts/ScriptArchData.java Modified: trunk/crossfire/src/cfeditor/gameobject/scripts/ScriptArchData.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/scripts/ScriptArchData.java 2008-02-11 18:40:46 UTC (rev 3539) +++ trunk/crossfire/src/cfeditor/gameobject/scripts/ScriptArchData.java 2008-02-11 19:10:30 UTC (rev 3540) @@ -157,12 +157,8 @@ } } - /** - * Set all ScriptedEvents to appear in the given JList This method should - * be fast because it may be executed when user clicks on map objects. - * @param list JList - */ - public void addEventsToJList(final JList list) { + /** {@inheritDoc} */ + @Override public void addEventsToJList(final JList list) { //cher: JList expects Vector, so we MUST use an obsolete concrete collection. //noinspection CollectionDeclaredAsConcreteClass,UseOfObsoleteCollectionType final Vector<String> content = new Vector<String>(); Modified: trunk/daimonin/src/daieditor/gameobject/scripts/ScriptArchData.java =================================================================== --- trunk/daimonin/src/daieditor/gameobject/scripts/ScriptArchData.java 2008-02-11 18:40:46 UTC (rev 3539) +++ trunk/daimonin/src/daieditor/gameobject/scripts/ScriptArchData.java 2008-02-11 19:10:30 UTC (rev 3540) @@ -167,12 +167,8 @@ } } - /** - * Set all ScriptedEvents to appear in the given JList This method should - * be fast because it may be executed when user clicks on map objects. - * @param list JList - */ - public void addEventsToJList(final JList list) { + /** {@inheritDoc} */ + @Override public void addEventsToJList(final JList list) { //cher: JList expects Vector, so we MUST use an obsolete concrete collection. //noinspection CollectionDeclaredAsConcreteClass,UseOfObsoleteCollectionType final Vector<String> content = new Vector<String>(); Modified: trunk/src/app/net/sf/gridarta/gameobject/scripts/ScriptArchData.java =================================================================== --- trunk/src/app/net/sf/gridarta/gameobject/scripts/ScriptArchData.java 2008-02-11 18:40:46 UTC (rev 3539) +++ trunk/src/app/net/sf/gridarta/gameobject/scripts/ScriptArchData.java 2008-02-11 19:10:30 UTC (rev 3540) @@ -21,6 +21,7 @@ import java.io.Serializable; import javax.swing.JDialog; +import javax.swing.JList; /** * Stores and manages information about scripted events. @@ -39,4 +40,11 @@ public abstract void setChanged(final boolean changed); + /** + * Set all ScriptedEvents to appear in the given JList This method should + * be fast because it may be executed when user clicks on map objects. + * @param list JList + */ + public abstract void addEventsToJList(final JList list); + } // class ScriptArchData This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-02-11 19:20:23
|
Revision: 3541 http://gridarta.svn.sourceforge.net/gridarta/?rev=3541&view=rev Author: akirschbaum Date: 2008-02-11 11:18:19 -0800 (Mon, 11 Feb 2008) Log Message: ----------- Move GameObject.addEventsToJList() to common code base. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gameobject/GameObject.java trunk/daimonin/src/daieditor/gameobject/GameObject.java trunk/src/app/net/sf/gridarta/gameobject/GameObject.java Modified: trunk/crossfire/src/cfeditor/gameobject/GameObject.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2008-02-11 19:10:30 UTC (rev 3540) +++ trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2008-02-11 19:18:19 UTC (rev 3541) @@ -184,11 +184,8 @@ return false; } - /** - * Set contents of JList to all existing scripted events. - * @param list the JList which displays all events for this arch - */ - public void addEventsToJList(@NotNull final JList list) { + /* {@inheritDoc} */ + @Override public void addEventsToJList(@NotNull final JList list) { scriptArchData.addEventsToJList(list); } Modified: trunk/daimonin/src/daieditor/gameobject/GameObject.java =================================================================== --- trunk/daimonin/src/daieditor/gameobject/GameObject.java 2008-02-11 19:10:30 UTC (rev 3540) +++ trunk/daimonin/src/daieditor/gameobject/GameObject.java 2008-02-11 19:18:19 UTC (rev 3541) @@ -391,11 +391,8 @@ return false; } - /** - * Set contents of JList to all existing scripted events. - * @param list the JList which displays all events for this arch - */ - public void addEventsToJList(@NotNull final JList list) { + /** {@inheritDoc} */ + @Override public void addEventsToJList(@NotNull final JList list) { scriptArchData.addEventsToJList(list); } Modified: trunk/src/app/net/sf/gridarta/gameobject/GameObject.java =================================================================== --- trunk/src/app/net/sf/gridarta/gameobject/GameObject.java 2008-02-11 19:10:30 UTC (rev 3540) +++ trunk/src/app/net/sf/gridarta/gameobject/GameObject.java 2008-02-11 19:18:19 UTC (rev 3541) @@ -22,6 +22,7 @@ import java.util.HashMap; import java.util.Map; import java.util.regex.Pattern; +import javax.swing.JList; import net.sf.gridarta.CFArchTypeList; import net.sf.gridarta.gui.GUIConstants; import net.sf.gridarta.map.MapArchObject; @@ -1319,4 +1320,10 @@ */ public abstract void propagateElevation(final G gameObject); + /** + * Set contents of JList to all existing scripted events. + * @param list the JList which displays all events for this arch + */ + public abstract void addEventsToJList(@NotNull final JList list); + } // interface GameObject This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-02-11 19:23:52
|
Revision: 3542 http://gridarta.svn.sourceforge.net/gridarta/?rev=3542&view=rev Author: akirschbaum Date: 2008-02-11 11:22:56 -0800 (Mon, 11 Feb 2008) Log Message: ----------- Move GameObject.isScripted() to common code base. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gameobject/GameObject.java trunk/daimonin/src/daieditor/gameobject/GameObject.java trunk/src/app/net/sf/gridarta/gameobject/GameObject.java Modified: trunk/crossfire/src/cfeditor/gameobject/GameObject.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2008-02-11 19:18:19 UTC (rev 3541) +++ trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2008-02-11 19:22:56 UTC (rev 3542) @@ -171,11 +171,8 @@ scriptArchData.validateAllEvents(); } - /** - * Returns whether this GameObject has one or more scripted events defined. - * @return <code>true</code> if this GameObject has one or more scripted events, otherwise <code>false</code> - */ - public boolean isScripted() { + /** {@inheritDoc} */ + @Override public boolean isScripted() { for (final GameObject tmp : this) { if (tmp.archType == Archetype.TYPE_EVENT_CONNECTOR) { return true; Modified: trunk/daimonin/src/daieditor/gameobject/GameObject.java =================================================================== --- trunk/daimonin/src/daieditor/gameobject/GameObject.java 2008-02-11 19:18:19 UTC (rev 3541) +++ trunk/daimonin/src/daieditor/gameobject/GameObject.java 2008-02-11 19:22:56 UTC (rev 3542) @@ -378,11 +378,8 @@ scriptArchData.validateAllEvents(); } - /** - * Returns whether this GameObject has one or more scripted events defined. - * @return <code>true</code> if this GameObject has one or more scripted events, otherwise <code>false</code> - */ - public boolean isScripted() { + /** {@inheritDoc} */ + @Override public boolean isScripted() { for (final GameObject tmp : this) { if (tmp.archType == Archetype.TYPE_EVENT_OBJECT) { return true; Modified: trunk/src/app/net/sf/gridarta/gameobject/GameObject.java =================================================================== --- trunk/src/app/net/sf/gridarta/gameobject/GameObject.java 2008-02-11 19:18:19 UTC (rev 3541) +++ trunk/src/app/net/sf/gridarta/gameobject/GameObject.java 2008-02-11 19:22:56 UTC (rev 3542) @@ -1326,4 +1326,10 @@ */ public abstract void addEventsToJList(@NotNull final JList list); + /** + * Returns whether this GameObject has one or more scripted events defined. + * @return <code>true</code> if this GameObject has one or more scripted events, otherwise <code>false</code> + */ + public abstract boolean isScripted(); + } // interface GameObject This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-02-11 19:46:30
|
Revision: 3543 http://gridarta.svn.sourceforge.net/gridarta/?rev=3543&view=rev Author: akirschbaum Date: 2008-02-11 11:46:34 -0800 (Mon, 11 Feb 2008) Log Message: ----------- Move GameObjectAttributesPanel.GameObjectAttributesPanel() to common code base. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java trunk/daimonin/src/daieditor/gui/GameObjectAttributesPanel.java trunk/src/app/net/sf/gridarta/gui/GameObjectAttributesPanel.java Modified: trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java 2008-02-11 19:22:56 UTC (rev 3542) +++ trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java 2008-02-11 19:46:34 UTC (rev 3543) @@ -607,14 +607,8 @@ } } - /** - * Set enable/disable states for the four buttons in the script panel. - * @param newButton Enabled state for the "new" button. - * @param modifyButton Enabled state for the "modify" button. - * @param pathButton Enabled state for the "path" button. - * @param removeButton Enabled state for the "remove" button. - */ - public void setScriptPanelButtonState(final boolean newButton, final boolean modifyButton, final boolean pathButton, final boolean removeButton) { + /** {@inheritDoc} */ + @Override public void setScriptPanelButtonState(final boolean newButton, final boolean modifyButton, final boolean pathButton, final boolean removeButton) { aScriptAddNew.setEnabled(newButton); aScriptEditData.setEnabled(pathButton); aScriptEdit.setEnabled(modifyButton); Modified: trunk/daimonin/src/daieditor/gui/GameObjectAttributesPanel.java =================================================================== --- trunk/daimonin/src/daieditor/gui/GameObjectAttributesPanel.java 2008-02-11 19:22:56 UTC (rev 3542) +++ trunk/daimonin/src/daieditor/gui/GameObjectAttributesPanel.java 2008-02-11 19:46:34 UTC (rev 3543) @@ -737,14 +737,8 @@ } } - /** - * Set enable/disable states for the four buttons in the script panel. - * @param newButton Enabled state for the "new" button. - * @param modifyButton Enabled state for the "modify" button. - * @param pathButton Enabled state for the "path" button. - * @param removeButton Enabled state for the "remove" button. - */ - public void setScriptPanelButtonState(final boolean newButton, final boolean modifyButton, final boolean pathButton, final boolean removeButton) { + /** {@inheritDoc} */ + @Override public void setScriptPanelButtonState(final boolean newButton, final boolean modifyButton, final boolean pathButton, final boolean removeButton) { aScriptAddNew.setEnabled(newButton); aScriptEditData.setEnabled(pathButton); aScriptEdit.setEnabled(modifyButton); Modified: trunk/src/app/net/sf/gridarta/gui/GameObjectAttributesPanel.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/GameObjectAttributesPanel.java 2008-02-11 19:22:56 UTC (rev 3542) +++ trunk/src/app/net/sf/gridarta/gui/GameObjectAttributesPanel.java 2008-02-11 19:46:34 UTC (rev 3543) @@ -354,4 +354,13 @@ panelDesktop.setForegroundAt(1, hasMessage ? Color.blue : Color.black); } + /** + * Set enable/disable states for the four buttons in the script panel. + * @param newButton Enabled state for the "new" button. + * @param modifyButton Enabled state for the "modify" button. + * @param pathButton Enabled state for the "path" button. + * @param removeButton Enabled state for the "remove" button. + */ + public abstract void setScriptPanelButtonState(final boolean newButton, final boolean modifyButton, final boolean pathButton, final boolean removeButton); + } // class GameObjectAttributesPanel This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-02-11 19:53:33
|
Revision: 3544 http://gridarta.svn.sourceforge.net/gridarta/?rev=3544&view=rev Author: akirschbaum Date: 2008-02-11 11:53:34 -0800 (Mon, 11 Feb 2008) Log Message: ----------- Move GameObject.addEventScript() to common code base. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gameobject/GameObject.java trunk/daimonin/src/daieditor/gameobject/GameObject.java trunk/src/app/net/sf/gridarta/gameobject/GameObject.java Modified: trunk/crossfire/src/cfeditor/gameobject/GameObject.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2008-02-11 19:46:34 UTC (rev 3543) +++ trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2008-02-11 19:53:34 UTC (rev 3544) @@ -20,10 +20,10 @@ package cfeditor.gameobject; import cfeditor.gameobject.scripts.ScriptArchData; -import cfeditor.gui.GameObjectAttributesPanel; import cfeditor.map.MapArchObject; import javax.swing.JList; import net.sf.gridarta.CFArchType; +import net.sf.gridarta.gui.GameObjectAttributesPanel; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -196,7 +196,7 @@ * @param mapanel the MapArchPanel * @xxx this method knows things it should never know, it is evil! */ - public void modifyEventScript(final int eventType, final int task, @NotNull final JList eventList, @NotNull final GameObjectAttributesPanel mapanel) { + public void modifyEventScript(final int eventType, final int task, @NotNull final JList eventList, @NotNull final GameObjectAttributesPanel<GameObject, MapArchObject, Archetype, ?, ?> mapanel) { scriptArchData.modifyEventScript(eventType, task, eventList); if (scriptArchData.isEmpty()) { @@ -204,14 +204,8 @@ } } - /** - * A popup is opened and the user can create a new scripting event which - * gets attached to this arch. - * @param eventList JList from the MapArchPanel (script tab) which displays - * the events - * @param mapanel the MapArchPanel - */ - public void addEventScript(@NotNull final JList eventList, @NotNull final GameObjectAttributesPanel mapanel) { + /** {@inheritDoc} */ + @Override public void addEventScript(@NotNull final JList eventList, @NotNull final GameObjectAttributesPanel<GameObject, MapArchObject, Archetype, ?, ?> mapanel) { scriptArchData.addEventScript(eventList, this); if (!scriptArchData.isEmpty()) { Modified: trunk/daimonin/src/daieditor/gameobject/GameObject.java =================================================================== --- trunk/daimonin/src/daieditor/gameobject/GameObject.java 2008-02-11 19:46:34 UTC (rev 3543) +++ trunk/daimonin/src/daieditor/gameobject/GameObject.java 2008-02-11 19:53:34 UTC (rev 3544) @@ -23,12 +23,12 @@ import daieditor.gameobject.anim.AnimationObject; import daieditor.gameobject.anim.AnimationObjects; import daieditor.gameobject.scripts.ScriptArchData; -import daieditor.gui.GameObjectAttributesPanel; import daieditor.map.MapArchObject; import java.io.Serializable; import javax.swing.ImageIcon; import javax.swing.JList; import net.sf.gridarta.CFArchType; +import net.sf.gridarta.gui.GameObjectAttributesPanel; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -403,7 +403,7 @@ * @param mapanel the MapArchPanel * @xxx this method knows things it should never know, it is evil! */ - public void modifyEventScript(final int eventType, final int task, @NotNull final JList eventList, @NotNull final GameObjectAttributesPanel mapanel) { + public void modifyEventScript(final int eventType, final int task, @NotNull final JList eventList, @NotNull final GameObjectAttributesPanel<GameObject, MapArchObject, Archetype, ?, ?> mapanel) { scriptArchData.modifyEventScript(eventType, task, eventList); if (scriptArchData.isEmpty()) { @@ -411,14 +411,8 @@ } } - /** - * A popup is opened and the user can create a new scripting event which - * gets attached to this arch. - * @param eventList JList from the MapArchPanel (script tab) which displays - * the events - * @param mapanel the MapArchPanel - */ - public void addEventScript(@NotNull final JList eventList, @NotNull final GameObjectAttributesPanel mapanel) { + /** {@inheritDoc} */ + @Override public void addEventScript(@NotNull final JList eventList, @NotNull final GameObjectAttributesPanel<GameObject, MapArchObject, Archetype, ?, ?> mapanel) { scriptArchData.addEventScript(eventList, this); if (!scriptArchData.isEmpty()) { Modified: trunk/src/app/net/sf/gridarta/gameobject/GameObject.java =================================================================== --- trunk/src/app/net/sf/gridarta/gameobject/GameObject.java 2008-02-11 19:46:34 UTC (rev 3543) +++ trunk/src/app/net/sf/gridarta/gameobject/GameObject.java 2008-02-11 19:53:34 UTC (rev 3544) @@ -24,6 +24,7 @@ import java.util.regex.Pattern; import javax.swing.JList; import net.sf.gridarta.CFArchTypeList; +import net.sf.gridarta.gui.GameObjectAttributesPanel; import net.sf.gridarta.gui.GUIConstants; import net.sf.gridarta.map.MapArchObject; import net.sf.gridarta.map.MapSquare; @@ -1332,4 +1333,13 @@ */ public abstract boolean isScripted(); + /** + * A popup is opened and the user can create a new scripting event which + * gets attached to this arch. + * @param eventList JList from the MapArchPanel (script tab) which displays + * the events + * @param mapanel the MapArchPanel + */ + public abstract void addEventScript(@NotNull final JList eventList, @NotNull final GameObjectAttributesPanel<G, A, R, ?, ?> mapanel); + } // interface GameObject This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-02-11 19:57:19
|
Revision: 3545 http://gridarta.svn.sourceforge.net/gridarta/?rev=3545&view=rev Author: akirschbaum Date: 2008-02-11 11:56:39 -0800 (Mon, 11 Feb 2008) Log Message: ----------- Move GameObject.modifyEventScript() to common code base. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gameobject/GameObject.java trunk/daimonin/src/daieditor/gameobject/GameObject.java trunk/src/app/net/sf/gridarta/gameobject/GameObject.java Modified: trunk/crossfire/src/cfeditor/gameobject/GameObject.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2008-02-11 19:53:34 UTC (rev 3544) +++ trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2008-02-11 19:56:39 UTC (rev 3545) @@ -186,16 +186,7 @@ scriptArchData.addEventsToJList(list); } - /** - * If there is a scripted event of the specified type, the script pad is - * opened and the appropriate script displayed. - * @param eventType type of event - * @param task ID number for task (open script/ edit path/ remove) - * @param eventList JList from the MapArchPanel (script tab) which displays - * the events - * @param mapanel the MapArchPanel - * @xxx this method knows things it should never know, it is evil! - */ + /** {@inheritDoc} */ public void modifyEventScript(final int eventType, final int task, @NotNull final JList eventList, @NotNull final GameObjectAttributesPanel<GameObject, MapArchObject, Archetype, ?, ?> mapanel) { scriptArchData.modifyEventScript(eventType, task, eventList); Modified: trunk/daimonin/src/daieditor/gameobject/GameObject.java =================================================================== --- trunk/daimonin/src/daieditor/gameobject/GameObject.java 2008-02-11 19:53:34 UTC (rev 3544) +++ trunk/daimonin/src/daieditor/gameobject/GameObject.java 2008-02-11 19:56:39 UTC (rev 3545) @@ -393,17 +393,8 @@ scriptArchData.addEventsToJList(list); } - /** - * If there is a scripted event of the specified type, the script pad is - * opened and the appropriate script displayed. - * @param eventType type of event - * @param task ID number for task (open script/ edit path/ remove) - * @param eventList JList from the MapArchPanel (script tab) which displays - * the events - * @param mapanel the MapArchPanel - * @xxx this method knows things it should never know, it is evil! - */ - public void modifyEventScript(final int eventType, final int task, @NotNull final JList eventList, @NotNull final GameObjectAttributesPanel<GameObject, MapArchObject, Archetype, ?, ?> mapanel) { + /** {@inheritDoc} */ + @Override public void modifyEventScript(final int eventType, final int task, @NotNull final JList eventList, @NotNull final GameObjectAttributesPanel<GameObject, MapArchObject, Archetype, ?, ?> mapanel) { scriptArchData.modifyEventScript(eventType, task, eventList); if (scriptArchData.isEmpty()) { Modified: trunk/src/app/net/sf/gridarta/gameobject/GameObject.java =================================================================== --- trunk/src/app/net/sf/gridarta/gameobject/GameObject.java 2008-02-11 19:53:34 UTC (rev 3544) +++ trunk/src/app/net/sf/gridarta/gameobject/GameObject.java 2008-02-11 19:56:39 UTC (rev 3545) @@ -1334,6 +1334,18 @@ public abstract boolean isScripted(); /** + * If there is a scripted event of the specified type, the script pad is + * opened and the appropriate script displayed. + * @param eventType type of event + * @param task ID number for task (open script/ edit path/ remove) + * @param eventList JList from the MapArchPanel (script tab) which displays + * the events + * @param mapanel the MapArchPanel + * @xxx this method knows things it should never know, it is evil! + */ + public abstract void modifyEventScript(final int eventType, final int task, @NotNull final JList eventList, @NotNull final GameObjectAttributesPanel<G, A, R, ?, ?> mapanel); + + /** * A popup is opened and the user can create a new scripting event which * gets attached to this arch. * @param eventList JList from the MapArchPanel (script tab) which displays This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-02-11 20:00:20
|
Revision: 3546 http://gridarta.svn.sourceforge.net/gridarta/?rev=3546&view=rev Author: akirschbaum Date: 2008-02-11 12:00:06 -0800 (Mon, 11 Feb 2008) Log Message: ----------- Fix Javadoc issues. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gameobject/GameObject.java trunk/src/app/net/sf/gridarta/gui/GameObjectAttributesPanel.java trunk/src/app/net/sf/gridarta/gui/MainActions.java trunk/src/app/net/sf/gridarta/io/AbstractMapArchObjectParser.java trunk/src/app/net/sf/gridarta/map/AbstractMapArchObject.java Modified: trunk/crossfire/src/cfeditor/gameobject/GameObject.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2008-02-11 19:56:39 UTC (rev 3545) +++ trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2008-02-11 20:00:06 UTC (rev 3546) @@ -181,7 +181,7 @@ return false; } - /* {@inheritDoc} */ + /** {@inheritDoc} */ @Override public void addEventsToJList(@NotNull final JList list) { scriptArchData.addEventsToJList(list); } Modified: trunk/src/app/net/sf/gridarta/gui/GameObjectAttributesPanel.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/GameObjectAttributesPanel.java 2008-02-11 19:56:39 UTC (rev 3545) +++ trunk/src/app/net/sf/gridarta/gui/GameObjectAttributesPanel.java 2008-02-11 20:00:06 UTC (rev 3546) @@ -138,17 +138,17 @@ */ private final MapModelListener<G, A, R> mapModelListener = new MapModelListener<G, A, R>() { - /* {@inheritDoc} */ + /** {@inheritDoc} */ public void mapMetaChanged(@NotNull final A mapArchObject) { // ignore } - /* {@inheritDoc} */ + /** {@inheritDoc} */ public void mapSizeChanged(final MapModelEvent<G, A, R> e) { // ignore } - /* {@inheritDoc} */ + /** {@inheritDoc} */ public void mapSquaresChanged(final MapModelEvent<G, A, R> e) { if (selectedGameObject == null) { return; @@ -164,7 +164,7 @@ } } - /* {@inheritDoc} */ + /** {@inheritDoc} */ public void mapObjectsChanged(final MapModelEvent<G, A, R> e) { // ignore } Modified: trunk/src/app/net/sf/gridarta/gui/MainActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/MainActions.java 2008-02-11 19:56:39 UTC (rev 3545) +++ trunk/src/app/net/sf/gridarta/gui/MainActions.java 2008-02-11 20:00:06 UTC (rev 3546) @@ -135,13 +135,13 @@ */ private final MainControlListener<G, A, R, C, V> mainControlListener = new MainControlListener<G, A, R, C, V>() { - /* {@inheritDoc} */ + /** {@inheritDoc} */ public void currentMapChanged(@Nullable final C mapControl) { currentMap = mapControl; refreshMenus(); } - /* {@inheritDoc} */ + /** {@inheritDoc} */ public void currentMapViewChanged(@Nullable final MapView<G, A, R, C, V> mapView) { currentMapView = mapView; refreshMenus(); Modified: trunk/src/app/net/sf/gridarta/io/AbstractMapArchObjectParser.java =================================================================== --- trunk/src/app/net/sf/gridarta/io/AbstractMapArchObjectParser.java 2008-02-11 19:56:39 UTC (rev 3545) +++ trunk/src/app/net/sf/gridarta/io/AbstractMapArchObjectParser.java 2008-02-11 20:00:06 UTC (rev 3546) @@ -41,7 +41,7 @@ /** String which ends the message section. */ public static final String TAG_END_TEXT = "endmsg"; - /* {@inheritDoc} */ + /** {@inheritDoc} */ public void load(@NotNull final BufferedReader reader, @NotNull final A mapArchObject) throws IOException { int width = 0; int height = 0; Modified: trunk/src/app/net/sf/gridarta/map/AbstractMapArchObject.java =================================================================== --- trunk/src/app/net/sf/gridarta/map/AbstractMapArchObject.java 2008-02-11 19:56:39 UTC (rev 3545) +++ trunk/src/app/net/sf/gridarta/map/AbstractMapArchObject.java 2008-02-11 20:00:06 UTC (rev 3546) @@ -500,7 +500,7 @@ return msgText.toString(); } - /* {@inheritDoc} */ + /** {@inheritDoc} */ public void updateModifiedAttribute() { final String modifiedAttribute = MODIFIED_ATTRIBUTE + " " + String.format("%tF", System.currentTimeMillis()) + " " + prefs.get(AbstractMainControl.PREFS_USERNAME, AbstractMainControl.PREFS_USERNAME_DEFAULT); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-02-11 20:06:26
|
Revision: 3547 http://gridarta.svn.sourceforge.net/gridarta/?rev=3547&view=rev Author: akirschbaum Date: 2008-02-11 12:06:26 -0800 (Mon, 11 Feb 2008) Log Message: ----------- Move script panel to common code base. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java trunk/daimonin/src/daieditor/gui/GameObjectAttributesPanel.java trunk/src/app/net/sf/gridarta/gui/GameObjectAttributesPanel.java Modified: trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java 2008-02-11 20:00:06 UTC (rev 3546) +++ trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java 2008-02-11 20:06:26 UTC (rev 3547) @@ -36,10 +36,8 @@ import java.awt.Toolkit; import java.util.prefs.Preferences; import javax.swing.Action; -import javax.swing.DefaultListModel; import javax.swing.JButton; import javax.swing.JLabel; -import javax.swing.JList; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JSplitPane; @@ -115,16 +113,6 @@ private final Action aMapArchAttrib = ACTION_FACTORY.createAction(false, "mapArchAttrib", this); - private final Action aScriptAddNew = ACTION_FACTORY.createAction(false, "scriptAddNew", this); - - private final Action aScriptEditData = ACTION_FACTORY.createAction(false, "scriptEditData", this); - - private final Action aScriptEdit = ACTION_FACTORY.createAction(false, "scriptEdit", this); - - private final Action aScriptRemove = ACTION_FACTORY.createAction(false, "scriptRemove", this); - - private JList eventList; - private final GameObjectTextEditor gameObjectTextEditor; /* Build Panel */ @@ -156,7 +144,7 @@ panelDesktop.add(archPanel, "Arch"); panelDesktop.add(textPanel, "Msg Text"); - panelDesktop.add(createScriptPanel(), "Scripts"); + panelDesktop.add(scriptPanel, "Scripts"); panelDesktop.add(animationPanel, "Animation"); panelDesktop.add(connectionControl.getView(), "Connection"); panelDesktop.add(lockedItemsControl.getView(), "Locked Items"); @@ -357,41 +345,6 @@ return panel; } - /** - * Creates a script panel. - * @return newly created script panel. - */ - private JPanel createScriptPanel() { - eventList = new JList(); - - // create ScrollPane for jlist scrolling - final JScrollPane ssa = new JScrollPane(eventList); - ssa.setBorder(new EtchedBorder()); - ssa.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); - ssa.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); - ssa.setPreferredSize(new Dimension(80, 40)); - - // create buttons - final JPanel grid = new JPanel(new GridLayout(4, 1)); - grid.add(new JButton(aScriptAddNew)); - grid.add(new JButton(aScriptEditData)); - grid.add(new JButton(aScriptEdit)); - grid.add(new JButton(aScriptRemove)); - - // disable all the buttons in the beginning - aScriptAddNew.setEnabled(false); - aScriptEditData.setEnabled(false); - aScriptEdit.setEnabled(false); - aScriptRemove.setEnabled(false); - - final JPanel scriptPanel = new JPanel(); // new panel - scriptPanel.setLayout(new BorderLayout()); - scriptPanel.add(ssa, BorderLayout.CENTER); - scriptPanel.add(grid, BorderLayout.EAST); - scriptPanel.setPreferredSize(new Dimension(100, 40)); - return scriptPanel; - } - private JPanel createButtonPanel() { final JPanel buttonPanel = new JPanel(); buttonPanel.add(new JButton(aMapArchApply)); @@ -400,26 +353,6 @@ return buttonPanel; } - /** Action method for creating a new Script. */ - @ActionMethod public void scriptAddNew() { - addNewScriptWanted(); - } - - /** Action method for editing the data of an existing Script. */ - @ActionMethod public void scriptEditData() { - editScriptWanted(SCRIPT_EDIT_PATH); - } - - /** Action method for editing an existing Script. */ - @ActionMethod public void scriptEdit() { - editScriptWanted(SCRIPT_OPEN); - } - - /** Action method for removing an existing script. */ - @ActionMethod public void scriptRemove() { - editScriptWanted(SCRIPT_REMOVE); - } - public void appExitNotify() { prefs.putInt(MAPARCHPANEL_LOCATION_KEY, splitPane.getDividerLocation()); } @@ -539,82 +472,6 @@ } } - /** - * Refresh the "Scripts" tab in the Game Object Attributes Panel. - * - * @param gameObject The game object to set the contents from. - */ - private void refreshScriptsTab(final GameObject gameObject) - { - if (gameObject == null || !gameObject.isScripted()) { - panelDesktop.setForegroundAt(2, Color.black); - if (eventList.getModel() != null && eventList.getModel().getSize() > 0) { - eventList.setModel(new DefaultListModel()); - } - - aScriptAddNew.setEnabled(gameObject != null); - aScriptEditData.setEnabled(false); - aScriptEdit.setEnabled(false); - aScriptRemove.setEnabled(false); - } else { - panelDesktop.setForegroundAt(2, Color.blue); - eventList.removeAll(); - gameObject.addEventsToJList(eventList); - - aScriptAddNew.setEnabled(true); - aScriptEditData.setEnabled(true); - aScriptEdit.setEnabled(true); - aScriptRemove.setEnabled(true); - } - } - - /** - * This method is invoked when the user pressed the "edit - * script"/"path"/"remove" button from the script panel. If there is a - * valid selection in the event list, the appropriate action for this - * script is triggered. - * @param task Script type to edit (?). - */ - public void editScriptWanted(final int task) { - final GameObject gameObject = mainControl.getMainView().getSelectedSquareControl().getSelectedSquareView().getMapTileSelection(); // get selected gameObject - if (gameObject == null) { - return; - } - - // check for a valid selection in the event list - if (eventList.getModel() != null && eventList.getModel().getSize() > 0 && eventList.getSelectedIndex() >= 0) { - // there - final int index = eventList.getSelectedIndex(); - if (index >= 0) { - final MapSquare<GameObject, MapArchObject, Archetype> mapSquare = gameObject.getMapSquare(); - assert mapSquare != null; - mapSquare.getModel().beginTransaction("Modify event script"); - gameObject.getHead().modifyEventScript(index, task, eventList, this); - mapSquare.getModel().endTransaction(); - } - } - } - - /** This method is invoked when the user pressed the "new script" button. */ - public void addNewScriptWanted() { - final GameObject gameObject = mainControl.getMainView().getSelectedSquareControl().getSelectedSquareView().getMapTileSelection(); // get selected arch - if (gameObject != null) { - final MapSquare<GameObject, MapArchObject, Archetype> mapSquare = gameObject.getHead().getMapSquare(); - assert mapSquare != null; - mapSquare.getModel().beginTransaction("Add event script"); - gameObject.getHead().addEventScript(eventList, this); - mapSquare.getModel().endTransaction(); - } - } - - /** {@inheritDoc} */ - @Override public void setScriptPanelButtonState(final boolean newButton, final boolean modifyButton, final boolean pathButton, final boolean removeButton) { - aScriptAddNew.setEnabled(newButton); - aScriptEditData.setEnabled(pathButton); - aScriptEdit.setEnabled(modifyButton); - aScriptRemove.setEnabled(removeButton); - } - // calculate default value in case there is no settings file private static int getMapArchPanelLocation() { final Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); Modified: trunk/daimonin/src/daieditor/gui/GameObjectAttributesPanel.java =================================================================== --- trunk/daimonin/src/daieditor/gui/GameObjectAttributesPanel.java 2008-02-11 20:00:06 UTC (rev 3546) +++ trunk/daimonin/src/daieditor/gui/GameObjectAttributesPanel.java 2008-02-11 20:06:26 UTC (rev 3547) @@ -37,10 +37,8 @@ import java.util.prefs.Preferences; import javax.swing.Action; import javax.swing.ButtonGroup; -import javax.swing.DefaultListModel; import javax.swing.JButton; import javax.swing.JLabel; -import javax.swing.JList; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JSplitPane; @@ -125,16 +123,6 @@ private final Action aMapArchAttrib = ACTION_FACTORY.createAction(false, "mapArchAttrib", this); - private final Action aScriptAddNew = ACTION_FACTORY.createAction(false, "scriptAddNew", this); - - private final Action aScriptEditData = ACTION_FACTORY.createAction(false, "scriptEditData", this); - - private final Action aScriptEdit = ACTION_FACTORY.createAction(false, "scriptEdit", this); - - private final Action aScriptRemove = ACTION_FACTORY.createAction(false, "scriptRemove", this); - - private JList eventList; - private final GameObjectTextEditor gameObjectTextEditor; /* Build Panel */ @@ -166,7 +154,7 @@ panelDesktop.add(archPanel, "Arch"); panelDesktop.add(textPanel, "Msg Text"); - panelDesktop.add(createScriptPanel(), "Scripts"); + panelDesktop.add(scriptPanel, "Scripts"); panelDesktop.add(animationPanel, "Animation"); panelDesktop.add(connectionControl.getView(), "Connection"); panelDesktop.add(lockedItemsControl.getView(), "Locked Items"); @@ -469,41 +457,6 @@ directionButtons[direction] = button; } - /** - * Creates a script panel. - * @return newly created script panel. - */ - private JPanel createScriptPanel() { - eventList = new JList(); - - // create ScrollPane for jlist scrolling - final JScrollPane ssa = new JScrollPane(eventList); - ssa.setBorder(new EtchedBorder()); - ssa.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); - ssa.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); - ssa.setPreferredSize(new Dimension(80, 40)); - - // create buttons - final JPanel grid = new JPanel(new GridLayout(4, 1)); - grid.add(new JButton(aScriptAddNew)); - grid.add(new JButton(aScriptEditData)); - grid.add(new JButton(aScriptEdit)); - grid.add(new JButton(aScriptRemove)); - - // disable all the buttons in the beginning - aScriptAddNew.setEnabled(false); - aScriptEditData.setEnabled(false); - aScriptEdit.setEnabled(false); - aScriptRemove.setEnabled(false); - - final JPanel scriptPanel = new JPanel(); // new panel - scriptPanel.setLayout(new BorderLayout()); - scriptPanel.add(ssa, BorderLayout.CENTER); - scriptPanel.add(grid, BorderLayout.EAST); - scriptPanel.setPreferredSize(new Dimension(100, 40)); - return scriptPanel; - } - private JPanel createButtonPanel() { final JPanel buttonPanel = new JPanel(); buttonPanel.add(new JButton(aMapArchApply)); @@ -512,26 +465,6 @@ return buttonPanel; } - /** Action method for creating a new Script. */ - @ActionMethod public void scriptAddNew() { - addNewScriptWanted(); - } - - /** Action method for editing the data of an existing Script. */ - @ActionMethod public void scriptEditData() { - editScriptWanted(SCRIPT_EDIT_PATH); - } - - /** Action method for editing an existing Script. */ - @ActionMethod public void scriptEdit() { - editScriptWanted(SCRIPT_OPEN); - } - - /** Action method for removing an existing script. */ - @ActionMethod public void scriptRemove() { - editScriptWanted(SCRIPT_REMOVE); - } - public void appExitNotify() { prefs.putInt(MAPARCHPANEL_LOCATION_KEY, splitPane.getDividerLocation()); } @@ -669,82 +602,6 @@ directionButtons[direction < directionButtons.length ? direction : 0].setSelected(true); } - /** - * Refresh the "Scripts" tab in the Game Object Attributes Panel. - * - * @param gameObject The game object to set the contents from. - */ - private void refreshScriptsTab(final GameObject gameObject) - { - if (gameObject == null || !gameObject.isScripted()) { - panelDesktop.setForegroundAt(2, Color.black); - if (eventList.getModel() != null && eventList.getModel().getSize() > 0) { - eventList.setModel(new DefaultListModel()); - } - - aScriptAddNew.setEnabled(gameObject != null); - aScriptEditData.setEnabled(false); - aScriptEdit.setEnabled(false); - aScriptRemove.setEnabled(false); - } else { - panelDesktop.setForegroundAt(2, Color.blue); - eventList.removeAll(); - gameObject.addEventsToJList(eventList); - - aScriptAddNew.setEnabled(true); - aScriptEditData.setEnabled(true); - aScriptEdit.setEnabled(true); - aScriptRemove.setEnabled(true); - } - } - - /** - * This method is invoked when the user pressed the "edit - * script"/"path"/"remove" button from the script panel. If there is a - * valid selection in the event list, the appropriate action for this - * script is triggered. - * @param task Script type to edit (?). - */ - public void editScriptWanted(final int task) { - final GameObject gameObject = mainControl.getMainView().getSelectedSquareControl().getSelectedSquareView().getMapTileSelection(); // get selected gameObject - if (gameObject == null) { - return; - } - - // check for a valid selection in the event list - if (eventList.getModel() != null && eventList.getModel().getSize() > 0 && eventList.getSelectedIndex() >= 0) { - // there - final int index = eventList.getSelectedIndex(); - if (index >= 0) { - final MapSquare<GameObject, MapArchObject, Archetype> mapSquare = gameObject.getMapSquare(); - assert mapSquare != null; - mapSquare.getModel().beginTransaction("Modify event script"); - gameObject.getHead().modifyEventScript(index, task, eventList, this); - mapSquare.getModel().endTransaction(); - } - } - } - - /** This method is invoked when the user pressed the "new script" button. */ - public void addNewScriptWanted() { - final GameObject gameObject = mainControl.getMainView().getSelectedSquareControl().getSelectedSquareView().getMapTileSelection(); // get selected arch - if (gameObject != null) { - final MapSquare<GameObject, MapArchObject, Archetype> mapSquare = gameObject.getHead().getMapSquare(); - assert mapSquare != null; - mapSquare.getModel().beginTransaction("Add event script"); - gameObject.getHead().addEventScript(eventList, this); - mapSquare.getModel().endTransaction(); - } - } - - /** {@inheritDoc} */ - @Override public void setScriptPanelButtonState(final boolean newButton, final boolean modifyButton, final boolean pathButton, final boolean removeButton) { - aScriptAddNew.setEnabled(newButton); - aScriptEditData.setEnabled(pathButton); - aScriptEdit.setEnabled(modifyButton); - aScriptRemove.setEnabled(removeButton); - } - // calculate default value in case there is no settings file private static int getMapArchPanelLocation() { final Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); Modified: trunk/src/app/net/sf/gridarta/gui/GameObjectAttributesPanel.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/GameObjectAttributesPanel.java 2008-02-11 20:00:06 UTC (rev 3546) +++ trunk/src/app/net/sf/gridarta/gui/GameObjectAttributesPanel.java 2008-02-11 20:06:26 UTC (rev 3547) @@ -21,8 +21,13 @@ import java.awt.BorderLayout; import java.awt.Color; +import java.awt.Dimension; import java.awt.GridLayout; +import javax.swing.Action; +import javax.swing.DefaultListModel; +import javax.swing.JButton; import javax.swing.JLabel; +import javax.swing.JList; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTabbedPane; @@ -41,6 +46,8 @@ import net.sf.gridarta.map.MapModelEvent; import net.sf.gridarta.map.MapModelListener; import net.sf.gridarta.map.MapSquare; +import net.sf.japi.swing.ActionFactory; +import net.sf.japi.swing.ActionMethod; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -57,6 +64,17 @@ public static final int SCRIPT_REMOVE = 2; + /** Action Factory. */ + private static final ActionFactory ACTION_FACTORY = ActionFactory.getFactory("net.sf.gridarta"); + + private final Action aScriptAddNew = ACTION_FACTORY.createAction(false, "scriptAddNew", this); + + private final Action aScriptEditData = ACTION_FACTORY.createAction(false, "scriptEditData", this); + + private final Action aScriptEdit = ACTION_FACTORY.createAction(false, "scriptEdit", this); + + private final Action aScriptRemove = ACTION_FACTORY.createAction(false, "scriptRemove", this); + /** * The label that displays the current animation name. */ @@ -68,6 +86,11 @@ protected final JPanel animationPanel = createAnimationPanel(); /** + * The Panel that displays scripting information. + */ + protected final JPanel scriptPanel = createScriptPanel(); + + /** * The MainControl to use, e.g. for accessing AnimationObjects. */ private final MainControl<G, A, R, C, V> mainControl; @@ -90,6 +113,8 @@ /** Arch text field. */ private final JTextArea archTextArea = new JTextArea(4, 25); + protected JList eventList; + /** * The main control listener which is attached to {@link #mainControl}. */ @@ -355,12 +380,140 @@ } /** + * Creates a script panel. + * @return newly created script panel. + */ + private JPanel createScriptPanel() { + eventList = new JList(); + + // create ScrollPane for jlist scrolling + final JScrollPane ssa = new JScrollPane(eventList); + ssa.setBorder(new EtchedBorder()); + ssa.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); + ssa.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); + ssa.setPreferredSize(new Dimension(80, 40)); + + // create buttons + final JPanel grid = new JPanel(new GridLayout(4, 1)); + grid.add(new JButton(aScriptAddNew)); + grid.add(new JButton(aScriptEditData)); + grid.add(new JButton(aScriptEdit)); + grid.add(new JButton(aScriptRemove)); + + // disable all the buttons in the beginning + aScriptAddNew.setEnabled(false); + aScriptEditData.setEnabled(false); + aScriptEdit.setEnabled(false); + aScriptRemove.setEnabled(false); + + final JPanel scriptPanel = new JPanel(); // new panel + scriptPanel.setLayout(new BorderLayout()); + scriptPanel.add(ssa, BorderLayout.CENTER); + scriptPanel.add(grid, BorderLayout.EAST); + scriptPanel.setPreferredSize(new Dimension(100, 40)); + return scriptPanel; + } + + /** + * Refresh the "Scripts" tab in the Game Object Attributes Panel. + * + * @param gameObject The game object to set the contents from. + */ + protected void refreshScriptsTab(final GameObject gameObject) + { + if (gameObject == null || !gameObject.isScripted()) { + panelDesktop.setForegroundAt(2, Color.black); + if (eventList.getModel() != null && eventList.getModel().getSize() > 0) { + eventList.setModel(new DefaultListModel()); + } + + aScriptAddNew.setEnabled(gameObject != null); + aScriptEditData.setEnabled(false); + aScriptEdit.setEnabled(false); + aScriptRemove.setEnabled(false); + } else { + panelDesktop.setForegroundAt(2, Color.blue); + eventList.removeAll(); + gameObject.addEventsToJList(eventList); + + aScriptAddNew.setEnabled(true); + aScriptEditData.setEnabled(true); + aScriptEdit.setEnabled(true); + aScriptRemove.setEnabled(true); + } + } + + /** * Set enable/disable states for the four buttons in the script panel. * @param newButton Enabled state for the "new" button. * @param modifyButton Enabled state for the "modify" button. * @param pathButton Enabled state for the "path" button. * @param removeButton Enabled state for the "remove" button. */ - public abstract void setScriptPanelButtonState(final boolean newButton, final boolean modifyButton, final boolean pathButton, final boolean removeButton); + public void setScriptPanelButtonState(final boolean newButton, final boolean modifyButton, final boolean pathButton, final boolean removeButton) { + aScriptAddNew.setEnabled(newButton); + aScriptEditData.setEnabled(pathButton); + aScriptEdit.setEnabled(modifyButton); + aScriptRemove.setEnabled(removeButton); + } + /** Action method for creating a new Script. */ + @ActionMethod public void scriptAddNew() { + addNewScriptWanted(); + } + + /** Action method for editing the data of an existing Script. */ + @ActionMethod public void scriptEditData() { + editScriptWanted(SCRIPT_EDIT_PATH); + } + + /** Action method for editing an existing Script. */ + @ActionMethod public void scriptEdit() { + editScriptWanted(SCRIPT_OPEN); + } + + /** Action method for removing an existing script. */ + @ActionMethod public void scriptRemove() { + editScriptWanted(SCRIPT_REMOVE); + } + + /** This method is invoked when the user pressed the "new script" button. */ + public void addNewScriptWanted() { + final G gameObject = mainControl.getMainView().getSelectedSquareControl().getSelectedSquareView().getMapTileSelection(); // get selected arch + if (gameObject != null) { + final MapSquare<G, A, R> mapSquare = gameObject.getHead().getMapSquare(); + assert mapSquare != null; + mapSquare.getModel().beginTransaction("Add event script"); + gameObject.getHead().addEventScript(eventList, this); + mapSquare.getModel().endTransaction(); + } + } + + /** + * This method is invoked when the user pressed the "edit + * script"/"path"/"remove" button from the script panel. If there is a + * valid selection in the event list, the appropriate action for this + * script is triggered. + * @param task Script type to edit (?). + */ + public void editScriptWanted(final int task) { + final G gameObject = mainControl.getMainView().getSelectedSquareControl().getSelectedSquareView().getMapTileSelection(); // get selected gameObject + if (gameObject == null) { + return; + } + + // check for a valid selection in the event list + if (eventList.getModel() != null && eventList.getModel().getSize() > 0 && eventList.getSelectedIndex() >= 0) { + // there + final int index = eventList.getSelectedIndex(); + if (index >= 0) { + final MapSquare<G, A, R> mapSquare = gameObject.getMapSquare(); + assert mapSquare != null; + mapSquare.getModel().beginTransaction("Modify event script"); + gameObject.getHead().modifyEventScript(index, task, eventList, this); + mapSquare.getModel().endTransaction(); + } + } + } + } // class GameObjectAttributesPanel This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-02-13 09:11:55
|
Revision: 3562 http://gridarta.svn.sourceforge.net/gridarta/?rev=3562&view=rev Author: akirschbaum Date: 2008-02-13 01:11:13 -0800 (Wed, 13 Feb 2008) Log Message: ----------- Move hard-coded special treasure lists from code into TreasureLists.xml config file. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CFJavaEditor.java trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/gui/GameObjectAttributesDialog.java trunk/daimonin/src/daieditor/CMainControl.java trunk/daimonin/src/daieditor/DaimoninEditor.java trunk/daimonin/src/daieditor/gui/GameObjectAttributesDialog.java trunk/src/app/net/sf/gridarta/treasurelist/CFTreasureListTree.java Added Paths: ----------- trunk/crossfire/resource/conf/TreasureLists.dtd trunk/crossfire/resource/conf/TreasureLists.xml Removed Paths: ------------- trunk/crossfire/src/cfeditor/CFTreasureListTree.java trunk/daimonin/src/daieditor/CFTreasureListTree.java Added: trunk/crossfire/resource/conf/TreasureLists.dtd =================================================================== --- trunk/crossfire/resource/conf/TreasureLists.dtd (rev 0) +++ trunk/crossfire/resource/conf/TreasureLists.dtd 2008-02-13 09:11:13 UTC (rev 3562) @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!ELEMENT lists (list*)> + +<!ELEMENT list (entry+)> +<!ATTLIST list + name CDATA #REQUIRED +> + +<!ELEMENT entry (#PCDATA)> +<!ATTLIST entry + name CDATA #REQUIRED +> Property changes on: trunk/crossfire/resource/conf/TreasureLists.dtd ___________________________________________________________________ Name: svn:mime-type + text/xml Name: svn:eol-style + LF Added: trunk/crossfire/resource/conf/TreasureLists.xml =================================================================== --- trunk/crossfire/resource/conf/TreasureLists.xml (rev 0) +++ trunk/crossfire/resource/conf/TreasureLists.xml 2008-02-13 09:11:13 UTC (rev 3562) @@ -0,0 +1,39 @@ +<?xml version="1.0"?> +<!DOCTYPE lists SYSTEM "TreasureLists.dtd"> +<lists> + <list name="God Intervention"> + <entry name="Devourers"/> + <entry name="Gaea"/> + <entry name="Gnarg"/> + <entry name="Gorokh"/> + <entry name="Ixalovh"/> + <entry name="Lythander"/> + <entry name="Mostrai"/> + <entry name="Ruggilli"/> + <entry name="Sorig"/> + <entry name="Valkyrie"/> + <entry name="Valriel"/> + </list> + <list name="Dragon Player Evolution"> + <entry name="dragon_ability_cold"/> + <entry name="dragon_ability_elec"/> + <entry name="dragon_ability_fire"/> + <entry name="dragon_ability_poison"/> + </list> + <list name="Player Creation"> + <entry name="dragon_player_items"/> + <entry name="dwarf_player_items"/> + <entry name="elf_player_items"/> + <entry name="fenx_player_items"/> + <entry name="fireborn_player_items"/> + <entry name="gnome_player_items"/> + <entry name="half_orc_player_items"/> + <entry name="halfling_player_items"/> + <entry name="human_player_items"/> + <entry name="northman_player_items"/> + <entry name="quetzalcoatl_player_items"/> + <entry name="serpentman_player_items"/> + <entry name="troll_player_items"/> + <entry name="wraith_player_items"/> + </list> +</lists> Property changes on: trunk/crossfire/resource/conf/TreasureLists.xml ___________________________________________________________________ Name: svn:mime-type + text/xml Name: svn:eol-style + LF Modified: trunk/crossfire/src/cfeditor/CFJavaEditor.java =================================================================== --- trunk/crossfire/src/cfeditor/CFJavaEditor.java 2008-02-12 06:57:41 UTC (rev 3561) +++ trunk/crossfire/src/cfeditor/CFJavaEditor.java 2008-02-13 09:11:13 UTC (rev 3562) @@ -131,7 +131,14 @@ System.err.println("Running java version " + System.getProperty("java.version")); // Create the application and give it the parameters - final CMainControl mainControl = new CMainControl(); + final CMainControl mainControl; + try { + mainControl = new CMainControl(); + } catch (final RuntimeException ex) { + log.fatal(ex.getMessage()); + System.exit(1); + throw new AssertionError(); + } // Initialise the application System.gc(); Deleted: trunk/crossfire/src/cfeditor/CFTreasureListTree.java =================================================================== --- trunk/crossfire/src/cfeditor/CFTreasureListTree.java 2008-02-12 06:57:41 UTC (rev 3561) +++ trunk/crossfire/src/cfeditor/CFTreasureListTree.java 2008-02-13 09:11:13 UTC (rev 3562) @@ -1,98 +0,0 @@ -/* - * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. - * Copyright (C) 2000-2007 The Gridarta Developers. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -package cfeditor; - -import cfeditor.gameobject.Archetype; -import cfeditor.gameobject.ArchetypeSet; -import cfeditor.gameobject.GameObject; -import cfeditor.map.MapArchObject; -import java.util.HashMap; -import java.util.Map; -import net.sf.gridarta.AbstractMainControl; -import net.sf.gridarta.treasurelist.TreasureLocation; -import net.sf.gridarta.treasurelist.TreasureObj; -import net.sf.gridarta.treasurelist.TreasureTreeNode; -import org.jetbrains.annotations.NotNull; - -/** - * The CFTreasureListTree class fully manages treasurelists. - * CF datafile "treasures" gets parsed into a JTree structure. - * @author Andreas Vogl - * @todo don't extend JTree, instead create a proper model - */ -public final class CFTreasureListTree extends net.sf.gridarta.treasurelist.CFTreasureListTree<GameObject, MapArchObject, Archetype> { - - /** The serial version UID. */ - private static final long serialVersionUID = 1; - - /** - * Construct an empty instance of this object. - * - * @param archetypeSet ArchetypeSet to get treasures from. - */ - public CFTreasureListTree(@NotNull final ArchetypeSet archetypeSet) { - super(archetypeSet, new TreasureLocation(AbstractMainControl.getInstance().getConfigurationDirectory(), IGUIConstants.TREASURES_FILE)); - } - - /** {@inheritDoc} */ - @NotNull protected Map<String, TreasureTreeNode> getSpecialTreasureLists() { - final Map<String, TreasureTreeNode> specialTreasureLists = new HashMap<String, TreasureTreeNode>(); - - final TreasureTreeNode godFolder = new TreasureTreeNode("God Intervention", TreasureObj.FOLDER); - root.add(godFolder); - final TreasureTreeNode dragonFolder = new TreasureTreeNode("Dragon Player Evolution", TreasureObj.FOLDER); - root.add(dragonFolder); - final TreasureTreeNode playerFolder = new TreasureTreeNode("Player Creation", TreasureObj.FOLDER); - root.add(playerFolder); - - specialTreasureLists.put("Valriel", godFolder); - specialTreasureLists.put("Gorokh", godFolder); - specialTreasureLists.put("Devourers", godFolder); - specialTreasureLists.put("Sorig", godFolder); - specialTreasureLists.put("Ruggilli", godFolder); - specialTreasureLists.put("Ixalovh", godFolder); - specialTreasureLists.put("Gaea", godFolder); - specialTreasureLists.put("Valkyrie", godFolder); - specialTreasureLists.put("Mostrai", godFolder); - specialTreasureLists.put("Lythander", godFolder); - specialTreasureLists.put("Gnarg", godFolder); - specialTreasureLists.put("dragon_ability_fire", dragonFolder); - specialTreasureLists.put("dragon_ability_cold", dragonFolder); - specialTreasureLists.put("dragon_ability_elec", dragonFolder); - specialTreasureLists.put("dragon_ability_poison", dragonFolder); - specialTreasureLists.put("troll_player_items", playerFolder); - specialTreasureLists.put("gnome_player_items", playerFolder); - specialTreasureLists.put("halfling_player_items", playerFolder); - specialTreasureLists.put("human_player_items", playerFolder); - specialTreasureLists.put("dwarf_player_items", playerFolder); - specialTreasureLists.put("half_orc_player_items", playerFolder); - specialTreasureLists.put("elf_player_items", playerFolder); - specialTreasureLists.put("fenx_player_items", playerFolder); - specialTreasureLists.put("wraith_player_items", playerFolder); - specialTreasureLists.put("northman_player_items", playerFolder); - specialTreasureLists.put("fireborn_player_items", playerFolder); - specialTreasureLists.put("quetzalcoatl_player_items", playerFolder); - specialTreasureLists.put("dragon_player_items", playerFolder); - specialTreasureLists.put("serpentman_player_items", playerFolder); - - return specialTreasureLists; - } - -} // class CFTreasureListTree Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2008-02-12 06:57:41 UTC (rev 3561) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2008-02-13 09:11:13 UTC (rev 3562) @@ -44,6 +44,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; +import java.util.MissingResourceException; import java.util.prefs.Preferences; import javax.swing.ImageIcon; import javax.swing.JFileChooser; @@ -94,6 +95,8 @@ import net.sf.gridarta.spells.NumberSpell; import net.sf.gridarta.spells.Spells; import net.sf.gridarta.textedit.scripteditor.ScriptEditControl; +import net.sf.gridarta.treasurelist.CFTreasureListTree; +import net.sf.gridarta.treasurelist.TreasureLocation; import net.sf.japi.swing.ActionFactory; import net.sf.japi.swing.ActionMethod; import net.sf.japi.swing.misc.Progress; @@ -106,6 +109,8 @@ import org.apache.log4j.Logger; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.w3c.dom.Document; +import org.xml.sax.SAXException; /** * The main controller of the level editor. Basically the main application. @@ -232,7 +237,7 @@ private JFileChooser fileChooser; /** The treasure lists. */ - private final CFTreasureListTree treasureListTree; + private final CFTreasureListTree<GameObject, MapArchObject, Archetype> treasureListTree; /** The recent menu manager. */ private final RecentManager recentManager; @@ -248,6 +253,8 @@ /** * Constructs the main controller and its model and view. + * + * @throws RuntimeException If the controller cannot be initialized. */ public CMainControl() { super(new CrossfireObjectsFactory()); @@ -274,12 +281,14 @@ archetypeSet.loadArchetypes(archetypeParser); // load the list with archtype-data from "types.xml" + final XmlHelper xmlHelper; try { - final XmlHelper xmlHelper = new XmlHelper(mainView); - typeList = new CFArchTypeList(xmlHelper.getDocumentBuilder(), xmlHelper.getXPath()); + xmlHelper = new XmlHelper(mainView); } catch (final ParserConfigurationException ex) { log.error("Cannot create XML parser: " + ex.getMessage()); + throw new MissingResourceException("Cannot create XML parser: " + ex.getMessage(), null, null); } + typeList = new CFArchTypeList(xmlHelper.getDocumentBuilder(), xmlHelper.getXPath()); new ArchetypeSetSpellLoader().load(archetypeSet, Archetype.TYPE_SPELL, gameObjectSpells); try { final String filename = IOUtils.getResourceURLAsString(getConfigurationDirectory(), "GameObjectMatchers.xml"); @@ -351,7 +360,19 @@ if (archetypeSet.getLoadStatus() != ArchetypeSet.LoadStatus.EMPTY) { mainView.getObjectChooser().getPickmapChooserControl().loadPickmaps(false); } - treasureListTree = new CFTreasureListTree(archetypeSet); + final Document specialTreasureListsDocument; + try { + specialTreasureListsDocument = xmlHelper.getDocumentBuilder().parse(IOUtils.getResourceURLAsString(getConfigurationDirectory(), "TreasureLists.xml")); + treasureListTree = new CFTreasureListTree<GameObject, MapArchObject, Archetype>(archetypeSet, specialTreasureListsDocument, + new TreasureLocation(getConfigurationDirectory(), IGUIConstants.TREASURES_FILE) + ); + } catch (final IOException ex) { + log.fatal("Cannot read TreasureLists.xml: " + ex.getMessage()); + throw new MissingResourceException("Cannot read TreasureLists.xml: " + ex.getMessage(), null, "TreasureLists.xml"); + } catch (final SAXException ex) { + log.fatal("Cannot read TreasureLists.xml: " + ex.getMessage()); + throw new MissingResourceException("Cannot read TreasureLists.xml: " + ex.getMessage(), null, "TreasureLists.xml"); + } recentManager.initRecent(); validators = createMapValidators(); autoValidator = new AutoValidator<GameObject, MapArchObject, Archetype, MapControl, CMapViewBasic>(this, PREFS_VALIDATOR_AUTO_DEFAULT); Modified: trunk/crossfire/src/cfeditor/gui/GameObjectAttributesDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/GameObjectAttributesDialog.java 2008-02-12 06:57:41 UTC (rev 3561) +++ trunk/crossfire/src/cfeditor/gui/GameObjectAttributesDialog.java 2008-02-13 09:11:13 UTC (rev 3562) @@ -19,7 +19,6 @@ package cfeditor.gui; -import cfeditor.CFTreasureListTree; import cfeditor.CMapViewBasic; import cfeditor.gameobject.Archetype; import cfeditor.gameobject.GameObject; @@ -46,6 +45,7 @@ import net.sf.gridarta.spells.NumberSpell; import net.sf.gridarta.spells.Spell; import net.sf.gridarta.spells.Spells; +import net.sf.gridarta.treasurelist.CFTreasureListTree; import net.sf.japi.swing.ActionFactory; import org.jetbrains.annotations.NotNull; Deleted: trunk/daimonin/src/daieditor/CFTreasureListTree.java =================================================================== --- trunk/daimonin/src/daieditor/CFTreasureListTree.java 2008-02-12 06:57:41 UTC (rev 3561) +++ trunk/daimonin/src/daieditor/CFTreasureListTree.java 2008-02-13 09:11:13 UTC (rev 3562) @@ -1,58 +0,0 @@ -/* - * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. - * Copyright (C) 2000-2007 The Gridarta Developers. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -package daieditor; - -import daieditor.gameobject.Archetype; -import daieditor.gameobject.ArchetypeSet; -import daieditor.gameobject.GameObject; -import daieditor.map.MapArchObject; -import java.util.HashMap; -import java.util.Map; -import net.sf.gridarta.AbstractMainControl; -import net.sf.gridarta.treasurelist.TreasureLocation; -import net.sf.gridarta.treasurelist.TreasureTreeNode; -import org.jetbrains.annotations.NotNull; - -/** - * The CFTreasureListTree class fully manages treasurelists. - * CF datafile "treasures" gets parsed into a JTree structure. - * @author Andreas Vogl - * @todo don't extend JTree, instead create a proper model - */ -public final class CFTreasureListTree extends net.sf.gridarta.treasurelist.CFTreasureListTree<GameObject, MapArchObject, Archetype> { - - /** The serial version UID. */ - private static final long serialVersionUID = 1; - - /** - * Construct an empty instance of this object. - * - * @param archetypeSet ArchetypeSet to get treasures from. - */ - public CFTreasureListTree(@NotNull final ArchetypeSet archetypeSet) { - super(archetypeSet, new TreasureLocation(AbstractMainControl.getInstance().getArchDefaultFolder(), IGUIConstants.TREASURES_FILE), new TreasureLocation(AbstractMainControl.getInstance().getMapDefaultFolder(), null)); - } - - /** {@inheritDoc} */ - @NotNull protected Map<String, TreasureTreeNode> getSpecialTreasureLists() { - return new HashMap<String, TreasureTreeNode>(); - } - -} // class CFTreasureListTree Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2008-02-12 06:57:41 UTC (rev 3561) +++ trunk/daimonin/src/daieditor/CMainControl.java 2008-02-13 09:11:13 UTC (rev 3562) @@ -112,6 +112,8 @@ import net.sf.gridarta.spells.Spells; import net.sf.gridarta.spells.XMLSpellLoader; import net.sf.gridarta.textedit.scripteditor.ScriptEditControl; +import net.sf.gridarta.treasurelist.CFTreasureListTree; +import net.sf.gridarta.treasurelist.TreasureLocation; import net.sf.japi.swing.ActionFactory; import net.sf.japi.swing.ActionMethod; import net.sf.japi.swing.misc.Progress; @@ -126,6 +128,8 @@ import org.apache.log4j.Logger; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.w3c.dom.Document; +import org.xml.sax.SAXException; /** * The main controller of the level editor. Basically the main application. @@ -288,7 +292,7 @@ private JFileChooser fileChooser; /** The treasure lists. */ - private final CFTreasureListTree treasureListTree; + private final CFTreasureListTree<GameObject, MapArchObject, Archetype> treasureListTree; /** The recent menu manager. */ private final RecentManager recentManager; @@ -301,6 +305,8 @@ /** * Constructs the main controller and its model and view. + * + * @throws RuntimeException If the controller cannot be initialized. */ public CMainControl() { super(new DaimoninObjectsFactory()); @@ -330,13 +336,15 @@ archetypeSet.loadArchetypes(archetypeParser); // load the list with archtype-data from "types.xml" + final XmlHelper xmlHelper; try { - final XmlHelper xmlHelper = new XmlHelper(mainView); - typeList = new CFArchTypeList(xmlHelper.getDocumentBuilder(), xmlHelper.getXPath()); - new XMLSpellLoader().load(AbstractMainControl.getInstance().getConfigurationDirectory(), CommonConstants.SPELL_FILE, xmlHelper.getDocumentBuilder(), numberSpells); + xmlHelper = new XmlHelper(mainView); } catch (final ParserConfigurationException ex) { log.error("Cannot create XML parser: " + ex.getMessage()); + throw new MissingResourceException("Cannot create XML parser: " + ex.getMessage(), null, null); } + typeList = new CFArchTypeList(xmlHelper.getDocumentBuilder(), xmlHelper.getXPath()); + new XMLSpellLoader().load(AbstractMainControl.getInstance().getConfigurationDirectory(), CommonConstants.SPELL_FILE, xmlHelper.getDocumentBuilder(), numberSpells); try { final String filename = IOUtils.getResourceURLAsString(getConfigurationDirectory(), "GameObjectMatchers.xml"); typeList.readGameObjectMatchers(filename); @@ -420,7 +428,20 @@ if (archetypeSet.getLoadStatus() != ArchetypeSet.LoadStatus.EMPTY) { mainView.getObjectChooser().getPickmapChooserControl().loadPickmaps(true); } - treasureListTree = new CFTreasureListTree(archetypeSet); + final Document specialTreasureListsDocument; + try { + specialTreasureListsDocument = xmlHelper.getDocumentBuilder().parse(IOUtils.getResourceURLAsString(getConfigurationDirectory(), "TreasureLists.xml")); + treasureListTree = new CFTreasureListTree<GameObject, MapArchObject, Archetype>(archetypeSet, specialTreasureListsDocument, + new TreasureLocation(getArchDefaultFolder(), IGUIConstants.TREASURES_FILE), + new TreasureLocation(getMapDefaultFolder(), null) + ); + } catch (final IOException ex) { + log.fatal("Cannot read TreasureLists.xml: " + ex.getMessage()); + throw new MissingResourceException("Cannot read TreasureLists.xml: " + ex.getMessage(), null, "TreasureLists.xml"); + } catch (final SAXException ex) { + log.fatal("Cannot read TreasureLists.xml: " + ex.getMessage()); + throw new MissingResourceException("Cannot read TreasureLists.xml: " + ex.getMessage(), null, "TreasureLists.xml"); + } recentManager.initRecent(); validators = createMapValidators(); autoValidator = new AutoValidator<GameObject, MapArchObject, Archetype, MapControl, CMapViewBasic>(this, PREFS_VALIDATOR_AUTO_DEFAULT); Modified: trunk/daimonin/src/daieditor/DaimoninEditor.java =================================================================== --- trunk/daimonin/src/daieditor/DaimoninEditor.java 2008-02-12 06:57:41 UTC (rev 3561) +++ trunk/daimonin/src/daieditor/DaimoninEditor.java 2008-02-13 09:11:13 UTC (rev 3562) @@ -177,7 +177,13 @@ } // Create the application and give it the parameters - mainControl = new CMainControl(); + try { + mainControl = new CMainControl(); + } catch (final RuntimeException ex) { + log.fatal(ex.getMessage()); + System.exit(1); + throw new AssertionError(); + } switch (mode) { case NORMAL: return runNormal(args); Modified: trunk/daimonin/src/daieditor/gui/GameObjectAttributesDialog.java =================================================================== --- trunk/daimonin/src/daieditor/gui/GameObjectAttributesDialog.java 2008-02-12 06:57:41 UTC (rev 3561) +++ trunk/daimonin/src/daieditor/gui/GameObjectAttributesDialog.java 2008-02-13 09:11:13 UTC (rev 3562) @@ -19,7 +19,6 @@ package daieditor.gui; -import daieditor.CFTreasureListTree; import daieditor.CMapViewBasic; import daieditor.gameobject.Archetype; import daieditor.gameobject.GameObject; @@ -46,6 +45,7 @@ import net.sf.gridarta.spells.NumberSpell; import net.sf.gridarta.spells.Spell; import net.sf.gridarta.spells.Spells; +import net.sf.gridarta.treasurelist.CFTreasureListTree; import net.sf.japi.swing.ActionFactory; import org.jetbrains.annotations.NotNull; Modified: trunk/src/app/net/sf/gridarta/treasurelist/CFTreasureListTree.java =================================================================== --- trunk/src/app/net/sf/gridarta/treasurelist/CFTreasureListTree.java 2008-02-12 06:57:41 UTC (rev 3561) +++ trunk/src/app/net/sf/gridarta/treasurelist/CFTreasureListTree.java 2008-02-13 09:11:13 UTC (rev 3562) @@ -23,6 +23,7 @@ import java.awt.Component; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.util.HashMap; import java.util.Map; import javax.swing.BorderFactory; import javax.swing.JButton; @@ -44,8 +45,11 @@ import net.sf.gridarta.help.Help; import net.sf.gridarta.map.MapArchObject; import net.sf.japi.swing.ActionFactory; +import net.sf.japi.xml.NodeListIterator; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.w3c.dom.Document; +import org.w3c.dom.Element; /** * The CFTreasureListTree class fully manages treasurelists. @@ -54,7 +58,7 @@ * @author <a href="mailto:ch...@ri...">Christian Hujer</a> * @todo don't extend JTree, instead create a proper model */ -public abstract class CFTreasureListTree<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends JTree { +public final class CFTreasureListTree<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends JTree { public static final String NONE_SYM = "<none>"; // string displayed in attribute dialog for "none" @@ -67,7 +71,7 @@ private static final long serialVersionUID = 1L; // root-node - protected static final DefaultMutableTreeNode root = new DefaultMutableTreeNode("Treasurelists:"); + private static final DefaultMutableTreeNode root = new DefaultMutableTreeNode("Treasurelists:"); // hashtable containing references to all treasurelists (tree nodes) private static Map<String, TreasureTreeNode> treasureTable = null; @@ -88,25 +92,48 @@ /** * Create a new instance. * @param archetypeSet ArchetypeSet to get treasures from. + * @param specialTreasureListsDocument the special treasure lists definitions * @param treasures The treasures to load. */ - protected CFTreasureListTree(@NotNull final ArchetypeSet<G, A, R> archetypeSet, final TreasureLocation... treasures) { + public CFTreasureListTree(@NotNull final ArchetypeSet<G, A, R> archetypeSet, final Document specialTreasureListsDocument, final TreasureLocation... treasures) { super(root); instance = this; putClientProperty("JTree.lineStyle", "Angled"); setCellRenderer(new TreasureCellRenderer(archetypeSet, root)); - treasureTable = new TreasureLoader().parseTreasures(treasures, getSpecialTreasureLists(), root); + treasureTable = new TreasureLoader().parseTreasures(treasures, getSpecialTreasureLists(specialTreasureListsDocument), root); } /** * This method fills the 'specialTreasureLists' hashtable with the names * of all treasurelists which are special and belong into a special subfolder. - * TODO: It would be nice to read this information from a simple datafile. + * @param specialTreasureListsDocument the special treasure lists definitions */ - @NotNull protected abstract Map<String, TreasureTreeNode> getSpecialTreasureLists(); + @NotNull private Map<String, TreasureTreeNode> getSpecialTreasureLists(final Document specialTreasureListsDocument) { + final Map<String, TreasureTreeNode> specialTreasureLists = new HashMap<String, TreasureTreeNode>(); + final Element rootElement = specialTreasureListsDocument.getDocumentElement(); + assert rootElement != null && rootElement.getNodeName().equalsIgnoreCase("lists"); + + for (final Element list : new NodeListIterator<Element>(rootElement, "list")) { + final String listName = list.getAttribute("name"); + assert listName != null; + + final TreasureTreeNode folder = new TreasureTreeNode(listName, TreasureObj.FOLDER); + root.add(folder); + + for (final Element entry : new NodeListIterator<Element>(list, "entry")) { + final String entryName = entry.getAttribute("name"); + assert entryName != null; + + specialTreasureLists.put(entryName, folder); + } + } + + return specialTreasureLists; + } + /** * Check if a certain treasurelist exists. * @param name Name of a treasurelist This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |