From: <aki...@us...> - 2012-01-08 19:24:34
|
Revision: 9170 http://gridarta.svn.sourceforge.net/gridarta/?rev=9170&view=rev Author: akirschbaum Date: 2012-01-08 19:24:27 +0000 (Sun, 08 Jan 2012) Log Message: ----------- Implement #3464771 (Browse option for plugins). Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/crossfire/ChangeLog trunk/daimonin/ChangeLog trunk/model/src/app/net/sf/gridarta/model/io/PathManager.java trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/PluginParameterCodec.java trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/PluginParameterFactory.java trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/PluginParameterVisitor.java trunk/src/app/net/sf/gridarta/gui/dialog/plugin/PluginEditor.java trunk/src/app/net/sf/gridarta/gui/dialog/plugin/PluginView.java trunk/src/app/net/sf/gridarta/gui/dialog/plugin/parameter/PluginParameterViewFactory.java trunk/src/app/net/sf/gridarta/gui/dialog/prefs/AppPreferences.java trunk/src/app/net/sf/gridarta/gui/dialog/prefs/ResPreferences.java trunk/src/app/net/sf/gridarta/gui/utils/JFileField.java trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java Added Paths: ----------- trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/AbstractPathParameter.java trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/MapPathParameter.java trunk/src/app/net/sf/gridarta/gui/dialog/plugin/parameter/MapPathParameterView.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2012-01-08 19:19:57 UTC (rev 9169) +++ trunk/atrinik/ChangeLog 2012-01-08 19:24:27 UTC (rev 9170) @@ -1,5 +1,7 @@ 2012-01-08 Andreas Kirschbaum + * Implement #3464771 (Browse option for plugins). + * Do not drop plugin script parameter with unknown type. Create String parameters instead. Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2012-01-08 19:19:57 UTC (rev 9169) +++ trunk/crossfire/ChangeLog 2012-01-08 19:24:27 UTC (rev 9170) @@ -1,5 +1,7 @@ 2012-01-08 Andreas Kirschbaum + * Implement #3464771 (Browse option for plugins). + * Do not drop plugin script parameter with unknown type. Create String parameters instead. Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2012-01-08 19:19:57 UTC (rev 9169) +++ trunk/daimonin/ChangeLog 2012-01-08 19:24:27 UTC (rev 9170) @@ -1,5 +1,7 @@ 2012-01-08 Andreas Kirschbaum + * Implement #3464771 (Browse option for plugins). + * Do not drop plugin script parameter with unknown type. Create String parameters instead. Modified: trunk/model/src/app/net/sf/gridarta/model/io/PathManager.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/io/PathManager.java 2012-01-08 19:19:57 UTC (rev 9169) +++ trunk/model/src/app/net/sf/gridarta/model/io/PathManager.java 2012-01-08 19:24:27 UTC (rev 9170) @@ -85,7 +85,20 @@ */ @NotNull public String getMapPath(@NotNull final String path) { - final String mapDirName = globalSettings.getMapsDirectory().getPath(); + return getMapPath(path, globalSettings.getMapsDirectory()); + } + + /** + * Create map path. Replaces all occurrences of '\' with '/' and removes the + * path to the map directory (absolute, relative or canonical) from the + * path. + * @param mapDir the map dir + * @param path to create map path from + * @return fixed path + */ + @NotNull + public static String getMapPath(@NotNull final String path, @NotNull final File mapDir) { + @NotNull final String mapDirName = mapDir.getPath(); String mapPath = path.replace('\\', '/'); if (mapPath.startsWith(mapDirName)) { mapPath = mapPath.substring(mapDirName.length()); Added: trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/AbstractPathParameter.java =================================================================== --- trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/AbstractPathParameter.java (rev 0) +++ trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/AbstractPathParameter.java 2012-01-08 19:24:27 UTC (rev 9170) @@ -0,0 +1,77 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2011 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.plugin.parameter; + +import java.io.File; +import net.sf.gridarta.model.archetype.Archetype; +import net.sf.gridarta.model.gameobject.GameObject; +import net.sf.gridarta.model.io.PathManager; +import net.sf.gridarta.model.maparchobject.MapArchObject; +import org.jetbrains.annotations.NotNull; + +/** + * Base class for {@link PluginParameter PluginParameters} that hold a {@link + * File} value. + * @author Andreas Kirschbaum + */ +public abstract class AbstractPathParameter<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends AbstractPluginParameter<G, A, R, String> { + + /** + * The base directory. + */ + @NotNull + private final File baseDir; + + /** + * Creates a new instance. + * @param baseDir the base directory + */ + protected AbstractPathParameter(@NotNull final File baseDir) { + this.baseDir = baseDir; + setValue(""); + } + + /** + * {@inheritDoc} + */ + @Override + public boolean setStringValue(@NotNull final String value) { + setValue(value); + return true; + } + + /** + * Returns the base directory. + * @return the base directory + */ + @NotNull + public File getBaseDir() { + return baseDir; + } + + /** + * Sets the current {@link File}. + * @param file the file + */ + public void setFile(@NotNull final File file) { + setValue(PathManager.getMapPath(file.getAbsolutePath(), baseDir)); + } + +} // class AbstractPathParameter Property changes on: trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/AbstractPathParameter.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/MapPathParameter.java =================================================================== --- trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/MapPathParameter.java (rev 0) +++ trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/MapPathParameter.java 2012-01-08 19:24:27 UTC (rev 9170) @@ -0,0 +1,66 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2011 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.plugin.parameter; + +import java.io.File; +import net.sf.gridarta.model.archetype.Archetype; +import net.sf.gridarta.model.gameobject.GameObject; +import net.sf.gridarta.model.maparchobject.MapArchObject; +import org.jetbrains.annotations.NotNull; + +/** + * A {@link PluginParameter} that represents a map. + * @author Andreas Kirschbaum + */ +public class MapPathParameter<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends AbstractPathParameter<G, A, R> { + + /** + * The string representation of this parameter type. + */ + @NotNull + public static final String PARAMETER_TYPE = "MapPathParameter"; + + /** + * Creates a new instance. + * @param baseDir the base directory + */ + public MapPathParameter(@NotNull final File baseDir) { + super(baseDir); + } + + /** + * {@inheritDoc} + */ + @NotNull + @Override + public <T> T visit(@NotNull final PluginParameterVisitor<G, A, R, T> visitor) { + return visitor.visit(this); + } + + /** + * {@inheritDoc} + */ + @NotNull + @Override + public String getParameterType() { + return PARAMETER_TYPE; + } + +} Property changes on: trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/MapPathParameter.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Modified: trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/PluginParameterCodec.java =================================================================== --- trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/PluginParameterCodec.java 2012-01-08 19:19:57 UTC (rev 9169) +++ trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/PluginParameterCodec.java 2012-01-08 19:24:27 UTC (rev 9170) @@ -148,6 +148,17 @@ @NotNull @Override + public Element visit(@NotNull final MapPathParameter<G, A, R> parameter) { + final Element e = toXML(parameter); + final Element s = new Element("value"); + final String value = parameter.getValue(); + s.addContent(value != null ? value : ""); + e.addContent(s); + return e; + } + + @NotNull + @Override public Element visit(@NotNull final StringParameter<G, A, R> parameter) { final Element e = toXML(parameter); final Element s = new Element("value"); @@ -261,6 +272,16 @@ @NotNull @Override + public PluginParameter<G, A, R> visit(@NotNull final MapPathParameter<G, A, R> parameter) { + fromXML(parameter); + assert e != null; + final String val = e.getChildTextTrim("value"); + parameter.setValue(val); + return parameter; + } + + @NotNull + @Override public PluginParameter<G, A, R> visit(@NotNull final StringParameter<G, A, R> parameter) { fromXML(parameter); assert e != null; Modified: trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/PluginParameterFactory.java =================================================================== --- trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/PluginParameterFactory.java 2012-01-08 19:19:57 UTC (rev 9169) +++ trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/PluginParameterFactory.java 2012-01-08 19:24:27 UTC (rev 9170) @@ -25,6 +25,7 @@ import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; import net.sf.gridarta.model.mapmanager.MapManager; +import net.sf.gridarta.model.settings.GlobalSettings; import org.jdom.Element; import org.jetbrains.annotations.NotNull; @@ -43,6 +44,9 @@ @NotNull private final NamedFilter defaultFilterList; + @NotNull + private final GlobalSettings globalSettings; + /** * The {@link PluginParameterCodec} for converting {@link PluginParameter * PluginParameters} to or from XML representation. @@ -50,10 +54,11 @@ @NotNull private final PluginParameterCodec<G, A, R> codec = new PluginParameterCodec<G, A, R>(); - public PluginParameterFactory(@NotNull final ArchetypeSet<G, A, R> archetypeSet, @NotNull final MapManager<G, A, R> mapManager, @NotNull final NamedFilter defaultFilterList) { + public PluginParameterFactory(@NotNull final ArchetypeSet<G, A, R> archetypeSet, @NotNull final MapManager<G, A, R> mapManager, @NotNull final NamedFilter defaultFilterList, @NotNull final GlobalSettings globalSettings) { this.archetypeSet = archetypeSet; this.mapManager = mapManager; this.defaultFilterList = defaultFilterList; + this.globalSettings = globalSettings; } @NotNull @@ -93,6 +98,9 @@ if (type.equals(MapParameter.PARAMETER_TYPE)) { return new MapParameter<G, A, R>(mapManager); } + if (type.equals(MapPathParameter.PARAMETER_TYPE)) { + return new MapPathParameter<G, A, R>(globalSettings.getMapsDirectory()); + } if (type.equals(FilterParameter.PARAMETER_TYPE)) { return new FilterParameter<G, A, R>(defaultFilterList); } @@ -108,7 +116,7 @@ @NotNull public String[] getTypes() { - return new String[] { StringParameter.PARAMETER_TYPE, IntegerParameter.PARAMETER_TYPE, DoubleParameter.PARAMETER_TYPE, BooleanParameter.PARAMETER_TYPE, ArchParameter.PARAMETER_TYPE, MapParameter.PARAMETER_TYPE, FilterParameter.PARAMETER_TYPE, }; + return new String[] { StringParameter.PARAMETER_TYPE, IntegerParameter.PARAMETER_TYPE, DoubleParameter.PARAMETER_TYPE, BooleanParameter.PARAMETER_TYPE, ArchParameter.PARAMETER_TYPE, MapParameter.PARAMETER_TYPE, FilterParameter.PARAMETER_TYPE, MapPathParameter.PARAMETER_TYPE, }; } } Modified: trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/PluginParameterVisitor.java =================================================================== --- trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/PluginParameterVisitor.java 2012-01-08 19:19:57 UTC (rev 9169) +++ trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/PluginParameterVisitor.java 2012-01-08 19:24:27 UTC (rev 9170) @@ -49,6 +49,9 @@ T visit(@NotNull MapParameter<G, A, R> parameter); @NotNull + T visit(@NotNull MapPathParameter<G, A, R> parameter); + + @NotNull T visit(@NotNull StringParameter<G, A, R> parameter); } Modified: trunk/src/app/net/sf/gridarta/gui/dialog/plugin/PluginEditor.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/dialog/plugin/PluginEditor.java 2012-01-08 19:19:57 UTC (rev 9169) +++ trunk/src/app/net/sf/gridarta/gui/dialog/plugin/PluginEditor.java 2012-01-08 19:24:27 UTC (rev 9170) @@ -421,7 +421,7 @@ return existingPluginParameterView; } - final PluginParameterView<G, A, R> newPluginParameterView = pluginParameterViewFactory.getView(param); + final PluginParameterView<G, A, R> newPluginParameterView = pluginParameterViewFactory.getView(paramTable, param); newTableComponent(newPluginParameterView.getConfigComponent()); newTableComponent(newPluginParameterView.getValueComponent()); Modified: trunk/src/app/net/sf/gridarta/gui/dialog/plugin/PluginView.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/dialog/plugin/PluginView.java 2012-01-08 19:19:57 UTC (rev 9169) +++ trunk/src/app/net/sf/gridarta/gui/dialog/plugin/PluginView.java 2012-01-08 19:24:27 UTC (rev 9170) @@ -21,7 +21,6 @@ import java.awt.BorderLayout; import java.awt.Component; -import java.awt.Container; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; @@ -218,7 +217,7 @@ p.setMessageType(JOptionPane.QUESTION_MESSAGE); p.setMessage("Please provide runtime parameters for " + plugin.getName()); final GridBagLayout layout = new GridBagLayout(); - final Container panel = new JPanel(layout); + final JComponent panel = new JPanel(layout); final JDialog dialog = p.createDialog(parent, plugin.getName()); dialog.setModal(true); dialog.getContentPane().removeAll(); @@ -226,7 +225,7 @@ for (final PluginParameter<G, A, R> parameter : plugin) { log.debug("adding parameter"); final Component name = new JLabel(parameter.getName()); - final PluginParameterView<G, A, R> view = pluginParameterViewFactory.getView(parameter); + final PluginParameterView<G, A, R> view = pluginParameterViewFactory.getView(panel, parameter); final JComponent val = view.getValueComponent(); val.setToolTipText(parameter.getDescription()); final GridBagConstraints gn = new GridBagConstraints(0, i, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 5, 5); Added: trunk/src/app/net/sf/gridarta/gui/dialog/plugin/parameter/MapPathParameterView.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/dialog/plugin/parameter/MapPathParameterView.java (rev 0) +++ trunk/src/app/net/sf/gridarta/gui/dialog/plugin/parameter/MapPathParameterView.java 2012-01-08 19:24:27 UTC (rev 9170) @@ -0,0 +1,96 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2011 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.dialog.plugin.parameter; + +import java.io.File; +import javax.swing.JComponent; +import javax.swing.JFileChooser; +import javax.swing.JPanel; +import javax.swing.event.DocumentEvent; +import javax.swing.event.DocumentListener; +import net.sf.gridarta.gui.utils.JFileField; +import net.sf.gridarta.model.archetype.Archetype; +import net.sf.gridarta.model.gameobject.GameObject; +import net.sf.gridarta.model.maparchobject.MapArchObject; +import net.sf.gridarta.plugin.parameter.MapPathParameter; +import org.jetbrains.annotations.NotNull; + +/** + * A {@link PluginParameterView} that displays a {@link MapPathParameter}. + * @author Andreas Kirschbaum + */ +public class MapPathParameterView<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> implements PluginParameterView<G, A, R> { + + @NotNull + private final JComponent config = new JPanel(); + + /** + * The button that displays the map path. + */ + @NotNull + private final JFileField valueComponent; + + /** + * Creates a new instance. + * @param parent the parent component for the file chooser + * @param parameter the parameter to affect + */ + public MapPathParameterView(@NotNull final JComponent parent, @NotNull final MapPathParameter<G, A, R> parameter) { + final String value = parameter.getValue(); + valueComponent = new JFileField(parent, null, parameter.getBaseDir(), new File(value == null ? "" : value), JFileChooser.FILES_AND_DIRECTORIES); + valueComponent.addDocumentListener(new DocumentListener() { + + @Override + public void insertUpdate(final DocumentEvent e) { + parameter.setFile(valueComponent.getFile()); + } + + @Override + public void removeUpdate(final DocumentEvent e) { + parameter.setFile(valueComponent.getFile()); + } + + @Override + public void changedUpdate(final DocumentEvent e) { + parameter.setFile(valueComponent.getFile()); + } + + }); + } + + /** + * {@inheritDoc} + */ + @NotNull + @Override + public JComponent getValueComponent() { + return valueComponent; + } + + /** + * {@inheritDoc} + */ + @NotNull + @Override + public JComponent getConfigComponent() { + return config; + } + +} // class MapPathParameterView Property changes on: trunk/src/app/net/sf/gridarta/gui/dialog/plugin/parameter/MapPathParameterView.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Modified: trunk/src/app/net/sf/gridarta/gui/dialog/plugin/parameter/PluginParameterViewFactory.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/dialog/plugin/parameter/PluginParameterViewFactory.java 2012-01-08 19:19:57 UTC (rev 9169) +++ trunk/src/app/net/sf/gridarta/gui/dialog/plugin/parameter/PluginParameterViewFactory.java 2012-01-08 19:24:27 UTC (rev 9170) @@ -19,6 +19,7 @@ package net.sf.gridarta.gui.dialog.plugin.parameter; +import javax.swing.JComponent; import net.sf.gridarta.gui.panel.gameobjectattributes.GameObjectAttributesModel; import net.sf.gridarta.gui.panel.objectchooser.ObjectChooser; import net.sf.gridarta.model.archetype.Archetype; @@ -33,10 +34,12 @@ import net.sf.gridarta.plugin.parameter.FilterParameter; import net.sf.gridarta.plugin.parameter.IntegerParameter; import net.sf.gridarta.plugin.parameter.MapParameter; +import net.sf.gridarta.plugin.parameter.MapPathParameter; import net.sf.gridarta.plugin.parameter.PluginParameter; import net.sf.gridarta.plugin.parameter.PluginParameterVisitor; import net.sf.gridarta.plugin.parameter.StringParameter; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** * Factory for creating {@link PluginParameterView} instances. @@ -62,6 +65,12 @@ @NotNull private final FaceObjectProviders faceObjectProviders; + /** + * The parent component for showing dialogs. + */ + @Nullable + private JComponent parent; + @NotNull private final PluginParameterVisitor<G, A, R, PluginParameterView<G, A, R>> visitor = new PluginParameterVisitor<G, A, R, PluginParameterView<G, A, R>>() { @@ -103,6 +112,13 @@ @NotNull @Override + public PluginParameterView<G, A, R> visit(@NotNull final MapPathParameter<G, A, R> parameter) { + assert parent != null; + return new MapPathParameterView<G, A, R>(parent, parameter); + } + + @NotNull + @Override public PluginParameterView<G, A, R> visit(@NotNull final StringParameter<G, A, R> parameter) { return new StringParameterView<G, A, R>(parameter); } @@ -122,9 +138,17 @@ this.faceObjectProviders = faceObjectProviders; } + /** + * @param parent the parent component for showing dialogs + */ @NotNull - public PluginParameterView<G, A, R> getView(@NotNull final PluginParameter<G, A, R> parameter) { - return parameter.visit(visitor); + public PluginParameterView<G, A, R> getView(@NotNull final JComponent parent, @NotNull final PluginParameter<G, A, R> parameter) { + this.parent = parent; + try { + return parameter.visit(visitor); + } finally { + this.parent = null; + } } } Modified: trunk/src/app/net/sf/gridarta/gui/dialog/prefs/AppPreferences.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/dialog/prefs/AppPreferences.java 2012-01-08 19:19:57 UTC (rev 9169) +++ trunk/src/app/net/sf/gridarta/gui/dialog/prefs/AppPreferences.java 2012-01-08 19:24:27 UTC (rev 9170) @@ -144,13 +144,13 @@ final PreferencesHelper preferencesHelper = new PreferencesHelper(panel); panel.setBorder(createTitledBorder("optionsApps")); - serverField = new JFileField(this, "optionsAppServer", new File(appPreferencesModel.getServer()), JFileChooser.FILES_ONLY); + serverField = new JFileField(this, "optionsAppServer", null, new File(appPreferencesModel.getServer()), JFileChooser.FILES_ONLY); preferencesHelper.addComponent(ActionBuilderUtils.newLabel(ACTION_BUILDER, "optionsAppServer")); preferencesHelper.addComponent(serverField); - clientField = new JFileField(this, "optionsAppClient", new File(appPreferencesModel.getClient()), JFileChooser.FILES_ONLY); + clientField = new JFileField(this, "optionsAppClient", null, new File(appPreferencesModel.getClient()), JFileChooser.FILES_ONLY); preferencesHelper.addComponent(ActionBuilderUtils.newLabel(ACTION_BUILDER, "optionsAppClient")); preferencesHelper.addComponent(clientField); - editorField = new JFileField(this, "optionsAppEditor", new File(appPreferencesModel.getEditor()), JFileChooser.FILES_ONLY); + editorField = new JFileField(this, "optionsAppEditor", null, new File(appPreferencesModel.getEditor()), JFileChooser.FILES_ONLY); preferencesHelper.addComponent(ActionBuilderUtils.newLabel(ACTION_BUILDER, "optionsAppEditor")); preferencesHelper.addComponent(editorField); Modified: trunk/src/app/net/sf/gridarta/gui/dialog/prefs/ResPreferences.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/dialog/prefs/ResPreferences.java 2012-01-08 19:19:57 UTC (rev 9169) +++ trunk/src/app/net/sf/gridarta/gui/dialog/prefs/ResPreferences.java 2012-01-08 19:24:27 UTC (rev 9170) @@ -256,14 +256,14 @@ final JComponent panel = new JPanel(new GridBagLayout()); final PreferencesHelper preferencesHelper = new PreferencesHelper(panel); panel.setBorder(createTitledBorder("optionsResPaths")); - archField = new JFileField(this, "optionsResArch", globalSettings.getArchDirectory(), JFileChooser.DIRECTORIES_ONLY); + archField = new JFileField(this, "optionsResArch", null, globalSettings.getArchDirectory(), JFileChooser.DIRECTORIES_ONLY); preferencesHelper.addComponent(ActionBuilderUtils.newLabel(ACTION_BUILDER, "optionsResArch")); preferencesHelper.addComponent(archField); - mapField = new JFileField(this, "optionsResMaps", globalSettings.getMapsDirectory(), JFileChooser.DIRECTORIES_ONLY); + mapField = new JFileField(this, "optionsResMaps", null, globalSettings.getMapsDirectory(), JFileChooser.DIRECTORIES_ONLY); preferencesHelper.addComponent(ActionBuilderUtils.newLabel(ACTION_BUILDER, "optionsResMaps")); preferencesHelper.addComponent(mapField); if (globalSettings.hasMediaDirectory()) { - mediaField = new JFileField(this, "optionsResMedia", globalSettings.getMediaDirectory(), JFileChooser.DIRECTORIES_ONLY); + mediaField = new JFileField(this, "optionsResMedia", null, globalSettings.getMediaDirectory(), JFileChooser.DIRECTORIES_ONLY); preferencesHelper.addComponent(ActionBuilderUtils.newLabel(ACTION_BUILDER, "optionsResMedia")); assert mediaField != null; preferencesHelper.addComponent(mediaField); Modified: trunk/src/app/net/sf/gridarta/gui/utils/JFileField.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/JFileField.java 2012-01-08 19:19:57 UTC (rev 9169) +++ trunk/src/app/net/sf/gridarta/gui/utils/JFileField.java 2012-01-08 19:24:27 UTC (rev 9170) @@ -27,7 +27,8 @@ import javax.swing.JComponent; import javax.swing.JFileChooser; import javax.swing.JTextField; -import net.sf.gridarta.utils.FileChooserUtils; +import javax.swing.event.DocumentListener; +import net.sf.gridarta.model.io.PathManager; import net.sf.japi.swing.action.ActionBuilder; import net.sf.japi.swing.action.ActionBuilderFactory; import net.sf.japi.swing.action.ActionMethod; @@ -54,6 +55,13 @@ private final JComponent parent; /** + * The base directory. When non-<code>null</code>, the contents of {@link + * #textField} are relative to this directory. + */ + @Nullable + private final File baseDir; + + /** * The text file that contains the currently selected file. */ @NotNull @@ -70,12 +78,15 @@ * @param parent the parent component * @param key the resource key for showing tooltips; <code>null</code> * disables tooltips + * @param baseDir the base directory; when non-<code>null</code> the + * contents of the text input field are relative to this directory * @param file the currently selected file * @param fileSelectionMode the file selection mode for the file chooser */ - public JFileField(@NotNull final JComponent parent, @Nullable final String key, @NotNull final File file, final int fileSelectionMode) { + public JFileField(@NotNull final JComponent parent, @Nullable final String key, @Nullable final File baseDir, @NotNull final File file, final int fileSelectionMode) { this.parent = parent; - textField = new JTextField(file.getPath(), 20); + this.baseDir = baseDir; + textField = new JTextField(getRelativeFile(file), 20); fileChooser.setFileSelectionMode(fileSelectionMode); @@ -101,7 +112,11 @@ @NotNull public File getFile() { final String text = textField.getText(); - return text.isEmpty() ? new File(System.getProperty("user.dir")) : new File(text); + if (text.isEmpty()) { + return baseDir == null ? new File(System.getProperty("user.dir")) : baseDir; + } else { + return baseDir == null ? new File(text) : new File(baseDir, text); + } } /** @@ -109,23 +124,44 @@ * @param file the currently selected file */ public void setFile(@NotNull final File file) { - textField.setText(file.getAbsolutePath()); + final String text = getRelativeFile(file); + textField.setText(text.isEmpty() ? "/" : text); } /** + * Returns the contents for the text input field for a file. + * @param file the file + * @return the contents + */ + @NotNull + private String getRelativeFile(final File file) { + return baseDir == null ? file.getPath() : PathManager.getMapPath(file.getAbsolutePath(), baseDir); + } + + /** + * Adds a {@link DocumentListener} to the text input field. + * @param documentListener the document listener to add + */ + public void addDocumentListener(@NotNull final DocumentListener documentListener) { + textField.getDocument().addDocumentListener(documentListener); + } + + /** * The action method for the button. It shows the file chooser. */ @ActionMethod public void fileChooserButton() { final File file = getFile(); fileChooser.setSelectedFile(file); - if (file.isDirectory()) { - FileChooserUtils.setCurrentDirectory(fileChooser, file); - } else { - FileChooserUtils.setCurrentDirectory(fileChooser, file.getParentFile()); - } + //if (file.isDirectory()) { + //FileChooserUtils.setCurrentDirectory(fileChooser, file); + //fileChooser.setSelectedFile(null); + //} else { + //FileChooserUtils.setCurrentDirectory(fileChooser, file.getParentFile()); + //fileChooser.setSelectedFile(file); + //} if (fileChooser.showOpenDialog(parent) == JFileChooser.APPROVE_OPTION) { - textField.setText(fileChooser.getSelectedFile().getPath()); + setFile(fileChooser.getSelectedFile()); } } Modified: trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java 2012-01-08 19:19:57 UTC (rev 9169) +++ trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java 2012-01-08 19:24:27 UTC (rev 9170) @@ -281,7 +281,7 @@ final AbstractResources<G, A, R> resources = editorFactory.newResources(gameObjectParser, archetypeSet, archetypeParser, mapViewSettings, faceObjects, animationObjects, archFaceProvider, faceObjectProviders); final Spells<NumberSpell> numberSpells = new Spells<NumberSpell>(); final Spells<GameObjectSpell<G, A, R>> gameObjectSpells = new Spells<GameObjectSpell<G, A, R>>(); - final PluginParameterFactory<G, A, R> pluginParameterFactory = new PluginParameterFactory<G, A, R>(archetypeSet, mapManager, defaultFilterList); + final PluginParameterFactory<G, A, R> pluginParameterFactory = new PluginParameterFactory<G, A, R>(archetypeSet, mapManager, defaultFilterList, globalSettings); final DefaultMainControl<G, A, R> mainControl = editorFactory.newMainControl(mode == GridartaRunMode.COLLECT_ARCHES, errorView, globalSettings, configSourceFactory, pathManager, gameObjectMatchers, gameObjectFactory, archetypeTypeSet, archetypeSet, archetypeChooserModel, autojoinLists, mapManager, pluginModel, validators, scriptedEventEditor, resources, numberSpells, gameObjectSpells, pluginParameterFactory, validatorPreferences, mapWriter); final NamedFilter defaultNamedFilterList = new NamedFilter(gameObjectMatchers.getFilters()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2012-04-29 20:24:31
|
Revision: 9176 http://gridarta.svn.sourceforge.net/gridarta/?rev=9176&view=rev Author: akirschbaum Date: 2012-04-29 20:24:24 +0000 (Sun, 29 Apr 2012) Log Message: ----------- Ensure that at least 3 map squares are visible around a moving map cursor. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/crossfire/ChangeLog trunk/daimonin/ChangeLog trunk/src/app/net/sf/gridarta/gui/map/renderer/MapRenderer.java trunk/src/app/net/sf/gridarta/gui/mapcursor/MapCursorActions.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2012-04-15 17:43:07 UTC (rev 9175) +++ trunk/atrinik/ChangeLog 2012-04-29 20:24:24 UTC (rev 9176) @@ -1,3 +1,8 @@ +2012-04-29 Andreas Kirschbaum + + * Ensure that at least 3 map squares are visible around a moving + map cursor. + 2012-01-08 Andreas Kirschbaum * Implement #3464771 (Browse option for plugins). Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2012-04-15 17:43:07 UTC (rev 9175) +++ trunk/crossfire/ChangeLog 2012-04-29 20:24:24 UTC (rev 9176) @@ -1,3 +1,8 @@ +2012-04-29 Andreas Kirschbaum + + * Ensure that at least 3 map squares are visible around a moving + map cursor. + 2012-01-08 Andreas Kirschbaum * Implement #3464771 (Browse option for plugins). Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2012-04-15 17:43:07 UTC (rev 9175) +++ trunk/daimonin/ChangeLog 2012-04-29 20:24:24 UTC (rev 9176) @@ -1,3 +1,8 @@ +2012-04-29 Andreas Kirschbaum + + * Ensure that at least 3 map squares are visible around a moving + map cursor. + 2012-01-08 Andreas Kirschbaum * Implement #3464771 (Browse option for plugins). Modified: trunk/src/app/net/sf/gridarta/gui/map/renderer/MapRenderer.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/renderer/MapRenderer.java 2012-04-15 17:43:07 UTC (rev 9175) +++ trunk/src/app/net/sf/gridarta/gui/map/renderer/MapRenderer.java 2012-04-29 20:24:24 UTC (rev 9176) @@ -89,4 +89,10 @@ @NotNull Rectangle getSquareBounds(@NotNull Point p); + /** + * Ensures that a rectangular area is visible. + * @param aRect the area + */ + void scrollRectToVisible(@NotNull Rectangle aRect); + } Modified: trunk/src/app/net/sf/gridarta/gui/mapcursor/MapCursorActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapcursor/MapCursorActions.java 2012-04-15 17:43:07 UTC (rev 9175) +++ trunk/src/app/net/sf/gridarta/gui/mapcursor/MapCursorActions.java 2012-04-29 20:24:24 UTC (rev 9176) @@ -28,6 +28,7 @@ import net.sf.gridarta.gui.map.mapview.MapView; import net.sf.gridarta.gui.map.mapview.MapViewManager; import net.sf.gridarta.gui.map.mapview.MapViewManagerListener; +import net.sf.gridarta.gui.map.renderer.MapRenderer; import net.sf.gridarta.gui.panel.objectchooser.ObjectChooser; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.baseobject.BaseObject; @@ -52,6 +53,12 @@ public class MapCursorActions<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> { /** + * The visible border around the cursor. Whenever the cursor moves, the map + * view is scrolled to make this area visible. + */ + private static final int BORDER = 3; + + /** * The object chooser. */ @NotNull @@ -442,8 +449,30 @@ * @return whether the action was or can be performed */ private boolean doMoveCursor(final boolean performAction, @NotNull final Direction direction) { - final MapCursor<G, A, R> mapCursor = getActiveMapCursor(); - return mapCursor != null && mapCursor.goTo(performAction, direction); + final MapView<G, A, R> mapView = currentMapView; + if (mapView == null) { + return false; + } + + final MapCursor<G, A, R> mapCursor = getActiveMapCursor(mapView); + if (mapCursor == null) { + return false; + } + + if (!mapCursor.goTo(performAction, direction)) { + return false; + } + + if (performAction) { + final MapRenderer renderer = mapView.getRenderer(); + final Point location = mapCursor.getLocation(); + if (location != null) { + location.translate(BORDER * direction.getDx(), BORDER * direction.getDy()); + renderer.scrollRectToVisible(renderer.getSquareBounds(location)); + } + } + + return true; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2012-05-31 19:52:29
|
Revision: 9178 http://gridarta.svn.sourceforge.net/gridarta/?rev=9178&view=rev Author: akirschbaum Date: 2012-05-31 19:52:21 +0000 (Thu, 31 May 2012) Log Message: ----------- Implement #3527374 (Illumination coverage filter). Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/gameobject/GameObject.java trunk/crossfire/ChangeLog trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/AbstractFlatMapRenderer.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/gameobject/GameObject.java trunk/daimonin/ChangeLog trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/gameobject/GameObject.java trunk/model/src/app/net/sf/gridarta/model/gameobject/DefaultIsoGameObject.java trunk/model/src/app/net/sf/gridarta/model/gameobject/GameObject.java trunk/model/src/app/net/sf/gridarta/model/mapmodel/DefaultMapModel.java trunk/model/src/app/net/sf/gridarta/model/mapmodel/MapSquare.java trunk/model/src/test/net/sf/gridarta/model/gameobject/TestGameObject.java trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractIsoMapRenderer.java trunk/src/app/net/sf/gridarta/gui/map/renderer/GridMapSquarePainter.java trunk/utils/src/app/net/sf/gridarta/utils/SystemIcons.java Added Paths: ----------- trunk/atrinik/resource/system/light.png trunk/crossfire/resource/system/light.png trunk/daimonin/resource/system/light.png trunk/model/src/app/net/sf/gridarta/model/mapmodel/LightMapModelTracker.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2012-05-31 19:33:36 UTC (rev 9177) +++ trunk/atrinik/ChangeLog 2012-05-31 19:52:21 UTC (rev 9178) @@ -1,3 +1,8 @@ +2012-05-31 Andreas Kirschbaum + + * Implement #3527374 (Illumination coverage filter). For now this + is not an option but always active. + 2012-04-29 Andreas Kirschbaum * Ensure that at least 3 map squares are visible around a moving Added: trunk/atrinik/resource/system/light.png =================================================================== (Binary files differ) Property changes on: trunk/atrinik/resource/system/light.png ___________________________________________________________________ Added: svn:mime-type + image/png Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/gameobject/GameObject.java =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/gameobject/GameObject.java 2012-05-31 19:33:36 UTC (rev 9177) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/gameobject/GameObject.java 2012-05-31 19:52:21 UTC (rev 9178) @@ -157,4 +157,12 @@ } } + /** + * {@inheritDoc} + */ + @Override + public int getLightRadius() { + return getAttributeInt(GLOW_RADIUS); + } + } Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2012-05-31 19:33:36 UTC (rev 9177) +++ trunk/crossfire/ChangeLog 2012-05-31 19:52:21 UTC (rev 9178) @@ -1,3 +1,8 @@ +2012-05-31 Andreas Kirschbaum + + * Implement #3527374 (Illumination coverage filter). For now this + is not an option but always active. + 2012-04-29 Andreas Kirschbaum * Ensure that at least 3 map squares are visible around a moving Added: trunk/crossfire/resource/system/light.png =================================================================== (Binary files differ) Property changes on: trunk/crossfire/resource/system/light.png ___________________________________________________________________ Added: svn:mime-type + image/png Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/AbstractFlatMapRenderer.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/AbstractFlatMapRenderer.java 2012-05-31 19:33:36 UTC (rev 9177) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/AbstractFlatMapRenderer.java 2012-05-31 19:52:21 UTC (rev 9178) @@ -418,7 +418,8 @@ */ protected void paintSquareSelection(@NotNull final Graphics graphics, @NotNull final Point point) { final int gridFlags = mapGrid.getFlags(point.x, point.y); - gridMapSquarePainter.paint(graphics, gridFlags, borderOffset.x + point.x * IGUIConstants.SQUARE_WIDTH, borderOffset.y + point.y * IGUIConstants.SQUARE_HEIGHT, this); + final boolean light = mapModel.getMapSquare(point).isLight(); + gridMapSquarePainter.paint(graphics, gridFlags, light, borderOffset.x + point.x * IGUIConstants.SQUARE_WIDTH, borderOffset.y + point.y * IGUIConstants.SQUARE_HEIGHT, this); } /** Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/gameobject/GameObject.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/gameobject/GameObject.java 2012-05-31 19:33:36 UTC (rev 9177) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/gameobject/GameObject.java 2012-05-31 19:52:21 UTC (rev 9178) @@ -54,6 +54,12 @@ public static final String ELEVATION = "elevation"; /** + * The name of the "glow_radius" attribute. + */ + @NotNull + public static final String GLOW_RADIUS = "glow_radius"; + + /** * The name of the "invisible" attribute. */ @NotNull @@ -155,4 +161,12 @@ return getNormalImage(); } + /** + * {@inheritDoc} + */ + @Override + public int getLightRadius() { + return getAttributeInt(GLOW_RADIUS); + } + } Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2012-05-31 19:33:36 UTC (rev 9177) +++ trunk/daimonin/ChangeLog 2012-05-31 19:52:21 UTC (rev 9178) @@ -1,3 +1,8 @@ +2012-05-31 Andreas Kirschbaum + + * Implement #3527374 (Illumination coverage filter). For now this + is not an option but always active. + 2012-04-29 Andreas Kirschbaum * Ensure that at least 3 map squares are visible around a moving Added: trunk/daimonin/resource/system/light.png =================================================================== (Binary files differ) Property changes on: trunk/daimonin/resource/system/light.png ___________________________________________________________________ Added: svn:mime-type + image/png Modified: trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/gameobject/GameObject.java =================================================================== --- trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/gameobject/GameObject.java 2012-05-31 19:33:36 UTC (rev 9177) +++ trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/gameobject/GameObject.java 2012-05-31 19:52:21 UTC (rev 9178) @@ -44,6 +44,13 @@ public class GameObject extends DefaultIsoGameObject<GameObject, MapArchObject, Archetype> { /** + * Maps values of {@link #GLOW_RADIUS} to effective glow radius in map + * squares. + */ + @NotNull + private static final int[] LIGHT_MASK_WIDTH = { 0, 1, 2, 2, 3, 3, 3, 4, 4, 4, }; + + /** * The serial version UID. */ private static final long serialVersionUID = 1L; @@ -151,4 +158,13 @@ } } + /** + * {@inheritDoc} + */ + @Override + public int getLightRadius() { + final int attributeInt = Math.abs(getAttributeInt(GLOW_RADIUS)); + return LIGHT_MASK_WIDTH[Math.min(attributeInt, LIGHT_MASK_WIDTH.length - 1)]; + } + } Modified: trunk/model/src/app/net/sf/gridarta/model/gameobject/DefaultIsoGameObject.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/gameobject/DefaultIsoGameObject.java 2012-05-31 19:33:36 UTC (rev 9177) +++ trunk/model/src/app/net/sf/gridarta/model/gameobject/DefaultIsoGameObject.java 2012-05-31 19:52:21 UTC (rev 9178) @@ -94,6 +94,12 @@ public static final String ROTATE = "rotate"; /** + * The name of the "glow_radius" attribute. + */ + @NotNull + public static final String GLOW_RADIUS = "glow_radius"; + + /** * The {@link FaceObjectProviders} for looking up faces. */ @NotNull Modified: trunk/model/src/app/net/sf/gridarta/model/gameobject/GameObject.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/gameobject/GameObject.java 2012-05-31 19:33:36 UTC (rev 9177) +++ trunk/model/src/app/net/sf/gridarta/model/gameobject/GameObject.java 2012-05-31 19:52:21 UTC (rev 9178) @@ -288,4 +288,11 @@ */ void markModified(); + /** + * Returns the effective light radius of this game object. + * @return the effective light radius or <code>0</code> if this object does + * not emit light + */ + int getLightRadius(); + } Modified: trunk/model/src/app/net/sf/gridarta/model/mapmodel/DefaultMapModel.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/mapmodel/DefaultMapModel.java 2012-05-31 19:33:36 UTC (rev 9177) +++ trunk/model/src/app/net/sf/gridarta/model/mapmodel/DefaultMapModel.java 2012-05-31 19:52:21 UTC (rev 9178) @@ -195,6 +195,12 @@ private boolean modified; /** + * The {@link LightMapModelTracker} tracking this instance. + */ + @NotNull + private final LightMapModelTracker<G, A, R> lightMapModelTracker = new LightMapModelTracker<G, A, R>(this); + + /** * The {@link MapArchObjectListener} used to detect changes in {@link * #mapArchObject} and set the {@link #modified} flag accordingly. */ @@ -313,6 +319,8 @@ // no other thread may access this map model while resizing synchronized (syncLock) { + lightMapModelTracker.mapSizeChanging(newSize, mapSize); + // first delete all arches in the area that will get cut off // (this is especially important to remove all multi-part objects // reaching into that area) @@ -424,6 +432,7 @@ log.error("endSquareChange: square (" + mapSquare + ") was changed outside a transaction"); final Set<MapSquare<G, A, R>> mapSquares = new HashSet<MapSquare<G, A, R>>(1); mapSquares.add(mapSquare); + lightMapModelTracker.mapSquaresChanged(Collections.unmodifiableCollection(mapSquares)); fireMapSquaresChangedEvent(mapSquares); } else { synchronized (changedSquares) { @@ -530,6 +539,21 @@ * Deliver all pending events. */ private void fireEvents() { + // Call lightMapModelTracker first as it might change more game objects + transactionDepth++; // temporarily increase transaction depth because updating light information causes changes + try { + // Create copy to avoid ConcurrentModificationExceptions due to newly changed squares + final Collection<MapSquare<G, A, R>> mapSquares = new HashSet<MapSquare<G, A, R>>(changedSquares); + for (final G gameObject : changedGameObjects) { + final MapSquare<G, A, R> mapSquare = gameObject.getMapSquare(); + if (mapSquare != null) { + mapSquares.add(mapSquare); + } + } + lightMapModelTracker.mapSquaresChanged(mapSquares); + } finally { + transactionDepth--; + } if (!changedGameObjects.isEmpty() || !transientChangedGameObjects.isEmpty()) { transientChangedGameObjects.removeAll(changedGameObjects); transactionDepth++; // temporarily increase transaction depth because updating edit types causes transient changes Added: trunk/model/src/app/net/sf/gridarta/model/mapmodel/LightMapModelTracker.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/mapmodel/LightMapModelTracker.java (rev 0) +++ trunk/model/src/app/net/sf/gridarta/model/mapmodel/LightMapModelTracker.java 2012-05-31 19:52:21 UTC (rev 9178) @@ -0,0 +1,165 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2011 The Gridarta Developers. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.model.mapmodel; + +import java.awt.Point; +import net.sf.gridarta.model.archetype.Archetype; +import net.sf.gridarta.model.gameobject.GameObject; +import net.sf.gridarta.model.maparchobject.MapArchObject; +import net.sf.gridarta.utils.Size2D; +import org.jetbrains.annotations.NotNull; + +/** + * Tracks a {@link MapModel} for light emitting game objects. Whenever such a + * game object is added to, removed from, or modified while on the map, all + * affected map squares are updated. + * @author Andreas Kirschbaum + */ +public class LightMapModelTracker<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> { + + /** + * The maximal supported light radius. The return values of {@link + * GameObject#getLightRadius()} is clipped to this value. + */ + private static final int MAX_LIGHT_RADIUS = 4; + + /** + * The tracked {@link MapModel}. + */ + @NotNull + private final MapModel<G, A, R> mapModel; + + /** + * A temporary point. Stored in a field to avoid reallocations. + */ + @NotNull + private final Point point = new Point(); + + /** + * A temporary point. Stored in a field to avoid reallocations. + */ + @NotNull + private final Point point2 = new Point(); + + /** + * Creates a new instance. + * @param mapModel the tracked map model + */ + public LightMapModelTracker(@NotNull final MapModel<G, A, R> mapModel) { + this.mapModel = mapModel; + } + + /** + * Called whenever the tracked map is about to change size. + * @param newSize the new map size + * @param oldSize the current map size + */ + public void mapSizeChanging(@NotNull final Size2D newSize, @NotNull final Size2D oldSize) { + final int newWidth = newSize.getWidth(); + final int oldWidth = oldSize.getWidth(); + final int newHeight = newSize.getHeight(); + final int oldHeight = oldSize.getHeight(); + for (point.x = newWidth; point.x < oldWidth; point.x++) { + for (point.y = 0; point.y < oldHeight; point.y++) { + final MapSquare<G, A, R> mapSquare = mapModel.getMapSquare(point); + setLightRadius(mapSquare, 0); + } + } + for (point.x = 0; point.x < newWidth; point.x++) { + for (point.y = newHeight; point.y < newHeight; point.y++) { + final MapSquare<G, A, R> mapSquare = mapModel.getMapSquare(point); + setLightRadius(mapSquare, 0); + } + } + } + + /** + * Called whenever some game objects have changed. + * @param mapSquares the map square that contain changed game objects + */ + public void mapSquaresChanged(@NotNull final Iterable<MapSquare<G, A, R>> mapSquares) { + for (final MapSquare<G, A, R> mapSquare : mapSquares) { + updateLightRadius(mapSquare); + } + } + + /** + * Recalculates information about light emitting game objects in a map + * square. + * @param mapSquare the map square + */ + private void updateLightRadius(@NotNull final MapSquare<G, A, R> mapSquare) { + int maxLightRadius = 0; + for (final G gameObject : mapSquare) { + final int lightRadius = gameObject.getLightRadius(); + if (maxLightRadius < lightRadius) { + maxLightRadius = lightRadius; + } + } + setLightRadius(mapSquare, Math.min(maxLightRadius, MAX_LIGHT_RADIUS)); + } + + /** + * Updates the light radius of a map square. The light radius is the maximal + * light radius of all light emitting game objects in the map square. + * @param mapSquare the map square to update + * @param lightRadius the new light radius to set + */ + private void setLightRadius(@NotNull final MapSquare<G, A, R> mapSquare, final int lightRadius) { + final int prevLightRadius = mapSquare.getLightRadius(); + if (lightRadius == prevLightRadius) { + return; + } + mapSquare.setLightRadius(lightRadius); + if (lightRadius < prevLightRadius) { + // light radius shrinked => remove light sources + for (int dx = -prevLightRadius; dx <= prevLightRadius; dx++) { + for (int dy = -prevLightRadius; dy <= prevLightRadius; dy++) { + if (dx < -lightRadius || dx > lightRadius || dy < -lightRadius || dy > lightRadius || lightRadius == 0) { + point2.x = mapSquare.getMapX() + dx; + point2.y = mapSquare.getMapY() + dy; + try { + final MapSquare<G, A, R> mapSquare2 = mapModel.getMapSquare(point2); + mapSquare2.removeLightSource(mapSquare); + } catch (final IndexOutOfBoundsException ignored) { + // skip points outside map bounds + } + } + } + } + } else { + // light increased shrinked => add light sources + for (int dx = -lightRadius; dx <= lightRadius; dx++) { + for (int dy = -lightRadius; dy <= lightRadius; dy++) { + if (dx < -prevLightRadius || dx > prevLightRadius || dy < -prevLightRadius || dy > prevLightRadius || prevLightRadius == 0) { + point2.x = mapSquare.getMapX() + dx; + point2.y = mapSquare.getMapY() + dy; + try { + mapModel.getMapSquare(point2).addLightSource(mapSquare); + } catch (final IndexOutOfBoundsException ignored) { + // skip points outside map bounds + } + } + } + } + } + } + +} Property changes on: trunk/model/src/app/net/sf/gridarta/model/mapmodel/LightMapModelTracker.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Modified: trunk/model/src/app/net/sf/gridarta/model/mapmodel/MapSquare.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/mapmodel/MapSquare.java 2012-05-31 19:33:36 UTC (rev 9177) +++ trunk/model/src/app/net/sf/gridarta/model/mapmodel/MapSquare.java 2012-05-31 19:52:21 UTC (rev 9178) @@ -20,6 +20,9 @@ package net.sf.gridarta.model.mapmodel; import java.awt.Point; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.baseobject.GameObjectContainer; import net.sf.gridarta.model.gameobject.GameObject; @@ -61,6 +64,20 @@ private final int mapY; /** + * The maximum light radius of all objects within this map square. Set to + * <code>0</code> if no light emitting objects are present. + */ + private int lightRadius; + + /** + * The {@link MapSquare MapSquares} on the {@link #mapModel map} that + * contain light emitting game objects that affect this map square. Set to + * {@link Collections#emptyList()} when empty. + */ + @NotNull + private List<MapSquare<G, A, R>> lightSources = Collections.emptyList(); + + /** * Creates a new instance. * @param mapModel the map model this map square is part of * @param mapX the x coordinate of this map square within the model's grid @@ -316,4 +333,78 @@ return mapModel.getMapArchObject().getMapName() + ":" + mapX + "/" + mapY; } + /** + * Returns the maximum light radius of all light emitting objects within + * this map square. + * @return the light radius or <code>0</code></codE> if no light emitting + * objects are present + */ + public int getLightRadius() { + return lightRadius; + } + + /** + * Sets the maximum light radius of all light emitting objects within this + * map square. + * @param lightRadius the light radius or <code>0</code></codE> if no light + * emitting objects are present + */ + public void setLightRadius(final int lightRadius) { + if (this.lightRadius == lightRadius) { + return; + } + + notifyBeginChange(); + try { + this.lightRadius = lightRadius; + } finally { + notifyEndChange(); + } + } + + /** + * Adds a light emitting game object that affects this map square. + * @param mapSquare the map square that contains the game object + */ + public void addLightSource(@NotNull final MapSquare<G, A, R> mapSquare) { + if (lightSources.isEmpty()) { + lightSources = new ArrayList<MapSquare<G, A, R>>(); + } + + notifyBeginChange(); + try { + lightSources.add(mapSquare); + } finally { + notifyEndChange(); + } + } + + /** + * Removes a light emitting game object that affects this map square. + * @param mapSquare the map square that contains the game object + */ + public void removeLightSource(@NotNull final MapSquare<G, A, R> mapSquare) { + notifyBeginChange(); + try { + if (!lightSources.remove(mapSquare)) { + assert false; + } + if (lightSources.isEmpty()) { + lightSources = Collections.emptyList(); + } + } finally { + notifyEndChange(); + } + } + + /** + * Returns whether this map square is affected by any light emitting game + * objects. + * @return whether this map square is affected by any light emitting game + * objects + */ + public boolean isLight() { + return !lightSources.isEmpty(); + } + } Modified: trunk/model/src/test/net/sf/gridarta/model/gameobject/TestGameObject.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/gameobject/TestGameObject.java 2012-05-31 19:33:36 UTC (rev 9177) +++ trunk/model/src/test/net/sf/gridarta/model/gameobject/TestGameObject.java 2012-05-31 19:52:21 UTC (rev 9178) @@ -72,6 +72,14 @@ * {@inheritDoc} */ @Override + public int getLightRadius() { + return 0; + } + + /** + * {@inheritDoc} + */ + @Override public void propagateElevation(@NotNull final BaseObject<?, ?, ?, ?> gameObject) { // ignore } Modified: trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractIsoMapRenderer.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractIsoMapRenderer.java 2012-05-31 19:33:36 UTC (rev 9177) +++ trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractIsoMapRenderer.java 2012-05-31 19:52:21 UTC (rev 9178) @@ -656,13 +656,17 @@ * @param g the graphics for painting */ private void paintMapSelection(@NotNull final Graphics g) { + final Point point = new Point(); for (int y = 0; y < mapSize.getHeight(); y++) { int xStart = origin.x - (y + 1) * isoMapSquareInfo.getXLen2(); int yStart = origin.y + y * isoMapSquareInfo.getYLen2(); + point.y = y; for (int x = 0; x < mapSize.getWidth(); x++) { if (g.hitClip(xStart, yStart, isoMapSquareInfo.getXLen(), isoMapSquareInfo.getYLen())) { final int gridFlags = mapGrid.getFlags(x, y); - gridMapSquarePainter.paint(g, gridFlags, xStart, yStart, this); + point.x = x; + final boolean light = mapModel.getMapSquare(point).isLight(); + gridMapSquarePainter.paint(g, gridFlags, light, xStart, yStart, this); } else { /* DO NOTHING if outside clip region. * DO NOT use continue. xStart and yStart are recalculated at the end of the loop. Modified: trunk/src/app/net/sf/gridarta/gui/map/renderer/GridMapSquarePainter.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/renderer/GridMapSquarePainter.java 2012-05-31 19:33:36 UTC (rev 9177) +++ trunk/src/app/net/sf/gridarta/gui/map/renderer/GridMapSquarePainter.java 2012-05-31 19:52:21 UTC (rev 9178) @@ -74,6 +74,12 @@ private final Image warningSquareImg; /** + * The overlay {@link Image} for map squares that are affected by light + * emitting game objects. + */ + private final Image lightSquare; + + /** * Creates a new instance. * @param systemIcons the system icons for creating icons */ @@ -86,17 +92,20 @@ preSelImg = systemIcons.getMapPreSelectedIcon().getImage(); cursorImg = systemIcons.getMapCursorIcon().getImage(); warningSquareImg = systemIcons.getWarningSquareIcon().getImage(); + lightSquare = systemIcons.getLightSquareIcon().getImage(); } /** * Paints overlay images for one grid square. * @param graphics the graphics to paint into * @param gridFlags the grid flags to paint + * @param light whether this map square is affected by a light emitting game + * object * @param x the x-coordinate to paint at * @param y the y-coordinate to paint at * @param imageObserver the image observer to notify */ - public void paint(@NotNull final Graphics graphics, final int gridFlags, final int x, final int y, @NotNull final ImageObserver imageObserver) { + public void paint(@NotNull final Graphics graphics, final int gridFlags, final boolean light, final int x, final int y, @NotNull final ImageObserver imageObserver) { if ((gridFlags & MapGrid.GRID_FLAG_SELECTION) != 0) { graphics.drawImage(selImg, x, y, imageObserver); } @@ -121,6 +130,9 @@ if ((gridFlags & MapGrid.GRID_FLAG_ERROR) != 0) { graphics.drawImage(warningSquareImg, x, y, imageObserver); } + if (light) { + graphics.drawImage(lightSquare, x, y, imageObserver); + } } } Modified: trunk/utils/src/app/net/sf/gridarta/utils/SystemIcons.java =================================================================== --- trunk/utils/src/app/net/sf/gridarta/utils/SystemIcons.java 2012-05-31 19:33:36 UTC (rev 9177) +++ trunk/utils/src/app/net/sf/gridarta/utils/SystemIcons.java 2012-05-31 19:52:21 UTC (rev 9178) @@ -65,6 +65,12 @@ public static final String SQUARE_WARNING = SYSTEM_DIR + "warning.png"; + /** + * The name of the image for highlighting map squares that are affected by + * nearby light emitting game objects. + */ + public static final String SQUARE_LIGHT = SYSTEM_DIR + "light.png"; + public static final String SQUARE_NO_FACE = SYSTEM_DIR + "no_face.png"; public static final String SQUARE_NO_ARCH = SYSTEM_DIR + "no_arch.png"; @@ -137,6 +143,9 @@ private ImageIcon warningSquareIcon = null; @Nullable + private ImageIcon lightSquareIcon = null; + + @Nullable private ImageIcon noFaceSquareIcon = null; @Nullable @@ -234,8 +243,28 @@ return warningSquareIcon; } + /** + * Returns the {@link ImageIcon} for highlighting map squares that are + * affected by nearby light emitting game objects. + * @return the image icon + */ @NotNull @SuppressWarnings("NullableProblems") + public ImageIcon getLightSquareIcon() { + if (lightSquareIcon == null) { + final ImageFilter alphaFilter = AlphaImageFilterInstance.ALPHA_FILTER; + final ImageIcon sysIcon = guiUtils.getResourceIcon(SQUARE_LIGHT); + final Image image = sysIcon.getImage(); + final ImageProducer source = image.getSource(); + final ImageProducer producer = new FilteredImageSource(source, alphaFilter); + final Image image2 = Toolkit.getDefaultToolkit().createImage(producer); + lightSquareIcon = new ImageIcon(image2); + } + return lightSquareIcon; + } + + @NotNull + @SuppressWarnings("NullableProblems") public ImageIcon getNoFaceSquareIcon() { if (noFaceSquareIcon == null) { noFaceSquareIcon = guiUtils.getResourceIcon(SQUARE_NO_FACE); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2012-06-14 20:47:59
|
Revision: 9179 http://gridarta.svn.sourceforge.net/gridarta/?rev=9179&view=rev Author: akirschbaum Date: 2012-06-14 20:47:53 +0000 (Thu, 14 Jun 2012) Log Message: ----------- Change colors of tiles with warnings and of lighted tiles. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/atrinik/resource/system/light.png trunk/atrinik/resource/system/warning.png trunk/crossfire/ChangeLog trunk/crossfire/resource/system/light.png trunk/crossfire/resource/system/warning.png trunk/daimonin/ChangeLog trunk/daimonin/resource/system/light.png trunk/daimonin/resource/system/warning.png Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2012-05-31 19:52:21 UTC (rev 9178) +++ trunk/atrinik/ChangeLog 2012-06-14 20:47:53 UTC (rev 9179) @@ -1,3 +1,7 @@ +2012-06-14 Andreas Kirschbaum + + * Change colors of tiles with warnings and of lighted tiles. + 2012-05-31 Andreas Kirschbaum * Implement #3527374 (Illumination coverage filter). For now this Modified: trunk/atrinik/resource/system/light.png =================================================================== (Binary files differ) Modified: trunk/atrinik/resource/system/warning.png =================================================================== (Binary files differ) Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2012-05-31 19:52:21 UTC (rev 9178) +++ trunk/crossfire/ChangeLog 2012-06-14 20:47:53 UTC (rev 9179) @@ -1,3 +1,7 @@ +2012-06-14 Andreas Kirschbaum + + * Change colors of tiles with warnings and of lighted tiles. + 2012-05-31 Andreas Kirschbaum * Implement #3527374 (Illumination coverage filter). For now this Modified: trunk/crossfire/resource/system/light.png =================================================================== (Binary files differ) Modified: trunk/crossfire/resource/system/warning.png =================================================================== (Binary files differ) Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2012-05-31 19:52:21 UTC (rev 9178) +++ trunk/daimonin/ChangeLog 2012-06-14 20:47:53 UTC (rev 9179) @@ -1,3 +1,7 @@ +2012-06-14 Andreas Kirschbaum + + * Change colors of tiles with warnings and of lighted tiles. + 2012-05-31 Andreas Kirschbaum * Implement #3527374 (Illumination coverage filter). For now this Modified: trunk/daimonin/resource/system/light.png =================================================================== (Binary files differ) Modified: trunk/daimonin/resource/system/warning.png =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2012-06-15 19:00:56
|
Revision: 9180 http://gridarta.svn.sourceforge.net/gridarta/?rev=9180&view=rev Author: akirschbaum Date: 2012-06-15 19:00:47 +0000 (Fri, 15 Jun 2012) Log Message: ----------- Implement Map|Show Light to toggle highlighting of lighted map squares. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/action.properties trunk/crossfire/ChangeLog trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/action.properties trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/AbstractFlatMapRenderer.java trunk/daimonin/ChangeLog trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/action.properties trunk/model/src/app/net/sf/gridarta/model/mapviewsettings/AbstractMapViewSettings.java trunk/model/src/app/net/sf/gridarta/model/mapviewsettings/DefaultMapViewSettings.java trunk/model/src/app/net/sf/gridarta/model/mapviewsettings/MapViewSettings.java trunk/model/src/app/net/sf/gridarta/model/mapviewsettings/MapViewSettingsListener.java trunk/model/src/test/net/sf/gridarta/model/mapviewsettings/TestMapViewSettings.java trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapActions.java trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewsManager.java trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractIsoMapRenderer.java trunk/src/app/net/sf/gridarta/gui/map/viewaction/ViewActions.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 Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2012-06-14 20:47:53 UTC (rev 9179) +++ trunk/atrinik/ChangeLog 2012-06-15 19:00:47 UTC (rev 9180) @@ -1,3 +1,8 @@ +2012-06-15 Andreas Kirschbaum + + * Implement Map|Show Light to toggle highlighting of lighted map + squares. + 2012-06-14 Andreas Kirschbaum * Change colors of tiles with warnings and of lighted tiles. Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/action.properties =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/action.properties 2012-06-14 20:47:53 UTC (rev 9179) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/action.properties 2012-06-15 19:00:47 UTC (rev 9180) @@ -33,7 +33,7 @@ resources.menu=collectArches collectSpells - reloadFaces - viewTreasurelists tools.menu=newScript editScript - controlServer controlClient - validateMap cleanCompletelyBlockedSquares - zoom gc analyze.menu= -view.menu=resetView - gridVisible doubleFaces - prevWindow nextWindow +view.menu=resetView - gridVisible lightVisible doubleFaces - prevWindow nextWindow plugins.menu=- editPlugins - savePlugins importPlugin window.menu=closeAllMaps help.menu=showHelp tipOfTheDay about update @@ -42,7 +42,7 @@ mapwindowFile.menu=saveMap saveMapAs createImage - reloadMap - closeMap mapwindowEdit.menu=undo redo - clear cut copy paste pasteTiled - shift - find findNext findPrev replace fillAuto fillAbove fillBelow randFillAuto randFillAbove randFillBelow floodFill - selectAll invertSelection expandEmptySelection growSelection shrinkSelection -mapwindowMap.menu=gridVisible - goExit enterExit nextExit prevExit enterNorthMap enterEastMap enterSouthMap enterWestMap enterNorthEastMap enterSouthEastMap enterSouthWestMap enterNorthWestMap - mapCreateView mapProperties shrinkMapSize deleteUnknownObjects +mapwindowMap.menu=gridVisible lightVisible - goExit enterExit nextExit prevExit enterNorthMap enterEastMap enterSouthMap enterWestMap enterNorthEastMap enterSouthEastMap enterSouthWestMap enterNorthWestMap - mapCreateView mapProperties shrinkMapSize deleteUnknownObjects mapwindowCursor.menu=moveCursor - exitConnector - selectSquare startStopDrag addToSelection subFromSelection releaseDrag - insertArch deleteArch - selectArchAbove selectArchBelow - archAttributes ########## Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2012-06-14 20:47:53 UTC (rev 9179) +++ trunk/crossfire/ChangeLog 2012-06-15 19:00:47 UTC (rev 9180) @@ -1,3 +1,8 @@ +2012-06-15 Andreas Kirschbaum + + * Implement Map|Show Light to toggle highlighting of lighted map + squares. + 2012-06-14 Andreas Kirschbaum * Change colors of tiles with warnings and of lighted tiles. Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/action.properties =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/action.properties 2012-06-14 20:47:53 UTC (rev 9179) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/action.properties 2012-06-15 19:00:47 UTC (rev 9180) @@ -33,7 +33,7 @@ resources.menu=collectArches - reloadFaces - viewTreasurelists tools.menu=newScript editScript - controlServer controlClient - validateMap - zoom gc analyze.menu= -view.menu=resetView - gridVisible smoothing - prevWindow nextWindow +view.menu=resetView - gridVisible lightVisible smoothing - prevWindow nextWindow plugins.menu=- editPlugins - savePlugins importPlugin window.menu=closeAllMaps help.menu=showHelp tipOfTheDay about update @@ -42,7 +42,7 @@ mapwindowFile.menu=saveMap saveMapAs createImage - reloadMap - closeMap mapwindowEdit.menu=undo redo - clear cut copy paste pasteTiled - shift - find findNext findPrev replace fillAuto fillAbove fillBelow randFillAuto randFillAbove randFillBelow floodFill - selectAll invertSelection expandEmptySelection growSelection shrinkSelection -mapwindowMap.menu=gridVisible smoothing - goExit enterExit nextExit prevExit enterNorthMap enterEastMap enterSouthMap enterWestMap tileShow - mapCreateView mapProperties shrinkMapSize deleteUnknownObjects +mapwindowMap.menu=gridVisible lightVisible smoothing - goExit enterExit nextExit prevExit enterNorthMap enterEastMap enterSouthMap enterWestMap tileShow - mapCreateView mapProperties shrinkMapSize deleteUnknownObjects mapwindowCursor.menu=moveCursor - exitConnector - selectSquare startStopDrag addToSelection subFromSelection releaseDrag - insertArch deleteArch - selectArchAbove selectArchBelow - archAttributes ########## Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/AbstractFlatMapRenderer.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/AbstractFlatMapRenderer.java 2012-06-14 20:47:53 UTC (rev 9179) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/AbstractFlatMapRenderer.java 2012-06-15 19:00:47 UTC (rev 9180) @@ -130,6 +130,11 @@ } @Override + public void lightVisibleChanged(final boolean lightVisible) { + forceRepaint(); + } + + @Override public void smoothingChanged(final boolean smoothing) { forceRepaint(); } @@ -418,7 +423,7 @@ */ protected void paintSquareSelection(@NotNull final Graphics graphics, @NotNull final Point point) { final int gridFlags = mapGrid.getFlags(point.x, point.y); - final boolean light = mapModel.getMapSquare(point).isLight(); + final boolean light = mapViewSettings.isLightVisible() && mapModel.getMapSquare(point).isLight(); gridMapSquarePainter.paint(graphics, gridFlags, light, borderOffset.x + point.x * IGUIConstants.SQUARE_WIDTH, borderOffset.y + point.y * IGUIConstants.SQUARE_HEIGHT, this); } Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2012-06-14 20:47:53 UTC (rev 9179) +++ trunk/daimonin/ChangeLog 2012-06-15 19:00:47 UTC (rev 9180) @@ -1,3 +1,8 @@ +2012-06-15 Andreas Kirschbaum + + * Implement Map|Show Light to toggle highlighting of lighted map + squares. + 2012-06-14 Andreas Kirschbaum * Change colors of tiles with warnings and of lighted tiles. Modified: trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/action.properties =================================================================== --- trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/action.properties 2012-06-14 20:47:53 UTC (rev 9179) +++ trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/action.properties 2012-06-15 19:00:47 UTC (rev 9180) @@ -33,7 +33,7 @@ resources.menu=collectArches collectSpells - reloadFaces - viewTreasurelists tools.menu=newScript editScript - controlServer controlClient - validateMap cleanCompletelyBlockedSquares - zoom gc analyze.menu= -view.menu=resetView - gridVisible doubleFaces - prevWindow nextWindow +view.menu=resetView - gridVisible lightVisible doubleFaces - prevWindow nextWindow plugins.menu=- editPlugins - savePlugins importPlugin window.menu=closeAllMaps help.menu=showHelp tipOfTheDay about update @@ -42,7 +42,7 @@ mapwindowFile.menu=saveMap saveMapAs createImage - reloadMap - closeMap mapwindowEdit.menu=undo redo - clear cut copy paste pasteTiled - shift - find findNext findPrev replace fillAuto fillAbove fillBelow randFillAuto randFillAbove randFillBelow floodFill - selectAll invertSelection expandEmptySelection growSelection shrinkSelection -mapwindowMap.menu=gridVisible - goExit enterExit nextExit prevExit enterNorthMap enterEastMap enterSouthMap enterWestMap enterNorthEastMap enterSouthEastMap enterSouthWestMap enterNorthWestMap - mapCreateView mapProperties shrinkMapSize deleteUnknownObjects +mapwindowMap.menu=gridVisible lightVisible - goExit enterExit nextExit prevExit enterNorthMap enterEastMap enterSouthMap enterWestMap enterNorthEastMap enterSouthEastMap enterSouthWestMap enterNorthWestMap - mapCreateView mapProperties shrinkMapSize deleteUnknownObjects mapwindowCursor.menu=moveCursor - exitConnector - selectSquare startStopDrag addToSelection subFromSelection releaseDrag - insertArch deleteArch - selectArchAbove selectArchBelow - archAttributes ########## Modified: trunk/model/src/app/net/sf/gridarta/model/mapviewsettings/AbstractMapViewSettings.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/mapviewsettings/AbstractMapViewSettings.java 2012-06-14 20:47:53 UTC (rev 9179) +++ trunk/model/src/app/net/sf/gridarta/model/mapviewsettings/AbstractMapViewSettings.java 2012-06-15 19:00:47 UTC (rev 9180) @@ -37,6 +37,11 @@ private boolean gridVisible = loadGridVisible(); /** + * The visibility of the light. + */ + private boolean lightVisible = loadLightVisible(); + + /** * Whether smoothing display is active. */ private boolean smoothing = loadSmoothing(); @@ -123,6 +128,28 @@ * {@inheritDoc} */ @Override + public boolean isLightVisible() { + return lightVisible; + } + + /** + * {@inheritDoc} + */ + @Override + public void setLightVisible(final boolean lightVisible) { + if (this.lightVisible == lightVisible) { + return; + } + + this.lightVisible = lightVisible; + saveLightVisible(lightVisible); + fireLightVisibleChanged(); + } + + /** + * {@inheritDoc} + */ + @Override public boolean isSmoothing() { return smoothing; } @@ -301,6 +328,15 @@ } /** + * Informs all registered listeners that the light visibility has changed. + */ + private void fireLightVisibleChanged() { + for (final MapViewSettingsListener listener : listenerList.getListeners()) { + listener.lightVisibleChanged(lightVisible); + } + } + + /** * Informs all registered listeners that the smoothing setting has changed. */ private void fireSmoothingChanged() { @@ -359,6 +395,18 @@ protected abstract void saveGridVisible(final boolean gridVisible); /** + * Loads the default value for {@link #lightVisible}. + * @return the default value + */ + protected abstract boolean loadLightVisible(); + + /** + * Saves the {@link #lightVisible} value. + * @param lightVisible the light visible value + */ + protected abstract void saveLightVisible(final boolean lightVisible); + + /** * Loads the default value for {@link #smoothing}. * @return the default value */ Modified: trunk/model/src/app/net/sf/gridarta/model/mapviewsettings/DefaultMapViewSettings.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/mapviewsettings/DefaultMapViewSettings.java 2012-06-14 20:47:53 UTC (rev 9179) +++ trunk/model/src/app/net/sf/gridarta/model/mapviewsettings/DefaultMapViewSettings.java 2012-06-15 19:00:47 UTC (rev 9180) @@ -38,6 +38,12 @@ private static final String GRID_VISIBLE_KEY = "mapViewSettings.gridVisible"; /** + * Key for saving {@link #lightVisible} state in preferences. + */ + @NotNull + private static final String LIGHT_VISIBLE_KEY = "mapViewSettings.lightVisible"; + + /** * Key for saving {@link #smoothing} state in preferences. */ @NotNull @@ -87,6 +93,22 @@ * {@inheritDoc} */ @Override + protected boolean loadLightVisible() { + return preferences.getBoolean(LIGHT_VISIBLE_KEY, false); + } + + /** + * {@inheritDoc} + */ + @Override + protected void saveLightVisible(final boolean lightVisible) { + preferences.putBoolean(LIGHT_VISIBLE_KEY, lightVisible); + } + + /** + * {@inheritDoc} + */ + @Override protected boolean loadSmoothing() { return preferences.getBoolean(SMOOTHING_KEY, false); } Modified: trunk/model/src/app/net/sf/gridarta/model/mapviewsettings/MapViewSettings.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/mapviewsettings/MapViewSettings.java 2012-06-14 20:47:53 UTC (rev 9179) +++ trunk/model/src/app/net/sf/gridarta/model/mapviewsettings/MapViewSettings.java 2012-06-15 19:00:47 UTC (rev 9180) @@ -56,6 +56,20 @@ void setGridVisible(boolean gridVisible); /** + * Get the visibility of the light. + * @return visibility of the light (<code>true</code> for visible, + * <code>false</code> for invisible) + */ + boolean isLightVisible(); + + /** + * Set the visibility of the light. + * @param lightVisible new visibility of the light (<code>true</code> for + * making the light visible, <code>false</code> for invisible) + */ + void setLightVisible(boolean lightVisible); + + /** * Returns the smoothing setting. * @return the smoothing setting */ Modified: trunk/model/src/app/net/sf/gridarta/model/mapviewsettings/MapViewSettingsListener.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/mapviewsettings/MapViewSettingsListener.java 2012-06-14 20:47:53 UTC (rev 9179) +++ trunk/model/src/app/net/sf/gridarta/model/mapviewsettings/MapViewSettingsListener.java 2012-06-15 19:00:47 UTC (rev 9180) @@ -37,6 +37,12 @@ void gridVisibleChanged(boolean gridVisible); /** + * This event handler is called when the .ight visibility has changed. + * @param lightVisible the new light visibility + */ + void lightVisibleChanged(boolean lightVisible); + + /** * This event handler is called when the smoothing setting has changed. * @param smoothing the new smoothing settings */ Modified: trunk/model/src/test/net/sf/gridarta/model/mapviewsettings/TestMapViewSettings.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/mapviewsettings/TestMapViewSettings.java 2012-06-14 20:47:53 UTC (rev 9179) +++ trunk/model/src/test/net/sf/gridarta/model/mapviewsettings/TestMapViewSettings.java 2012-06-15 19:00:47 UTC (rev 9180) @@ -46,6 +46,22 @@ * {@inheritDoc} */ @Override + protected boolean loadLightVisible() { + return false; + } + + /** + * {@inheritDoc} + */ + @Override + protected void saveLightVisible(final boolean lightVisible) { + // ignore + } + + /** + * {@inheritDoc} + */ + @Override protected boolean loadSmoothing() { return false; } Modified: trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapActions.java 2012-06-14 20:47:53 UTC (rev 9179) +++ trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapActions.java 2012-06-15 19:00:47 UTC (rev 9180) @@ -84,6 +84,12 @@ private final ToggleAction aGridVisible = (ToggleAction) ACTION_BUILDER.createToggle(true, "gridVisible", this); /** + * Action for "light visible". + */ + @NotNull + private final ToggleAction aLightVisible = (ToggleAction) ACTION_BUILDER.createToggle(true, "lightVisible", this); + + /** * Action for "smoothing". */ @NotNull @@ -239,6 +245,11 @@ } @Override + public void lightVisibleChanged(final boolean lightVisible) { + updateActions(); + } + + @Override public void smoothingChanged(final boolean smoothing) { updateActions(); } @@ -433,6 +444,28 @@ } /** + * Action method for "light visible". + * @return <code>true</code> if the light is visible, or <code>false</code> + * if the light is invisible + */ + @ActionMethod + public boolean isLightVisible() { + return doLightVisible(false, false) && mapViewSettings.isLightVisible(); + } + + /** + * Sets whether the light of the current map should be visible. + * @param lightVisible new visibility of light in current map, + * <code>true</code> if the light should be visible, <code>false</code> if + * invisible + * @see #isLightVisible() + */ + @ActionMethod + public void setLightVisible(final boolean lightVisible) { + doLightVisible(true, lightVisible); + } + + /** * Action method for "smoothing". * @return <code>true</code> if smoothing is active, or <code>false</code> * if smoothing is disabled @@ -666,6 +699,8 @@ private void updateActions() { aGridVisible.setEnabled(doGridVisible(false, false)); aGridVisible.setSelected(isGridVisible()); + aLightVisible.setEnabled(doLightVisible(false, false)); + aLightVisible.setSelected(isLightVisible()); aSmoothing.setEnabled(doSmoothing(false, false)); aSmoothing.setSelected(isSmoothing()); aDoubleFaces.setEnabled(doDoubleFaces(false, false)); @@ -703,6 +738,22 @@ } /** + * Executes the "light visible" action. + * @param performAction whether the action should be performed + * @param lightVisible whether the light should be visible; ignored unless + * <code>performAction</code> is set + * @return whether the action was or can be performed + * @noinspection SameReturnValue + */ + private boolean doLightVisible(final boolean performAction, final boolean lightVisible) { + if (performAction) { + mapViewSettings.setLightVisible(lightVisible); + } + + return true; + } + + /** * Executes the "smoothing" action. * @param performAction whether the action should be performed * @param smoothing whether smoothing should be performed; ignored unless Modified: trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewsManager.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewsManager.java 2012-06-14 20:47:53 UTC (rev 9179) +++ trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewsManager.java 2012-06-15 19:00:47 UTC (rev 9180) @@ -81,6 +81,11 @@ } @Override + public void lightVisibleChanged(final boolean lightVisible) { + // ignore + } + + @Override public void smoothingChanged(final boolean smoothing) { // ignore } Modified: trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractIsoMapRenderer.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractIsoMapRenderer.java 2012-06-14 20:47:53 UTC (rev 9179) +++ trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractIsoMapRenderer.java 2012-06-15 19:00:47 UTC (rev 9180) @@ -164,6 +164,11 @@ } @Override + public void lightVisibleChanged(final boolean lightVisible) { + forceRepaint(); + } + + @Override public void smoothingChanged(final boolean smoothing) { // does not render smoothed faces } @@ -656,6 +661,7 @@ * @param g the graphics for painting */ private void paintMapSelection(@NotNull final Graphics g) { + final boolean lightVisible = mapViewSettings.isLightVisible(); final Point point = new Point(); for (int y = 0; y < mapSize.getHeight(); y++) { int xStart = origin.x - (y + 1) * isoMapSquareInfo.getXLen2(); @@ -665,7 +671,7 @@ if (g.hitClip(xStart, yStart, isoMapSquareInfo.getXLen(), isoMapSquareInfo.getYLen())) { final int gridFlags = mapGrid.getFlags(x, y); point.x = x; - final boolean light = mapModel.getMapSquare(point).isLight(); + final boolean light = lightVisible && mapModel.getMapSquare(point).isLight(); gridMapSquarePainter.paint(g, gridFlags, light, xStart, yStart, this); } else { /* DO NOTHING if outside clip region. Modified: trunk/src/app/net/sf/gridarta/gui/map/viewaction/ViewActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/viewaction/ViewActions.java 2012-06-14 20:47:53 UTC (rev 9179) +++ trunk/src/app/net/sf/gridarta/gui/map/viewaction/ViewActions.java 2012-06-15 19:00:47 UTC (rev 9180) @@ -106,6 +106,11 @@ } @Override + public void lightVisibleChanged(final boolean lightVisible) { + // ignore + } + + @Override public void smoothingChanged(final boolean smoothing) { // ignore } Modified: trunk/src/app/net/sf/gridarta/messages.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages.properties 2012-06-14 20:47:53 UTC (rev 9179) +++ trunk/src/app/net/sf/gridarta/messages.properties 2012-06-15 19:00:47 UTC (rev 9180) @@ -139,6 +139,11 @@ gridVisible.shortdescription=Draws a grid that shows the individual map squares. gridVisible.accel=ctrl pressed G +lightVisible.text=Show Light +lightVisible.mnemonic=L +lightVisible.shortdescription=Highlights map squares that are lighted. +lightVisible.accel=ctrl shift pressed L + smoothing.text=Show Smoothing smoothing.mnemonic=S smoothing.shortdescription=Hides square borders by smearing faces into adjacent squares. @@ -1167,6 +1172,7 @@ prefs.mapDirectory=Maps directory. prefs.MapSquareBottom=true=display Game Object Attribute Dialog at bottom, false=display at right side. prefs.mapViewSettings.gridVisible=Whether the map grid is visible. +prefs.mapViewSettings.lightVisible=Whether lighted map squares are highlighted. prefs.mapViewSettings.smoothing=Whether smoothing is active. prefs.mapViewSettings.doubleFaces=Whether double faces are shown. prefs.mapViewSettings.alphaType=The settings for alpha faces. Modified: trunk/src/app/net/sf/gridarta/messages_de.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages_de.properties 2012-06-14 20:47:53 UTC (rev 9179) +++ trunk/src/app/net/sf/gridarta/messages_de.properties 2012-06-15 19:00:47 UTC (rev 9180) @@ -122,6 +122,10 @@ gridVisible.mnemonic=G gridVisible.shortdescription=Zeichnet ein Gitter, das die verschiedenen Kartenfelder voneinander abgrenzt. +lightVisible.text=Beleuchtung anzeigen +lightVisible.mnemonic=L +lightVisible.shortdescription=Hebt beleuchtete Kartenfelder hervor. + smoothing.text=Smoothing anzeigen smoothing.mnemonic=S smoothing.shortdescription=Verwischt die \u00dcberg\u00e4nge zwischen benachbarten Kartenfeldern. Modified: trunk/src/app/net/sf/gridarta/messages_fr.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages_fr.properties 2012-06-14 20:47:53 UTC (rev 9179) +++ trunk/src/app/net/sf/gridarta/messages_fr.properties 2012-06-15 19:00:47 UTC (rev 9180) @@ -126,6 +126,10 @@ gridVisible.mnemonic=G #gridVisible.shortdescription= +#lightVisible.text= +#lightVisible.mnemonic= +#lightVisible.shortdescription= + smoothing.text=Lissage smoothing.mnemonic=L smoothing.shortdescription=Active le lissage des images, permettant un rendu moins carr\u00e9. Modified: trunk/src/app/net/sf/gridarta/messages_sv.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages_sv.properties 2012-06-14 20:47:53 UTC (rev 9179) +++ trunk/src/app/net/sf/gridarta/messages_sv.properties 2012-06-15 19:00:47 UTC (rev 9180) @@ -120,6 +120,10 @@ gridVisible.mnemonic=R gridVisible.shortdescription=Rita ut rutn\u00e4t f\u00f6r att visa enstaka kartrutor +#lightVisible.text= +#lightVisible.mnemonic= +#lightVisible.shortdescription= + #smoothing.text= #smoothing.mnemonic= #smoothing.shortdescription= This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2012-06-15 21:06:53
|
Revision: 9186 http://gridarta.svn.sourceforge.net/gridarta/?rev=9186&view=rev Author: akirschbaum Date: 2012-06-15 21:06:44 +0000 (Fri, 15 Jun 2012) Log Message: ----------- Temporarily invert the setting for "Map|Show Light" when CTRL+SHIFT is pressed. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/crossfire/ChangeLog trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/AbstractFlatMapRenderer.java trunk/daimonin/ChangeLog trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractIsoMapRenderer.java trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractMapRenderer.java trunk/src/app/net/sf/gridarta/gui/map/renderer/MapRenderer.java trunk/src/app/net/sf/gridarta/gui/mapuserlistener/MapUserListenerManager.java Added Paths: ----------- trunk/src/app/net/sf/gridarta/gui/mapuserlistener/MapKeyListener.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2012-06-15 19:57:18 UTC (rev 9185) +++ trunk/atrinik/ChangeLog 2012-06-15 21:06:44 UTC (rev 9186) @@ -1,5 +1,8 @@ 2012-06-15 Andreas Kirschbaum + * Temporarily invert the setting for "Map|Show Light" when + CTRL+SHIFT is pressed. + * Implement Map|Show Light to toggle highlighting of lighted map squares. Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2012-06-15 19:57:18 UTC (rev 9185) +++ trunk/crossfire/ChangeLog 2012-06-15 21:06:44 UTC (rev 9186) @@ -1,5 +1,8 @@ 2012-06-15 Andreas Kirschbaum + * Temporarily invert the setting for "Map|Show Light" when + CTRL+SHIFT is pressed. + * Implement Map|Show Light to toggle highlighting of lighted map squares. Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/AbstractFlatMapRenderer.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/AbstractFlatMapRenderer.java 2012-06-15 19:57:18 UTC (rev 9185) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/AbstractFlatMapRenderer.java 2012-06-15 21:06:44 UTC (rev 9186) @@ -423,7 +423,7 @@ */ protected void paintSquareSelection(@NotNull final Graphics graphics, @NotNull final Point point) { final int gridFlags = mapGrid.getFlags(point.x, point.y); - final boolean light = mapViewSettings.isLightVisible() && mapModel.getMapSquare(point).isLight(); + final boolean light = (isLightVisible() ^ mapViewSettings.isLightVisible()) && mapModel.getMapSquare(point).isLight(); gridMapSquarePainter.paint(graphics, gridFlags, light, borderOffset.x + point.x * IGUIConstants.SQUARE_WIDTH, borderOffset.y + point.y * IGUIConstants.SQUARE_HEIGHT, this); } Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2012-06-15 19:57:18 UTC (rev 9185) +++ trunk/daimonin/ChangeLog 2012-06-15 21:06:44 UTC (rev 9186) @@ -1,5 +1,8 @@ 2012-06-15 Andreas Kirschbaum + * Temporarily invert the setting for "Map|Show Light" when + CTRL+SHIFT is pressed. + * Implement Map|Show Light to toggle highlighting of lighted map squares. Modified: trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractIsoMapRenderer.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractIsoMapRenderer.java 2012-06-15 19:57:18 UTC (rev 9185) +++ trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractIsoMapRenderer.java 2012-06-15 21:06:44 UTC (rev 9186) @@ -661,7 +661,7 @@ * @param g the graphics for painting */ private void paintMapSelection(@NotNull final Graphics g) { - final boolean lightVisible = mapViewSettings.isLightVisible(); + final boolean lightVisible = isLightVisible() ^ mapViewSettings.isLightVisible(); final Point point = new Point(); for (int y = 0; y < mapSize.getHeight(); y++) { int xStart = origin.x - (y + 1) * isoMapSquareInfo.getXLen2(); Modified: trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractMapRenderer.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractMapRenderer.java 2012-06-15 19:57:18 UTC (rev 9185) +++ trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractMapRenderer.java 2012-06-15 21:06:44 UTC (rev 9186) @@ -75,6 +75,11 @@ private final GameObjectParser<G, A, R> gameObjectParser; /** + * Whether the setting for lighted map squares is inverted. + */ + private boolean lightVisible; + + /** * Creates a new instance. * @param mapModel the rendered map model * @param gameObjectParser the game object parser for generating tooltip @@ -133,4 +138,25 @@ return toolTipAppender.finish(); } + /** + * {@inheritDoc} + */ + @Override + public void setLightVisible(final boolean lightVisible) { + if (this.lightVisible == lightVisible) { + return; + } + + this.lightVisible = lightVisible; + forceRepaint(); + } + + /** + * Returns whether the setting for lighted map squares should be inverted. + * @return whether the setting should be inverted + */ + protected boolean isLightVisible() { + return lightVisible; + } + } Modified: trunk/src/app/net/sf/gridarta/gui/map/renderer/MapRenderer.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/renderer/MapRenderer.java 2012-06-15 19:57:18 UTC (rev 9185) +++ trunk/src/app/net/sf/gridarta/gui/map/renderer/MapRenderer.java 2012-06-15 21:06:44 UTC (rev 9186) @@ -26,6 +26,7 @@ import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; +import net.sf.gridarta.model.mapviewsettings.MapViewSettings; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -95,4 +96,10 @@ */ void scrollRectToVisible(@NotNull Rectangle aRect); + /** + * If set, inverts the setting of {@link MapViewSettings#isLightVisible()}. + * @param lightVisible whether lighted map squares are inverted + */ + void setLightVisible(final boolean lightVisible); + } Added: trunk/src/app/net/sf/gridarta/gui/mapuserlistener/MapKeyListener.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapuserlistener/MapKeyListener.java (rev 0) +++ trunk/src/app/net/sf/gridarta/gui/mapuserlistener/MapKeyListener.java 2012-06-15 21:06:44 UTC (rev 9186) @@ -0,0 +1,146 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2011 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.mapuserlistener; + +import java.awt.Component; +import java.awt.event.InputEvent; +import java.awt.event.KeyEvent; +import java.awt.event.KeyListener; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import net.sf.gridarta.gui.map.renderer.MapRenderer; +import net.sf.gridarta.model.archetype.Archetype; +import net.sf.gridarta.model.gameobject.GameObject; +import net.sf.gridarta.model.maparchobject.MapArchObject; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * Tracks key presses and maps them to actions. + * @author Andreas Kirschbaum + */ +public class MapKeyListener<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> { + + /** + * The {@link Component} being tracked for key actions. + */ + @NotNull + private final Component component; + + /** + * The {@link MapRenderer} being tracked for mouse actions. + */ + @NotNull + private final MapRenderer renderer; + + /** + * Whether the mouse is inside the window. + */ + private boolean inside = true; + + /** + * The {@link KeyListener} attached to {@link #component}. + */ + @NotNull + private final KeyListener keyListener = new KeyListener() { + + @Override + public void keyTyped(@NotNull final KeyEvent e) { + // ignore + } + + @Override + public void keyPressed(@NotNull final KeyEvent e) { + checkModifiers(e); + } + + @Override + public void keyReleased(@NotNull final KeyEvent e) { + checkModifiers(e); + } + + }; + + /** + * The {@link MouseListener} attached to {@link #renderer}. Checks the key + * modifiers whenever the mouse enters or leaves the window. + */ + @NotNull + private final MouseListener mouseListener = new MouseListener() { + + @Override + public void mouseClicked(@NotNull final MouseEvent e) { + // ignore + } + + @Override + public void mousePressed(@NotNull final MouseEvent e) { + // ignore + } + + @Override + public void mouseReleased(@NotNull final MouseEvent e) { + // ignore + } + + @Override + public void mouseEntered(@NotNull final MouseEvent e) { + inside = true; + checkModifiers(e); + } + + @Override + public void mouseExited(@NotNull final MouseEvent e) { + inside = false; + checkModifiers(null); + } + + }; + + /** + * Creates a new instance. + * @param component the component to track + * @param renderer the renderer to track + */ + public MapKeyListener(@NotNull final Component component, @NotNull final MapRenderer renderer) { + this.component = component; + this.renderer = renderer; + component.addKeyListener(keyListener); + renderer.addMouseListener(mouseListener); + } + + /** + * Must be called when this object is freed. Unregisters all listeners. + */ + public void closeNotify() { + renderer.removeMouseListener(mouseListener); + component.removeKeyListener(keyListener); + } + + /** + * Checks a {@link KeyEvent} for CTRL+ALT. + * @param e the event to check or <code>null</code> to disable highlighting + */ + private void checkModifiers(@Nullable final InputEvent e) { + final boolean lightVisible = e != null && inside && (e.getModifiers() & (InputEvent.CTRL_MASK | InputEvent.SHIFT_MASK)) == (InputEvent.CTRL_MASK | InputEvent.SHIFT_MASK); + renderer.setLightVisible(lightVisible); + } + +} Property changes on: trunk/src/app/net/sf/gridarta/gui/mapuserlistener/MapKeyListener.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Modified: trunk/src/app/net/sf/gridarta/gui/mapuserlistener/MapUserListenerManager.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapuserlistener/MapUserListenerManager.java 2012-06-15 19:57:18 UTC (rev 9185) +++ trunk/src/app/net/sf/gridarta/gui/mapuserlistener/MapUserListenerManager.java 2012-06-15 21:06:44 UTC (rev 9186) @@ -53,6 +53,12 @@ private final MapViewsManager<G, A, R> mapViewsManager; /** + * Maps {@link MapView} instance to attached {@link MapKeyListener}. + */ + @NotNull + private final Map<MapView<G, A, R>, MapKeyListener<G, A, R>> mapKeyListeners = new IdentityHashMap<MapView<G, A, R>, MapKeyListener<G, A, R>>(); + + /** * Maps {@link MapView} instance to attached {@link MapMouseListener}. */ @NotNull @@ -96,10 +102,17 @@ public void mapViewCreated(@NotNull final MapView<G, A, R> mapView) { final MapMouseListener<G, A, R> mapMouseListener = new MapMouseListener<G, A, R>(mapView.getRenderer(), toolPalette, mapView); mapUserListeners.put(mapView, mapMouseListener); + + final MapKeyListener<G, A, R> mapKeyListener = new MapKeyListener<G, A, R>(mapView.getInternalFrame(), mapView.getRenderer()); + mapKeyListeners.put(mapView, mapKeyListener); } @Override public void mapViewClosing(@NotNull final MapView<G, A, R> mapView) { + final MapKeyListener<G, A, R> mapKeyListener = mapKeyListeners.remove(mapView); + assert mapKeyListener != null; + mapKeyListener.closeNotify(); + final MapMouseListener<G, A, R> mapMouseListener = mapUserListeners.remove(mapView); assert mapMouseListener != null; mapMouseListener.closeNotify(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2012-06-17 18:58:39
|
Revision: 9195 http://gridarta.svn.sourceforge.net/gridarta/?rev=9195&view=rev Author: akirschbaum Date: 2012-06-17 18:58:33 +0000 (Sun, 17 Jun 2012) Log Message: ----------- Do not crash when shrinking a map if the map cursor is within the cut off area. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/crossfire/ChangeLog trunk/daimonin/ChangeLog trunk/model/src/app/net/sf/gridarta/model/mapgrid/MapGrid.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2012-06-17 14:40:43 UTC (rev 9194) +++ trunk/atrinik/ChangeLog 2012-06-17 18:58:33 UTC (rev 9195) @@ -1,3 +1,8 @@ +2012-06-17 Andreas Kirschbaum + + * Do not crash when shrinking a map if the map cursor is within + the cut off area. + 2012-06-15 Andreas Kirschbaum * Temporarily invert the setting for "Map|Show Light" when Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2012-06-17 14:40:43 UTC (rev 9194) +++ trunk/crossfire/ChangeLog 2012-06-17 18:58:33 UTC (rev 9195) @@ -1,3 +1,8 @@ +2012-06-17 Andreas Kirschbaum + + * Do not crash when shrinking a map if the map cursor is within + the cut off area. + 2012-06-15 Andreas Kirschbaum * Temporarily invert the setting for "Map|Show Light" when Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2012-06-17 14:40:43 UTC (rev 9194) +++ trunk/daimonin/ChangeLog 2012-06-17 18:58:33 UTC (rev 9195) @@ -1,3 +1,8 @@ +2012-06-17 Andreas Kirschbaum + + * Do not crash when shrinking a map if the map cursor is within + the cut off area. + 2012-06-15 Andreas Kirschbaum * Temporarily invert the setting for "Map|Show Light" when Modified: trunk/model/src/app/net/sf/gridarta/model/mapgrid/MapGrid.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/mapgrid/MapGrid.java 2012-06-17 14:40:43 UTC (rev 9194) +++ trunk/model/src/app/net/sf/gridarta/model/mapgrid/MapGrid.java 2012-06-17 18:58:33 UTC (rev 9195) @@ -277,7 +277,11 @@ public void unSetCursor(@NotNull final Point pos) { beginTransaction(); try { - unsetFlags(pos.x, pos.y, pos.x, pos.y, GRID_FLAG_CURSOR); + try { + unsetFlags(pos.x, pos.y, pos.x, pos.y, GRID_FLAG_CURSOR); + } catch (final ArrayIndexOutOfBoundsException ignored) { + // happens after map resizes if the map cursor was within the cut off area + } } finally { endTransaction(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2012-06-23 12:36:24
|
Revision: 9196 http://gridarta.svn.sourceforge.net/gridarta/?rev=9196&view=rev Author: akirschbaum Date: 2012-06-23 12:36:17 +0000 (Sat, 23 Jun 2012) Log Message: ----------- Add regression tests to check that IsoMapRenderer interprets align, rotate, z, and zoom. [Atrinik] Modified Paths: -------------- trunk/model/src/test/net/sf/gridarta/model/gameobject/TestGameObject.java trunk/model/src/test/net/sf/gridarta/model/mapmodel/TestMapModelCreator.java trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractIsoMapRenderer.java Added Paths: ----------- trunk/atrinik/src/test/net/sf/gridarta/var/atrinik/gui/ trunk/atrinik/src/test/net/sf/gridarta/var/atrinik/gui/map/ trunk/atrinik/src/test/net/sf/gridarta/var/atrinik/gui/map/renderer/ trunk/atrinik/src/test/net/sf/gridarta/var/atrinik/gui/map/renderer/MapRendererTest.java trunk/atrinik/src/test/net/sf/gridarta/var/atrinik/gui/map/renderer/TestMapRenderer.java Added: trunk/atrinik/src/test/net/sf/gridarta/var/atrinik/gui/map/renderer/MapRendererTest.java =================================================================== --- trunk/atrinik/src/test/net/sf/gridarta/var/atrinik/gui/map/renderer/MapRendererTest.java (rev 0) +++ trunk/atrinik/src/test/net/sf/gridarta/var/atrinik/gui/map/renderer/MapRendererTest.java 2012-06-23 12:36:17 UTC (rev 9196) @@ -0,0 +1,280 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2011 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.var.atrinik.gui.map.renderer; + +import java.awt.Point; +import java.util.Collections; +import net.sf.gridarta.gui.filter.DefaultFilterControl; +import net.sf.gridarta.gui.filter.FilterControl; +import net.sf.gridarta.gui.map.renderer.GridMapSquarePainter; +import net.sf.gridarta.model.archetype.TestArchetype; +import net.sf.gridarta.model.filter.NamedFilter; +import net.sf.gridarta.model.gameobject.DefaultIsoGameObject; +import net.sf.gridarta.model.gameobject.IsoMapSquareInfo; +import net.sf.gridarta.model.gameobject.MultiPositionData; +import net.sf.gridarta.model.gameobject.TestGameObject; +import net.sf.gridarta.model.io.GameObjectParser; +import net.sf.gridarta.model.maparchobject.TestMapArchObject; +import net.sf.gridarta.model.mapgrid.MapGrid; +import net.sf.gridarta.model.mapmodel.MapModel; +import net.sf.gridarta.model.mapmodel.TestMapModelCreator; +import net.sf.gridarta.model.mapviewsettings.MapViewSettings; +import net.sf.gridarta.model.match.NamedGameObjectMatcher; +import net.sf.gridarta.utils.SystemIcons; +import org.jetbrains.annotations.NotNull; +import org.junit.Assert; +import org.junit.Test; + +/** + * Regression tests that {@link net.sf.gridarta.gui.map.renderer.IsoMapRenderer} + * correctly interprets {@link DefaultIsoGameObject#ALIGN}, {@link + * DefaultIsoGameObject#ROTATE}, and {@link DefaultIsoGameObject#ZOOM}. + * @author Andreas Kirschbaum + */ +public class MapRendererTest { + + /** + * The {@link TestMapModelCreator} for creating {@link MapModel} instances. + */ + @NotNull + private final TestMapModelCreator mapModelCreator = new TestMapModelCreator(true); + + /** + * Checks rendering no game objects. + */ + @Test + public void testPaintEmpty() { + final MapModel<TestGameObject, TestMapArchObject, TestArchetype> mapModel = mapModelCreator.newMapModel(1, 1); + final TestMapRenderer renderer = newRenderer(mapModel); + renderer.getFullImage(); + Assert.assertEquals("", renderer.getPaintingOperations()); + } + + /** + * Checks rendering game objects without attributes that affect rendering. + */ + @Test + public void testPaintNormal() { + final MapModel<TestGameObject, TestMapArchObject, TestArchetype> mapModel = mapModelCreator.newMapModel(1, 1); + mapModel.beginTransaction("TEST"); + try { + mapModelCreator.addGameObjectToMap(mapModel, "arch", "name", 0, 0, mapModelCreator.getTopmostInsertionMode()); + } finally { + mapModel.endTransaction(); + } + final TestMapRenderer renderer = newRenderer(mapModel); + renderer.getFullImage(); + Assert.assertEquals("1.00 0.00 0.00 1.00 0.00 0.00\n", renderer.getPaintingOperations()); + } + + /** + * Checks that {@link DefaultIsoGameObject#ALIGN} shifts the x coordinate. + */ + @Test + public void testPaintAlign1() { + final MapModel<TestGameObject, TestMapArchObject, TestArchetype> mapModel = mapModelCreator.newMapModel(1, 1); + mapModel.beginTransaction("TEST"); + try { + final TestGameObject gameObject = mapModelCreator.newGameObject("arch", "name"); + gameObject.setAttributeInt(DefaultIsoGameObject.ALIGN, 5); + mapModel.addGameObjectToMap(gameObject, new Point(0, 0), mapModelCreator.getTopmostInsertionMode()); + } finally { + mapModel.endTransaction(); + } + final TestMapRenderer renderer = newRenderer(mapModel); + renderer.getFullImage(); + Assert.assertEquals("1.00 0.00 0.00 1.00 5.00 0.00\n", renderer.getPaintingOperations()); + } + + /** + * Checks that {@link DefaultIsoGameObject#ALIGN} shifts the x coordinate. + */ + @Test + public void testPaintAlign2() { + final MapModel<TestGameObject, TestMapArchObject, TestArchetype> mapModel = mapModelCreator.newMapModel(1, 1); + mapModel.beginTransaction("TEST"); + try { + final TestGameObject gameObject = mapModelCreator.newGameObject("arch", "name"); + gameObject.setAttributeInt(DefaultIsoGameObject.ALIGN, -5); + mapModel.addGameObjectToMap(gameObject, new Point(0, 0), mapModelCreator.getTopmostInsertionMode()); + } finally { + mapModel.endTransaction(); + } + final TestMapRenderer renderer = newRenderer(mapModel); + renderer.getFullImage(); + Assert.assertEquals("1.00 0.00 0.00 1.00 -5.00 0.00\n", renderer.getPaintingOperations()); + } + + /** + * Checks that {@link DefaultIsoGameObject#Z} shifts the y coordinate. + */ + @Test + public void testPaintZ1() { + final MapModel<TestGameObject, TestMapArchObject, TestArchetype> mapModel = mapModelCreator.newMapModel(1, 1); + mapModel.beginTransaction("TEST"); + try { + final TestGameObject gameObject = mapModelCreator.newGameObject("arch", "name"); + gameObject.setAttributeInt(DefaultIsoGameObject.Z, 5); + mapModel.addGameObjectToMap(gameObject, new Point(0, 0), mapModelCreator.getTopmostInsertionMode()); + } finally { + mapModel.endTransaction(); + } + final TestMapRenderer renderer = newRenderer(mapModel); + renderer.getFullImage(); + Assert.assertEquals("1.00 0.00 0.00 1.00 0.00 -5.00\n", renderer.getPaintingOperations()); + } + + /** + * Checks that {@link DefaultIsoGameObject#Z} shifts the y coordinate. + */ + @Test + public void testPaintZ2() { + final MapModel<TestGameObject, TestMapArchObject, TestArchetype> mapModel = mapModelCreator.newMapModel(1, 1); + mapModel.beginTransaction("TEST"); + try { + final TestGameObject gameObject = mapModelCreator.newGameObject("arch", "name"); + gameObject.setAttributeInt(DefaultIsoGameObject.Z, -5); + mapModel.addGameObjectToMap(gameObject, new Point(0, 0), mapModelCreator.getTopmostInsertionMode()); + } finally { + mapModel.endTransaction(); + } + final TestMapRenderer renderer = newRenderer(mapModel); + renderer.getFullImage(); + Assert.assertEquals("1.00 0.00 0.00 1.00 0.00 5.00\n", renderer.getPaintingOperations()); + } + + /** + * Checks that {@link DefaultIsoGameObject#ZOOM} scales. + */ + @Test + public void testPaintZoom1() { + final MapModel<TestGameObject, TestMapArchObject, TestArchetype> mapModel = mapModelCreator.newMapModel(1, 1); + mapModel.beginTransaction("TEST"); + try { + final TestGameObject gameObject = mapModelCreator.newGameObject("arch", "name"); + gameObject.setAttributeInt(DefaultIsoGameObject.ZOOM, 50); + mapModel.addGameObjectToMap(gameObject, new Point(0, 0), mapModelCreator.getTopmostInsertionMode()); + } finally { + mapModel.endTransaction(); + } + final TestMapRenderer renderer = newRenderer(mapModel); + renderer.getFullImage(); + Assert.assertEquals("0.500 0.00 0.00 0.500 0.00 0.00\n", renderer.getPaintingOperations()); + } + + /** + * Checks that {@link DefaultIsoGameObject#ZOOM} scales. + */ + @Test + public void testPaintZoom2() { + final MapModel<TestGameObject, TestMapArchObject, TestArchetype> mapModel = mapModelCreator.newMapModel(1, 1); + mapModel.beginTransaction("TEST"); + try { + final TestGameObject gameObject = mapModelCreator.newGameObject("arch", "name"); + gameObject.setAttributeInt(DefaultIsoGameObject.ZOOM, 100); + mapModel.addGameObjectToMap(gameObject, new Point(0, 0), mapModelCreator.getTopmostInsertionMode()); + } finally { + mapModel.endTransaction(); + } + final TestMapRenderer renderer = newRenderer(mapModel); + renderer.getFullImage(); + Assert.assertEquals("1.00 0.00 0.00 1.00 0.00 0.00\n", renderer.getPaintingOperations()); + } + + /** + * Checks that {@link DefaultIsoGameObject#ZOOM} scales. + */ + @Test + public void testPaintZoom3() { + final MapModel<TestGameObject, TestMapArchObject, TestArchetype> mapModel = mapModelCreator.newMapModel(1, 1); + mapModel.beginTransaction("TEST"); + try { + final TestGameObject gameObject = mapModelCreator.newGameObject("arch", "name"); + gameObject.setAttributeInt(DefaultIsoGameObject.ZOOM, 110); + mapModel.addGameObjectToMap(gameObject, new Point(0, 0), mapModelCreator.getTopmostInsertionMode()); + } finally { + mapModel.endTransaction(); + } + final TestMapRenderer renderer = newRenderer(mapModel); + renderer.getFullImage(); + Assert.assertEquals("1.10 0.00 0.00 1.10 0.00 0.00\n", renderer.getPaintingOperations()); // XXX: why not shift y = -0.1? + } + + /** + * Checks that {@link DefaultIsoGameObject#ZOOM} scales. + */ + @Test + public void testPaintZoom4() { + final MapModel<TestGameObject, TestMapArchObject, TestArchetype> mapModel = mapModelCreator.newMapModel(1, 1); + mapModel.beginTransaction("TEST"); + try { + final TestGameObject gameObject = mapModelCreator.newGameObject("arch", "name"); + gameObject.setAttributeInt(DefaultIsoGameObject.ZOOM, 200); + mapModel.addGameObjectToMap(gameObject, new Point(0, 0), mapModelCreator.getTopmostInsertionMode()); + } finally { + mapModel.endTransaction(); + } + final TestMapRenderer renderer = newRenderer(mapModel); + renderer.getFullImage(); + Assert.assertEquals("2.00 0.00 0.00 2.00 0.00 -1.00\n", renderer.getPaintingOperations()); + } + + /** + * Checks that a combination of attributes works as expected. + */ + @Test + public void testPaintCombined1() { + final MapModel<TestGameObject, TestMapArchObject, TestArchetype> mapModel = mapModelCreator.newMapModel(1, 1); + mapModel.beginTransaction("TEST"); + try { + final TestGameObject gameObject = mapModelCreator.newGameObject("arch", "name"); + gameObject.setAttributeInt(DefaultIsoGameObject.ALIGN, 5); + gameObject.setAttributeInt(DefaultIsoGameObject.ROTATE, 20); + gameObject.setAttributeInt(DefaultIsoGameObject.Z, 15); + gameObject.setAttributeInt(DefaultIsoGameObject.ZOOM, 75); + mapModel.addGameObjectToMap(gameObject, new Point(0, 0), mapModelCreator.getTopmostInsertionMode()); + } finally { + mapModel.endTransaction(); + } + final TestMapRenderer renderer = newRenderer(mapModel); + renderer.getFullImage(); + Assert.assertEquals("0.705 -0.257 0.257 0.705 5.00 -15.0\n", renderer.getPaintingOperations()); + } + + /** + * Creates a new {@link TestMapRenderer} instance for a {@link MapModel}. + * @param mapModel the map model for the renderer + * @return the renderer instance + */ + @NotNull + private TestMapRenderer newRenderer(@NotNull final MapModel<TestGameObject, TestMapArchObject, TestArchetype> mapModel) { + final MapViewSettings mapViewSettings = mapModelCreator.getMapViewSettings(); + final NamedFilter defaultNamedFilterList = new NamedFilter(Collections.<NamedGameObjectMatcher>emptyList()); + final FilterControl<TestGameObject, TestMapArchObject, TestArchetype> filterControl = new DefaultFilterControl<TestGameObject, TestMapArchObject, TestArchetype>(defaultNamedFilterList); + final MapGrid mapGrid = new MapGrid(mapModel.getMapArchObject().getMapSize()); + final IsoMapSquareInfo isoMapSquareInfo = new IsoMapSquareInfo(1, 1, 1, 1); + final MultiPositionData multiPositionData = new MultiPositionData(isoMapSquareInfo); + final SystemIcons systemIcons = mapModelCreator.getSystemIcons(); + final GridMapSquarePainter gridMapSquarePainter = new GridMapSquarePainter(systemIcons); + final GameObjectParser<TestGameObject, TestMapArchObject, TestArchetype> gameObjectParser = mapModelCreator.newGameObjectParser(); + return new TestMapRenderer(mapViewSettings, filterControl, mapModel, mapGrid, multiPositionData, isoMapSquareInfo, gridMapSquarePainter, gameObjectParser, systemIcons); + } + +} Property changes on: trunk/atrinik/src/test/net/sf/gridarta/var/atrinik/gui/map/renderer/MapRendererTest.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/atrinik/src/test/net/sf/gridarta/var/atrinik/gui/map/renderer/TestMapRenderer.java =================================================================== --- trunk/atrinik/src/test/net/sf/gridarta/var/atrinik/gui/map/renderer/TestMapRenderer.java (rev 0) +++ trunk/atrinik/src/test/net/sf/gridarta/var/atrinik/gui/map/renderer/TestMapRenderer.java 2012-06-23 12:36:17 UTC (rev 9196) @@ -0,0 +1,116 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2011 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.var.atrinik.gui.map.renderer; + +import java.awt.Graphics2D; +import javax.swing.Icon; +import net.sf.gridarta.gui.filter.FilterControl; +import net.sf.gridarta.gui.map.renderer.GridMapSquarePainter; +import net.sf.gridarta.gui.map.renderer.IsoMapRenderer; +import net.sf.gridarta.model.archetype.TestArchetype; +import net.sf.gridarta.model.gameobject.IsoMapSquareInfo; +import net.sf.gridarta.model.gameobject.MultiPositionData; +import net.sf.gridarta.model.gameobject.TestGameObject; +import net.sf.gridarta.model.io.GameObjectParser; +import net.sf.gridarta.model.maparchobject.TestMapArchObject; +import net.sf.gridarta.model.mapgrid.MapGrid; +import net.sf.gridarta.model.mapmodel.MapModel; +import net.sf.gridarta.model.mapviewsettings.MapViewSettings; +import net.sf.gridarta.utils.SystemIcons; +import org.jetbrains.annotations.NotNull; + +/** + * An {@link IsoMapRenderer} for regression tests. It records all painting + * operations. + * @author Andreas Kirschbaum + */ +public class TestMapRenderer extends IsoMapRenderer<TestGameObject, TestMapArchObject, TestArchetype> { + + /** + * The serial version UID. + */ + private static final long serialVersionUID = 1L; + + /** + * The string builder that collects all paint operations. + */ + @NotNull + private final StringBuilder sb = new StringBuilder(); + + /** + * Creates a new instance. + * @param mapViewSettings the map view settings instance to use + * @param filterControl the filter to use + * @param mapModel the map model to render + * @param mapGrid the grid to render + * @param multiPositionData the multi position data to query for multi-part + * objects + * @param isoMapSquareInfo the iso square info to use + * @param gridMapSquarePainter the grid square painter to use + * @param gameObjectParser the game object parser for creating tooltip + * information + * @param systemIcons the system icons for creating icons + */ + public TestMapRenderer(@NotNull final MapViewSettings mapViewSettings, @NotNull final FilterControl<TestGameObject, TestMapArchObject, TestArchetype> filterControl, @NotNull final MapModel<TestGameObject, TestMapArchObject, TestArchetype> mapModel, @NotNull final MapGrid mapGrid, @NotNull final MultiPositionData multiPositionData, @NotNull final IsoMapSquareInfo isoMapSquareInfo, @NotNull final GridMapSquarePainter gridMapSquarePainter, @NotNull final GameObjectParser<TestGameObject, TestMapArchObject, TestArchetype> gameObjectParser, @NotNull final SystemIcons systemIcons) { + super(100, mapViewSettings, filterControl, mapModel, mapGrid, multiPositionData, isoMapSquareInfo, gridMapSquarePainter, gameObjectParser, systemIcons); + } + + /** + * {@inheritDoc} + * @noinspection RefusedBequest + */ + @Override + protected void paintIcon(@NotNull final Graphics2D g, @NotNull final Icon icon) { + final double[] matrix = new double[6]; + g.getTransform().getMatrix(matrix); + appendDouble(matrix[0]); + sb.append(' '); + appendDouble(matrix[1]); + sb.append(' '); + appendDouble(matrix[2]); + sb.append(' '); + appendDouble(matrix[3]); + sb.append(' '); + appendDouble(matrix[4]); + sb.append(' '); + appendDouble(matrix[5]); + sb.append('\n'); + } + + /** + * Appends a <code>double></code> value to {@link #sb}. + * @param value the double value + */ + private void appendDouble(final double value) { + sb.append(String.format("%.03g", value)); + } + + /** + * Returns and clears the accumulated painting operations. + * @return the painting operations + */ + @NotNull + public String getPaintingOperations() { + final String result = sb.toString(); + sb.setLength(0); + return result; + } + +} Property changes on: trunk/atrinik/src/test/net/sf/gridarta/var/atrinik/gui/map/renderer/TestMapRenderer.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Modified: trunk/model/src/test/net/sf/gridarta/model/gameobject/TestGameObject.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/gameobject/TestGameObject.java 2012-06-17 18:58:33 UTC (rev 9195) +++ trunk/model/src/test/net/sf/gridarta/model/gameobject/TestGameObject.java 2012-06-23 12:36:17 UTC (rev 9196) @@ -39,7 +39,6 @@ */ private static final long serialVersionUID = 1L; - /** * Creates a new instance. * @param archetype the base archetype @@ -65,7 +64,7 @@ @NotNull @Override public ImageIcon getImage(@NotNull final MapViewSettings mapViewSettings) { - throw new AssertionError(); + return getNormalImage(); } /** Modified: trunk/model/src/test/net/sf/gridarta/model/mapmodel/TestMapModelCreator.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/mapmodel/TestMapModelCreator.java 2012-06-17 18:58:33 UTC (rev 9195) +++ trunk/model/src/test/net/sf/gridarta/model/mapmodel/TestMapModelCreator.java 2012-06-23 12:36:17 UTC (rev 9196) @@ -35,8 +35,10 @@ import net.sf.gridarta.model.archetypeset.DefaultArchetypeSet; import net.sf.gridarta.model.autojoin.AutojoinLists; import net.sf.gridarta.model.baseobject.BaseObject; +import net.sf.gridarta.model.face.EmptyFaceProvider; import net.sf.gridarta.model.face.FaceObjectProviders; import net.sf.gridarta.model.face.FaceObjects; +import net.sf.gridarta.model.face.FaceProvider; import net.sf.gridarta.model.face.TestFaceObjects; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.gameobject.GameObjectFactory; @@ -80,6 +82,12 @@ private final MapViewSettings mapViewSettings = new TestMapViewSettings(); /** + * The {@link SystemIcons} instance. + */ + @NotNull + private final SystemIcons systemIcons; + + /** * The {@link FaceObjectProviders} instance. */ @NotNull @@ -140,9 +148,11 @@ guiUtils.addToCache(iconName, imageIcon); } } - final SystemIcons systemIcons = new SystemIcons(guiUtils); + systemIcons = new SystemIcons(guiUtils); final FaceObjects faceObjects = new TestFaceObjects(); faceObjectProviders = new FaceObjectProviders(0, faceObjects, systemIcons); + final FaceProvider faceProvider = new EmptyFaceProvider(); + faceObjectProviders.setNormal(faceProvider); final ArchetypeFactory<TestGameObject, TestMapArchObject, TestArchetype> archetypeFactory = new TestArchetypeFactory(faceObjectProviders, animationObjects); archetypeSet = new DefaultArchetypeSet<TestGameObject, TestMapArchObject, TestArchetype>(archetypeFactory, null); gameObjectFactory = new TestGameObjectFactory(faceObjectProviders, animationObjects); @@ -335,4 +345,13 @@ return faceObjectProviders; } + /** + * Returns the {@link SystemIcons} instance. + * @return the system icons instance + */ + @NotNull + public SystemIcons getSystemIcons() { + return systemIcons; + } + } Modified: trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractIsoMapRenderer.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractIsoMapRenderer.java 2012-06-17 18:58:33 UTC (rev 9195) +++ trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractIsoMapRenderer.java 2012-06-23 12:36:17 UTC (rev 9196) @@ -631,14 +631,19 @@ */ private void paintRotatedIcon(@NotNull final Graphics2D g, @NotNull final Icon icon, final int x, final int y, final double rotate, final int oldIconWidth, final int oldIconHeight, final int newIconWidth, final int newIconHeight) { if (rotate < 0.001) { - icon.paintIcon(this, g, x, y); + g.translate(x, y); + try { + paintIcon(g, icon); + } finally { + g.translate(-x, -y); + } } else { final AffineTransform savedTransform = g.getTransform(); try { g.translate(x + newIconWidth / 2, y + newIconHeight / 2); g.rotate(rotate); g.translate(-oldIconWidth / 2, -oldIconHeight / 2); - icon.paintIcon(this, g, 0, 0); + paintIcon(g, icon); } finally { g.setTransform(savedTransform); } @@ -646,6 +651,15 @@ } /** + * Paints an icon. + * @param g the graphics to paint into + * @param icon the icon to paint + */ + protected void paintIcon(@NotNull final Graphics2D g, @NotNull final Icon icon) { + icon.paintIcon(this, g, 0, 0); + } + + /** * Returns whether the given {@link BaseObject} is a spawn point. * @param gameObject the game object * @return whether it is a spawn point This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2012-07-17 20:52:24
|
Revision: 9199 http://gridarta.svn.sourceforge.net/gridarta/?rev=9199&view=rev Author: akirschbaum Date: 2012-07-17 20:52:16 +0000 (Tue, 17 Jul 2012) Log Message: ----------- Implement "Map|Open In Client". [Atrinik] Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/action.properties trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/maincontrol/DefaultEditorFactory.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/maincontrol/DefaultEditorFactory.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/maincontrol/DefaultEditorFactory.java trunk/model/src/app/net/sf/gridarta/model/io/PathManager.java trunk/model/src/app/net/sf/gridarta/model/mapmanager/FileControl.java trunk/model/src/test/net/sf/gridarta/model/mapmanager/TestFileControl.java trunk/src/app/net/sf/gridarta/gui/misc/DefaultFileControl.java trunk/src/app/net/sf/gridarta/maincontrol/EditorFactory.java trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.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/atrinik/src/app/net/sf/gridarta/var/atrinik/actions/ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/actions/AtrinikServerActions.java trunk/src/app/net/sf/gridarta/actions/AbstractServerActions.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2012-07-17 20:44:27 UTC (rev 9198) +++ trunk/atrinik/ChangeLog 2012-07-17 20:52:16 UTC (rev 9199) @@ -1,3 +1,8 @@ +2012-07-17 Andreas Kirschbaum + + * Implement "Map|Open In Client". Teleports a character on the + local server (running on 127.0.0.1) to the current map. + 2012-06-17 Andreas Kirschbaum * Do not crash when shrinking a map if the map cursor is within Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/action.properties =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/action.properties 2012-07-17 20:44:27 UTC (rev 9198) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/action.properties 2012-07-17 20:52:16 UTC (rev 9199) @@ -42,7 +42,7 @@ mapwindowFile.menu=saveMap saveMapAs createImage - reloadMap - closeMap mapwindowEdit.menu=undo redo - clear cut copy paste pasteTiled - shift - find findNext findPrev replace fillAuto fillAbove fillBelow randFillAuto randFillAbove randFillBelow floodFill - selectAll invertSelection expandEmptySelection growSelection shrinkSelection -mapwindowMap.menu=gridVisible lightVisible - goExit enterExit nextExit prevExit enterNorthMap enterEastMap enterSouthMap enterWestMap enterNorthEastMap enterSouthEastMap enterSouthWestMap enterNorthWestMap - mapCreateView mapProperties shrinkMapSize deleteUnknownObjects +mapwindowMap.menu=gridVisible lightVisible - goExit enterExit nextExit prevExit enterNorthMap enterEastMap enterSouthMap enterWestMap enterNorthEastMap enterSouthEastMap enterSouthWestMap enterNorthWestMap - mapCreateView mapProperties shrinkMapSize deleteUnknownObjects openInClient mapwindowCursor.menu=moveCursor - exitConnector - selectSquare startStopDrag addToSelection subFromSelection releaseDrag - insertArch deleteArch - selectArchAbove selectArchBelow - archAttributes ########## Added: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/actions/AtrinikServerActions.java =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/actions/AtrinikServerActions.java (rev 0) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/actions/AtrinikServerActions.java 2012-07-17 20:52:16 UTC (rev 9199) @@ -0,0 +1,110 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2011 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.var.atrinik.actions; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.net.Socket; +import net.sf.gridarta.actions.AbstractServerActions; +import net.sf.gridarta.gui.map.mapview.MapViewManager; +import net.sf.gridarta.model.io.PathManager; +import net.sf.gridarta.model.mapmanager.FileControl; +import net.sf.gridarta.var.atrinik.model.archetype.Archetype; +import net.sf.gridarta.var.atrinik.model.gameobject.GameObject; +import net.sf.gridarta.var.atrinik.model.maparchobject.MapArchObject; +import org.jetbrains.annotations.NotNull; + +/** + * The {@link AbstractServerActions} implementation for connecting to an Atrinik + * server. + * @author Andreas Kirschbaum + */ +public class AtrinikServerActions extends AbstractServerActions<GameObject, MapArchObject, Archetype> { + + /** + * Command type. + */ + private static final int SERVER_CMD_CONTROL = 0; + + /** + * The name of the application requesting control. + */ + @NotNull + private static final String APPLICATION_NAME_IDENTIFIER = "gridarta"; + + /** + * The charset name for encoding strings in the protocol. + */ + @NotNull + private static final String CHARSET_NAME = "US-ASCII"; + + /** + * Command sub-type: teleport character to map. + */ + private static final int CMD_CONTROL_UPDATE_MAP = 1; + + /** + * Creates a new instance. + * @param mapViewManager the map view manager for tracking the current map + * view + * @param fileControl the file control for saving maps + * @param pathManager the path manager for converting path names + */ + public AtrinikServerActions(@NotNull final MapViewManager<GameObject, MapArchObject, Archetype> mapViewManager, @NotNull final FileControl<GameObject, MapArchObject, Archetype> fileControl, @NotNull final PathManager pathManager) { + super(mapViewManager, fileControl, pathManager); + } + + /** + * {@inheritDoc} + */ + @Override + protected void teleportCharacterToMap(@NotNull final String mapPath, final int mapX, final int mapY) throws IOException { + final ByteArrayOutputStream tmp = new ByteArrayOutputStream(); + tmp.write(0); + tmp.write(0); + tmp.write(SERVER_CMD_CONTROL); + tmp.write(APPLICATION_NAME_IDENTIFIER.getBytes(CHARSET_NAME)); + tmp.write(0); // termination of application name identifier + tmp.write(CMD_CONTROL_UPDATE_MAP); + tmp.write(mapPath.getBytes(CHARSET_NAME)); + tmp.write(0); + tmp.write(mapX >> 8); + tmp.write(mapX); + tmp.write(mapY >> 8); + tmp.write(mapY); + final byte[] packet = tmp.toByteArray(); + packet[0] = (byte) ((packet.length - 2) >> 8); + packet[1] = (byte) (packet.length - 2); + try { + final Socket socket = new Socket("127.0.0.1", 13327); + try { + final OutputStream outputStream = socket.getOutputStream(); + outputStream.write(packet); + socket.shutdownOutput(); + } finally { + socket.close(); + } + } catch (final IOException ex) { + throw new IOException("127.0.0.1:13327: " + ex.getMessage(), ex); + } + } + +} Property changes on: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/actions/AtrinikServerActions.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/maincontrol/DefaultEditorFactory.java =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/maincontrol/DefaultEditorFactory.java 2012-07-17 20:44:27 UTC (rev 9198) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/maincontrol/DefaultEditorFactory.java 2012-07-17 20:52:16 UTC (rev 9199) @@ -36,6 +36,7 @@ import net.sf.gridarta.gui.filter.FilterControl; import net.sf.gridarta.gui.map.mapview.DefaultMapViewFactory; import net.sf.gridarta.gui.map.mapview.MapViewFactory; +import net.sf.gridarta.gui.map.mapview.MapViewManager; import net.sf.gridarta.gui.map.mapview.MapViewsManager; import net.sf.gridarta.gui.map.renderer.GridMapSquarePainter; import net.sf.gridarta.gui.map.renderer.RendererFactory; @@ -74,6 +75,7 @@ import net.sf.gridarta.model.maparchobject.MapArchObjectFactory; import net.sf.gridarta.model.mapcontrol.MapControlFactory; import net.sf.gridarta.model.mapmanager.AbstractMapManager; +import net.sf.gridarta.model.mapmanager.FileControl; import net.sf.gridarta.model.mapmanager.MapManager; import net.sf.gridarta.model.mapmodel.InsertionMode; import net.sf.gridarta.model.mapmodel.MapModelFactory; @@ -103,6 +105,7 @@ import net.sf.gridarta.utils.IOUtils; import net.sf.gridarta.utils.SystemIcons; import net.sf.gridarta.var.atrinik.IGUIConstants; +import net.sf.gridarta.var.atrinik.actions.AtrinikServerActions; import net.sf.gridarta.var.atrinik.gui.map.renderer.DefaultRendererFactory; import net.sf.gridarta.var.atrinik.gui.mappropertiesdialog.DefaultMapPropertiesDialogFactory; import net.sf.gridarta.var.atrinik.gui.scripts.DefaultScriptArchUtils; @@ -480,4 +483,12 @@ return new DefaultResources(gameObjectParser, archetypeSet, archetypeParser, mapViewSettings, faceObjects, animationObjects, archFaceProvider, faceObjectProviders); } + /** + * {@inheritDoc} + */ + @Override + public void newServerActions(@NotNull final MapViewManager<GameObject, MapArchObject, Archetype> mapViewManager, @NotNull final FileControl<GameObject, MapArchObject, Archetype> fileControl, @NotNull final PathManager pathManager) { + new AtrinikServerActions(mapViewManager, fileControl, pathManager); + } + } Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/maincontrol/DefaultEditorFactory.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/maincontrol/DefaultEditorFactory.java 2012-07-17 20:44:27 UTC (rev 9198) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/maincontrol/DefaultEditorFactory.java 2012-07-17 20:52:16 UTC (rev 9199) @@ -34,6 +34,7 @@ import net.sf.gridarta.gui.filter.FilterControl; import net.sf.gridarta.gui.map.mapview.DefaultMapViewFactory; import net.sf.gridarta.gui.map.mapview.MapViewFactory; +import net.sf.gridarta.gui.map.mapview.MapViewManager; import net.sf.gridarta.gui.map.mapview.MapViewsManager; import net.sf.gridarta.gui.map.renderer.GridMapSquarePainter; import net.sf.gridarta.gui.map.renderer.RendererFactory; @@ -69,6 +70,7 @@ import net.sf.gridarta.model.maparchobject.MapArchObjectFactory; import net.sf.gridarta.model.mapcontrol.MapControlFactory; import net.sf.gridarta.model.mapmanager.AbstractMapManager; +import net.sf.gridarta.model.mapmanager.FileControl; import net.sf.gridarta.model.mapmanager.MapManager; import net.sf.gridarta.model.mapmodel.InsertionMode; import net.sf.gridarta.model.mapmodel.MapModelFactory; @@ -393,4 +395,12 @@ return new DefaultResources(gameObjectParser, archetypeSet, archetypeParser, mapViewSettings, faceObjects, animationObjects, smoothFaces, archFaceProvider, faceObjectProviders); } + /** + * {@inheritDoc} + */ + @Override + public void newServerActions(@NotNull final MapViewManager<GameObject, MapArchObject, Archetype> mapViewManager, @NotNull final FileControl<GameObject, MapArchObject, Archetype> fileControl, @NotNull final PathManager pathManager) { + // do nothing: action not supported + } + } Modified: trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/maincontrol/DefaultEditorFactory.java =================================================================== --- trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/maincontrol/DefaultEditorFactory.java 2012-07-17 20:44:27 UTC (rev 9198) +++ trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/maincontrol/DefaultEditorFactory.java 2012-07-17 20:52:16 UTC (rev 9199) @@ -36,6 +36,7 @@ import net.sf.gridarta.gui.filter.FilterControl; import net.sf.gridarta.gui.map.mapview.DefaultMapViewFactory; import net.sf.gridarta.gui.map.mapview.MapViewFactory; +import net.sf.gridarta.gui.map.mapview.MapViewManager; import net.sf.gridarta.gui.map.mapview.MapViewsManager; import net.sf.gridarta.gui.map.renderer.GridMapSquarePainter; import net.sf.gridarta.gui.map.renderer.RendererFactory; @@ -74,6 +75,7 @@ import net.sf.gridarta.model.maparchobject.MapArchObjectFactory; import net.sf.gridarta.model.mapcontrol.MapControlFactory; import net.sf.gridarta.model.mapmanager.AbstractMapManager; +import net.sf.gridarta.model.mapmanager.FileControl; import net.sf.gridarta.model.mapmanager.MapManager; import net.sf.gridarta.model.mapmodel.InsertionMode; import net.sf.gridarta.model.mapmodel.MapModelFactory; @@ -480,4 +482,12 @@ return new DefaultResources(gameObjectParser, archetypeSet, archetypeParser, mapViewSettings, faceObjects, animationObjects, archFaceProvider, faceObjectProviders); } + /** + * {@inheritDoc} + */ + @Override + public void newServerActions(@NotNull final MapViewManager<GameObject, MapArchObject, Archetype> mapViewManager, @NotNull final FileControl<GameObject, MapArchObject, Archetype> fileControl, @NotNull final PathManager pathManager) { + // do nothing: action not supported + } + } Modified: trunk/model/src/app/net/sf/gridarta/model/io/PathManager.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/io/PathManager.java 2012-07-17 20:44:27 UTC (rev 9198) +++ trunk/model/src/app/net/sf/gridarta/model/io/PathManager.java 2012-07-17 20:52:16 UTC (rev 9199) @@ -25,6 +25,7 @@ import net.sf.gridarta.model.settings.GlobalSettings; import net.sf.gridarta.utils.StringUtils; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** * This class contains methods for converting relative map paths to absolute map @@ -118,6 +119,28 @@ } /** + * Returns a map path for a {@link File}. + * @param file the file + * @return the map path or <code>null</code> if the file is not within the + * maps directory + */ + @Nullable + public String getMapPath2(@NotNull final File file) { + final String canonicalFile; + final String canonicalMaps; + try { + canonicalFile = file.getCanonicalPath(); + canonicalMaps = globalSettings.getMapsDirectory().getCanonicalPath(); + } catch (final IOException ignored) { + return null; + } + if (!canonicalFile.startsWith(canonicalMaps)) { + return null; + } + return getMapPath(file); + } + + /** * Check whether a path is absolute. Paths starting with "/" are absolute, * paths starting with other characters are relative. Empty paths are * relative. Modified: trunk/model/src/app/net/sf/gridarta/model/mapmanager/FileControl.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/mapmanager/FileControl.java 2012-07-17 20:44:27 UTC (rev 9198) +++ trunk/model/src/app/net/sf/gridarta/model/mapmanager/FileControl.java 2012-07-17 20:52:16 UTC (rev 9199) @@ -94,4 +94,11 @@ void reportOutOfMemory(@NotNull File file); + /** + * Reports an error while teleporting a character to the current map. + * @param mapPath the map path to teleport to + * @param message the error message + */ + void reportTeleportCharacterError(@NotNull String mapPath, @NotNull String message); + } Modified: trunk/model/src/test/net/sf/gridarta/model/mapmanager/TestFileControl.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/mapmanager/TestFileControl.java 2012-07-17 20:44:27 UTC (rev 9198) +++ trunk/model/src/test/net/sf/gridarta/model/mapmanager/TestFileControl.java 2012-07-17 20:52:16 UTC (rev 9199) @@ -143,6 +143,14 @@ * {@inheritDoc} */ @Override + public void reportTeleportCharacterError(@NotNull final String mapPath, @NotNull final String message) { + throw new AssertionError(); + } + + /** + * {@inheritDoc} + */ + @Override public String toString() { return sb.toString(); } Added: trunk/src/app/net/sf/gridarta/actions/AbstractServerActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/actions/AbstractServerActions.java (rev 0) +++ trunk/src/app/net/sf/gridarta/actions/AbstractServerActions.java 2012-07-17 20:52:16 UTC (rev 9199) @@ -0,0 +1,195 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2011 The Gridarta Developers. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.actions; + +import java.awt.Point; +import java.io.File; +import java.io.IOException; +import javax.swing.Action; +import net.sf.gridarta.gui.map.mapview.MapView; +import net.sf.gridarta.gui.map.mapview.MapViewManager; +import net.sf.gridarta.gui.map.mapview.MapViewManagerListener; +import net.sf.gridarta.model.archetype.Archetype; +import net.sf.gridarta.model.gameobject.GameObject; +import net.sf.gridarta.model.io.PathManager; +import net.sf.gridarta.model.maparchobject.MapArchObject; +import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.model.mapmanager.FileControl; +import net.sf.gridarta.model.mapmodel.MapModel; +import net.sf.gridarta.utils.ActionUtils; +import net.sf.japi.swing.action.ActionBuilder; +import net.sf.japi.swing.action.ActionBuilderFactory; +import net.sf.japi.swing.action.ActionMethod; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * Actions that require a connection to a game server. + * @author Andreas Kirschbaum + * @noinspection AbstractClassWithOnlyOneDirectInheritor + */ +public abstract class AbstractServerActions<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> { + + /** + * Action Builder to create Actions. + */ + @NotNull + private static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta"); + + /** + * The currently active map or <code>null</code> if no map is active. + */ + @Nullable + private MapView<G, A, R> currentMapView; + + /** + * The file control for saving maps. + */ + @NotNull + private final FileControl<G, A, R> fileControl; + + /** + * The {@link PathManager} for converting path names. + */ + @NotNull + private final PathManager pathManager; + + /** + * The action for "open in client". + * @noinspection ThisEscapedInObjectConstruction + */ + @NotNull + private final Action aOpenInClient = ActionUtils.newAction(ACTION_BUILDER, "Map", this, "openInClient"); + + /** + * The map manager listener which is attached to the current map if the + * current map is tracked. Otherwise it is unused. + * @noinspection FieldCanBeLocal + */ + @NotNull + private final MapViewManagerListener<G, A, R> mapViewManagerListener = new MapViewManagerListener<G, A, R>() { + + @Override + public void activeMapViewChanged(@Nullable final MapView<G, A, R> mapView) { + currentMapView = mapView; + updateActions(); + } + + @Override + public void mapViewCreated(@NotNull final MapView<G, A, R> mapView) { + // ignore + } + + @Override + public void mapViewClosing(@NotNull final MapView<G, A, R> mapView) { + // ignore + } + + }; + + /** + * Creates a new instance. + * @param mapViewManager the map view manager for tracking the current map + * view + * @param fileControl the file control for saving maps + * @param pathManager the path manager for converting path names + */ + protected AbstractServerActions(@NotNull final MapViewManager<G, A, R> mapViewManager, @NotNull final FileControl<G, A, R> fileControl, @NotNull final PathManager pathManager) { + this.fileControl = fileControl; + this.pathManager = pathManager; + mapViewManager.addMapViewManagerListener(mapViewManagerListener); + currentMapView = mapViewManager.getActiveMapView(); + updateActions(); + } + + /** + * Action method for "open in client". + */ + @ActionMethod + public void openInClient() { + doOpenInClient(true); + } + + /** + * Update the enabled/disabled state of all actions. + */ + private void updateActions() { + aOpenInClient.setEnabled(doOpenInClient(false)); + } + + /** + * Executes the "open in client" action. + * @param performAction whether the action should be performed + * @return whether the action was or can be performed + */ + private boolean doOpenInClient(final boolean performAction) { + final MapView<G, A, R> mapView = currentMapView; + if (mapView == null) { + return false; + } + + final MapControl<G, A, R> mapControl = mapView.getMapControl(); + final MapModel<G, A, R> mapModel = mapControl.getMapModel(); + final File mapFile = mapModel.getMapFile(); + if (mapFile == null) { + return false; + } + + final String mapPath = pathManager.getMapPath2(mapFile); + if (mapPath == null) { + return false; + } + + if (performAction) { + if (mapModel.isModified() && !fileControl.save(mapControl)) { + return false; + } + + final Point cursor = mapView.getMapCursor().getLocation(); + final int mapX; + final int mapY; + if (cursor == null) { + final A mapArchObject = mapModel.getMapArchObject(); + mapX = mapArchObject.getEnterX(); + mapY = mapArchObject.getEnterY(); + } else { + mapX = cursor.x; + mapY = cursor.y; + } + try { + teleportCharacterToMap(mapPath, mapX, mapY); + } catch (final IOException ex) { + fileControl.reportTeleportCharacterError(mapPath, ex.getMessage()); + } + } + + return true; + } + + /** + * Teleports the character to the given map path. + * @param mapPath the map path to teleport to + * @param mapX the x coordinate to teleport to + * @param mapY the y coordinate to teleport to + * @throws IOException if teleportation fails + */ + protected abstract void teleportCharacterToMap(@NotNull final String mapPath, final int mapX, final int mapY) throws IOException; + +} Property changes on: trunk/src/app/net/sf/gridarta/actions/AbstractServerActions.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Modified: trunk/src/app/net/sf/gridarta/gui/misc/DefaultFileControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/misc/DefaultFileControl.java 2012-07-17 20:44:27 UTC (rev 9198) +++ trunk/src/app/net/sf/gridarta/gui/misc/DefaultFileControl.java 2012-07-17 20:52:16 UTC (rev 9199) @@ -408,4 +408,12 @@ ACTION_BUILDER.showMessageDialog(parent, "mapOutOfMemory", file); } + /** + * {@inheritDoc} + */ + @Override + public void reportTeleportCharacterError(@NotNull final String mapPath, @NotNull final String message) { + ACTION_BUILDER.showMessageDialog(parent, "teleportCharacterError", mapPath, message); + } + } Modified: trunk/src/app/net/sf/gridarta/maincontrol/EditorFactory.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/EditorFactory.java 2012-07-17 20:44:27 UTC (rev 9198) +++ trunk/src/app/net/sf/gridarta/maincontrol/EditorFactory.java 2012-07-17 20:52:16 UTC (rev 9199) @@ -25,6 +25,7 @@ import net.sf.gridarta.gui.dialog.prefs.AppPreferencesModel; import net.sf.gridarta.gui.filter.FilterControl; import net.sf.gridarta.gui.map.mapview.MapViewFactory; +import net.sf.gridarta.gui.map.mapview.MapViewManager; import net.sf.gridarta.gui.map.mapview.MapViewsManager; import net.sf.gridarta.gui.map.renderer.RendererFactory; import net.sf.gridarta.gui.scripts.ScriptArchDataUtils; @@ -57,6 +58,7 @@ import net.sf.gridarta.model.maparchobject.MapArchObjectFactory; import net.sf.gridarta.model.mapcontrol.MapControlFactory; import net.sf.gridarta.model.mapmanager.AbstractMapManager; +import net.sf.gridarta.model.mapmanager.FileControl; import net.sf.gridarta.model.mapmanager.MapManager; import net.sf.gridarta.model.mapmodel.InsertionMode; import net.sf.gridarta.model.mapmodel.MapModelFactory; @@ -386,4 +388,14 @@ @NotNull AbstractResources<G, A, R> newResources(@NotNull final GameObjectParser<G, A, R> gameObjectParser, @NotNull final ArchetypeSet<G, A, R> archetypeSet, @NotNull final AbstractArchetypeParser<G, A, R, ?> archetypeParser, @NotNull final MapViewSettings mapViewSettings, @NotNull final FaceObjects faceObjects, @NotNull final AnimationObjects animationObjects, @NotNull final ArchFaceProvider archFaceProvider, @NotNull final FaceObjectProviders faceObjectProviders); + /** + * Creates the "open in client" action. Does nothing if this editor does not + * support this action. + * @param mapViewManager the map view manager for tracking the current map + * view + * @param fileControl the file control for saving maps + * @param pathManager the path manager for converting path names + */ + void newServerActions(@NotNull final MapViewManager<G, A, R> mapViewManager, @NotNull final FileControl<G, A, R> fileControl, @NotNull final PathManager pathManager); + } Modified: trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2012-07-17 20:44:27 UTC (rev 9198) +++ trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2012-07-17 20:52:16 UTC (rev 9199) @@ -500,7 +500,7 @@ final DelayedMapModelListenerManager<G, A, R> delayedMapModelListenerManager = new DelayedMapModelListenerManager<G, A, R>(mapManager, exiter); final Control<?, G, A, R> lockedItemsControl = new LockedItemsControl<G, A, R>(mapViewManager, delayedMapModelListenerManager, lockedItemsTypeNumbers); final EnterMap<G, A, R> enterMap = new EnterMap<G, A, R>(mainViewFrame, directionMap, mapPathNormalizer, fileControl, mapViewsManager); - final MapActions<G, A, R> mapActions = new MapActions<G, A, R>(mainViewFrame, mapManager, mapViewManager, exitMatcher, GuiFileFilters.mapFileFilter, selectedSquareModel, allowRandomMapParameters, mapPropertiesDialogFactory, mapViewSettings, mapViewsManager, enterMap); + new MapActions<G, A, R>(mainViewFrame, mapManager, mapViewManager, exitMatcher, GuiFileFilters.mapFileFilter, selectedSquareModel, allowRandomMapParameters, mapPropertiesDialogFactory, mapViewSettings, mapViewsManager, enterMap); final GameObjectAttributesModel<G, A, R> gameObjectAttributesModel = new GameObjectAttributesModel<G, A, R>(); final GameObjectAttributesControl<G, A, R> gameObjectAttributesControl = new GameObjectAttributesControl<G, A, R>(gameObjectAttributesModel, gameObjectAttributesDialogFactory, objectChooser, mapManager, selectedSquareModel, selectedSquareView, gameObjectFactory); final PluginParameterViewFactory<G, A, R> pluginParameterViewFactory = new PluginParameterViewFactory<G, A, R>(archetypeSet, gameObjectAttributesModel, objectChooser, mapManager, faceObjectProviders); @@ -545,6 +545,7 @@ @Nullable final MapMenuManager<G, A, R> bookmarksMapMenuManager = new MapMenuManager<G, A, R>(mapMenu, mapViewsManager, fileControl, mapImageCache); //noinspection ResultOfObjectAllocationIgnored new BookmarkActions<G, A, R>(bookmarksMapMenuPreferences, mapMenu, mapViewManager, mainViewFrame, mapImageCache); + editorFactory.newServerActions(mapViewManager, fileControl, pathManager); pickmapChooserControl.setPopupMenu(ACTION_BUILDER.createPopupMenu(true, "pickmaps")); final JMenuBar menuBar = ACTION_BUILDER.createMenuBar(true, "main"); Modified: trunk/src/app/net/sf/gridarta/messages.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages.properties 2012-07-17 20:44:27 UTC (rev 9198) +++ trunk/src/app/net/sf/gridarta/messages.properties 2012-07-17 20:52:16 UTC (rev 9199) @@ -164,6 +164,9 @@ shrinkMapSize.text=Shrink Map Size... shrinkMapSize.shortdescription=Removes empty squares from the right or bottom map borders. +openInClient.text=Open In Client +openInClient.shortdescription=Save map and teleport character in client to map. + autoJoin.text=Autojoin autoJoin.mnemonic=J autoJoin.shortdescription=Toggles autojoining of wall game objects. @@ -368,6 +371,9 @@ openFileOutOfMapBoundsDeleted.title=Loading map file {0} openFileOutOfMapBoundsDeleted.message=While loading map file {0}:\nDeleted {1} game objects outside map bounds:{2} +teleportCharacterError.title=Cannot teleport character +teleportCharacterError.message=Cannot teleport the character to {0}:\n{1} + overwriteOtherFile.title=Overwrite file? overwriteOtherFile.message=A file named "{0}" already exists.\n\nReally overwrite it? Modified: trunk/src/app/net/sf/gridarta/messages_de.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages_de.properties 2012-07-17 20:44:27 UTC (rev 9198) +++ trunk/src/app/net/sf/gridarta/messages_de.properties 2012-07-17 20:52:16 UTC (rev 9199) @@ -145,6 +145,9 @@ shrinkMapSize.text=Kartengr\u00f6\u00dfe reduzieren... shrinkMapSize.shortdescription=Entfernt freie Felder am rechten bzw. unteren Kartenrand. +openInClient.text=In Client \u00f6ffnen +openInClient.shortdescription=Karte speichern und Character dorthin telelportieren. + autoJoin.text=Automatisch verbinden autoJoin.mnemonic=V autoJoin.shortdescription=Aktiviert bzw. deaktiviert automatisches Verbinden von W\u00e4nden. @@ -343,6 +346,9 @@ openFileOutOfMapBoundsDeleted.title=Karte {0} laden openFileOutOfMapBoundsDeleted.message=Beim Laden von {0}\nwurden {1} Objekte wurden gel\u00f6scht, da sie nicht innerhalb der Katenfl\u00e4che liegen:{2} +teleportCharacterError.title=Kann Charakter nicht teleportieren +teleportCharacterError.message=Teleportieren des Charakters nach {0} schlug fehl:\n{1} + overwriteOtherFile.title=Datei \u00fcberschreiben? overwriteOtherFile.message=Eine Datei mit Namen "{0}" existiert bereits.\n\nWirklich \u00fcberschreiben? Modified: trunk/src/app/net/sf/gridarta/messages_fr.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages_fr.properties 2012-07-17 20:44:27 UTC (rev 9198) +++ trunk/src/app/net/sf/gridarta/messages_fr.properties 2012-07-17 20:52:16 UTC (rev 9199) @@ -149,6 +149,9 @@ shrinkMapSize.text=R\u00e9duire la carte shrinkMapSize.shortdescription=Supprime les espaces inutiles \u00e0 droite et en bas. +#openInClient.text= +#openInClient.shortdescription= + autoJoin.text=Auto-connection des murs autoJoin.mnemonic=C autoJoin.shortdescription=Active ou d\u00e9sactive la connexion automatique des murs. @@ -343,6 +346,9 @@ #openFileOutOfMapBoundsDeleted.title= #openFileOutOfMapBoundsDeleted.message= +#teleportCharacterError.title= +#teleportCharacterError.message= + #overwriteOtherFile.title= overwriteOtherFile.message=Un fichier nomm\u00e9 "{0}" existe d\u00e9j\u00e0.\n\nVoulez vous vraiment le remplacer? Modified: trunk/src/app/net/sf/gridarta/messages_sv.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages_sv.properties 2012-07-17 20:44:27 UTC (rev 9198) +++ trunk/src/app/net/sf/gridarta/messages_sv.properties 2012-07-17 20:52:16 UTC (rev 9199) @@ -143,6 +143,9 @@ #shrinkMapSize.text= #shrinkMapSize.shortdescription= +#openInClient.text= +#openInClient.shortdescription= + #autoJoin.text= #autoJoin.mnemonic= #autoJoin.shortdescription= @@ -340,6 +343,9 @@ openFileOutOfMapBoundsDeleted.title=Laddar kartfil {0} #openFileOutOfMapBoundsDeleted.message= +#teleportCharacterError.title= +#teleportCharacterError.message= + overwriteOtherFile.title=Skriv \u00f6ver existerande fil? overwriteOtherFile.message=En fil med namnet "{0}" existerar redan.\n\nVill du verkligen skriva \u00f6ver den? This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2012-07-19 21:28:54
|
Revision: 9201 http://gridarta.svn.sourceforge.net/gridarta/?rev=9201&view=rev Author: akirschbaum Date: 2012-07-19 21:28:47 +0000 (Thu, 19 Jul 2012) Log Message: ----------- Fix "Open In Client" on Windows machines. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/model/src/app/net/sf/gridarta/model/io/PathManager.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2012-07-19 21:27:24 UTC (rev 9200) +++ trunk/atrinik/ChangeLog 2012-07-19 21:28:47 UTC (rev 9201) @@ -1,3 +1,7 @@ +2012-07-19 Andreas Kirschbaum + + * Fix "Open In Client" on Windows machines. + 2012-07-17 Andreas Kirschbaum * Implement "Map|Open In Client". Teleports a character on the Modified: trunk/model/src/app/net/sf/gridarta/model/io/PathManager.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/io/PathManager.java 2012-07-19 21:27:24 UTC (rev 9200) +++ trunk/model/src/app/net/sf/gridarta/model/io/PathManager.java 2012-07-19 21:28:47 UTC (rev 9201) @@ -137,7 +137,8 @@ if (!canonicalFile.startsWith(canonicalMaps)) { return null; } - return getMapPath(file); + final String mapPath = canonicalFile.substring(canonicalMaps.length()); + return mapPath.replace('\\', '/'); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2012-09-08 14:46:43
|
Revision: 9204 http://gridarta.svn.sourceforge.net/gridarta/?rev=9204&view=rev Author: akirschbaum Date: 2012-09-08 14:46:36 +0000 (Sat, 08 Sep 2012) Log Message: ----------- Fix ClassCastException when iconifying map views. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/crossfire/ChangeLog trunk/daimonin/ChangeLog trunk/src/app/net/sf/gridarta/gui/mapdesktop/MapDesktop.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2012-08-02 18:16:11 UTC (rev 9203) +++ trunk/atrinik/ChangeLog 2012-09-08 14:46:36 UTC (rev 9204) @@ -1,3 +1,7 @@ +2012-09-08 Andreas Kirschbaum + + * Fix ClassCastException when iconifying map views. + 2012-07-19 Andreas Kirschbaum * Fix "Open In Client" on Windows machines. Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2012-08-02 18:16:11 UTC (rev 9203) +++ trunk/crossfire/ChangeLog 2012-09-08 14:46:36 UTC (rev 9204) @@ -1,3 +1,7 @@ +2012-09-08 Andreas Kirschbaum + + * Fix ClassCastException when iconifying map views. + 2012-06-17 Andreas Kirschbaum * Do not crash when shrinking a map if the map cursor is within Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2012-08-02 18:16:11 UTC (rev 9203) +++ trunk/daimonin/ChangeLog 2012-09-08 14:46:36 UTC (rev 9204) @@ -1,3 +1,7 @@ +2012-09-08 Andreas Kirschbaum + + * Fix ClassCastException when iconifying map views. + 2012-06-17 Andreas Kirschbaum * Do not crash when shrinking a map if the map cursor is within Modified: trunk/src/app/net/sf/gridarta/gui/mapdesktop/MapDesktop.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapdesktop/MapDesktop.java 2012-08-02 18:16:11 UTC (rev 9203) +++ trunk/src/app/net/sf/gridarta/gui/mapdesktop/MapDesktop.java 2012-09-08 14:46:36 UTC (rev 9204) @@ -471,9 +471,6 @@ @Override public void internalFrameIconified(@NotNull final InternalFrameEvent e) { - //InternalFrameEvent does not use type parameters - @SuppressWarnings("unchecked") - final MapView<G, A, R> mapView = (MapView<G, A, R>) e.getSource(); mapViewFocusLostNotify(mapView); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2013-01-03 20:10:44
|
Revision: 9205 http://gridarta.svn.sourceforge.net/gridarta/?rev=9205&view=rev Author: akirschbaum Date: 2013-01-03 20:10:36 +0000 (Thu, 03 Jan 2013) Log Message: ----------- Do not disable map cursor in "enter xyz map". Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/crossfire/ChangeLog trunk/daimonin/ChangeLog trunk/src/app/net/sf/gridarta/gui/map/mapactions/EnterMap.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2012-09-08 14:46:36 UTC (rev 9204) +++ trunk/atrinik/ChangeLog 2013-01-03 20:10:36 UTC (rev 9205) @@ -1,3 +1,7 @@ +2013-01-03 Andreas Kirschbaum + + * Do not disable map cursor in "enter xyz map". + 2012-09-08 Andreas Kirschbaum * Fix ClassCastException when iconifying map views. Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2012-09-08 14:46:36 UTC (rev 9204) +++ trunk/crossfire/ChangeLog 2013-01-03 20:10:36 UTC (rev 9205) @@ -1,3 +1,7 @@ +2013-01-03 Andreas Kirschbaum + + * Do not disable map cursor in "enter xyz map". + 2012-09-08 Andreas Kirschbaum * Fix ClassCastException when iconifying map views. Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2012-09-08 14:46:36 UTC (rev 9204) +++ trunk/daimonin/ChangeLog 2013-01-03 20:10:36 UTC (rev 9205) @@ -1,3 +1,7 @@ +2013-01-03 Andreas Kirschbaum + + * Do not disable map cursor in "enter xyz map". + 2012-09-08 Andreas Kirschbaum * Fix ClassCastException when iconifying map views. Modified: trunk/src/app/net/sf/gridarta/gui/map/mapactions/EnterMap.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/mapactions/EnterMap.java 2012-09-08 14:46:36 UTC (rev 9204) +++ trunk/src/app/net/sf/gridarta/gui/map/mapactions/EnterMap.java 2013-01-03 20:10:36 UTC (rev 9205) @@ -41,6 +41,7 @@ import net.sf.gridarta.model.mappathnormalizer.MapPathNormalizer; import net.sf.gridarta.model.mappathnormalizer.RelativePathOnUnsavedMapException; import net.sf.gridarta.model.mappathnormalizer.SameMapException; +import net.sf.gridarta.utils.Size2D; import net.sf.japi.swing.action.ActionBuilder; import net.sf.japi.swing.action.ActionBuilderFactory; import org.jetbrains.annotations.NotNull; @@ -110,7 +111,7 @@ * @param path path to map that should be loaded * @param direction the direction to go * @param destinationPoint the desired destination point on the map (pass - * 0|0 if unknown, and note that the point gets modified) + * <code>null</code> if unknown, and note that the point gets modified) * @return whether the destination map has been entered */ public boolean enterMap(@NotNull final MapView<G, A, R> mapView, @NotNull final String path, @NotNull final Direction direction, @Nullable final Point destinationPoint) { @@ -159,6 +160,10 @@ showLocation(newMapView, destinationPoint); } else if (mapView != null) { newMapView.getScrollPane().getViewport().setViewPosition(calculateNewViewPosition(mapView.getScrollPane(), newMapView.getScrollPane(), direction)); + final Point newCursorLocation = calculateNewCursorLocation(mapView, newMapView, direction); + if (newCursorLocation != null) { + newMapView.getMapCursor().setLocation(newCursorLocation); + } } if (mapView != null && ACTION_BUILDER.showOnetimeConfirmDialog(parent, JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, "enterExitClose") == JOptionPane.YES_OPTION) { @@ -269,4 +274,53 @@ return scrollTo.getLocation(); } + /** + * Calculate the map cursor location for the new viewport. + * @param oldMapView the old map view + * @param newMapView the new map view + * @param direction the direction to scroll + * @return the new map cursor location + * @noinspection TypeMayBeWeakened + */ + @Nullable + private Point calculateNewCursorLocation(@Nullable final MapView<G, A, R> oldMapView, @NotNull final MapView<G, A, R> newMapView, @NotNull final Direction direction) { + if (oldMapView == null) { + return null; + } + final Point oldCursorLocation = oldMapView.getMapCursor().getLocation(); + if (oldCursorLocation == null) { + return null; + } + + final Size2D mapSize = newMapView.getMapControl().getMapModel().getMapArchObject().getMapSize(); + switch (direction) { + case SOUTH: + return new Point(oldCursorLocation.x, 0); + + case NORTH: + return new Point(oldCursorLocation.x, mapSize.getHeight() - 1); + + case EAST: + return new Point(0, oldCursorLocation.y); + + case WEST: + return new Point(mapSize.getWidth() - 1, oldCursorLocation.y); + + case NORTH_EAST: + return new Point(0, mapSize.getHeight() - 1); + + case SOUTH_EAST: + return new Point(0, 0); + + case SOUTH_WEST: + return new Point(mapSize.getWidth() - 1, 0); + + case NORTH_WEST: + return new Point(mapSize.getWidth() - 1, mapSize.getHeight() - 1); + + default: + throw new AssertionError(); + } + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2013-05-24 19:56:58
|
Revision: 9213 http://sourceforge.net/p/gridarta/code/9213 Author: akirschbaum Date: 2013-05-24 19:56:48 +0000 (Fri, 24 May 2013) Log Message: ----------- Remove redundant field initializations. Modified Paths: -------------- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/mappropertiesdialog/MapPropertiesDialog.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/io/ArchetypeParser.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/maparchobject/MapArchObject.java trunk/atrinik/src/test/net/sf/gridarta/var/atrinik/model/io/ArchetypeParserTest.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/FlatMapRenderer.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/mappropertiesdialog/MapPropertiesDialog.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/maincontrol/DefaultEditorFactory.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/maparchobject/MapArchObject.java trunk/crossfire/src/test/net/sf/gridarta/var/crossfire/model/io/ArchetypeParserTest.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/gui/mappropertiesdialog/MapPropertiesDialog.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/io/ArchetypeParser.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/maparchobject/MapArchObject.java trunk/gridarta.ipr trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetype.java trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeBuilder.java trunk/model/src/app/net/sf/gridarta/model/archetypechooser/ArchetypeChooserFolder.java trunk/model/src/app/net/sf/gridarta/model/archetypechooser/ArchetypeChooserModel.java trunk/model/src/app/net/sf/gridarta/model/archetypeset/DefaultArchetypeSet.java trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSet.java trunk/model/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java trunk/model/src/app/net/sf/gridarta/model/baseobject/GameObjectContainer.java trunk/model/src/app/net/sf/gridarta/model/data/NamedTreeNode.java trunk/model/src/app/net/sf/gridarta/model/exitconnector/AbstractExitConnectorModel.java trunk/model/src/app/net/sf/gridarta/model/face/DoubleImageFilter.java trunk/model/src/app/net/sf/gridarta/model/face/FaceObjectProviders.java trunk/model/src/app/net/sf/gridarta/model/face/FilterFaceProvider.java trunk/model/src/app/net/sf/gridarta/model/filter/AbstractFilterConfig.java trunk/model/src/app/net/sf/gridarta/model/filter/FilterParser.java trunk/model/src/app/net/sf/gridarta/model/filter/NamedFilterConfig.java trunk/model/src/app/net/sf/gridarta/model/gameobject/AbstractGameObject.java trunk/model/src/app/net/sf/gridarta/model/gameobject/DefaultIsoGameObject.java trunk/model/src/app/net/sf/gridarta/model/gameobject/MultiArchData.java trunk/model/src/app/net/sf/gridarta/model/index/AbstractIndex.java trunk/model/src/app/net/sf/gridarta/model/index/MapsIndexer.java trunk/model/src/app/net/sf/gridarta/model/io/FlatFileIterator.java trunk/model/src/app/net/sf/gridarta/model/maparchobject/AbstractMapArchObject.java trunk/model/src/app/net/sf/gridarta/model/mapgrid/MapGrid.java trunk/model/src/app/net/sf/gridarta/model/mapmanager/AbstractMapManager.java trunk/model/src/app/net/sf/gridarta/model/mapmodel/DefaultMapModel.java trunk/model/src/app/net/sf/gridarta/model/match/ViewGameObjectMatcherManager.java trunk/model/src/app/net/sf/gridarta/model/resource/AbstractResources.java trunk/model/src/app/net/sf/gridarta/model/settings/DefaultGlobalSettings.java trunk/model/src/app/net/sf/gridarta/model/undo/UndoModel.java trunk/model/src/app/net/sf/gridarta/model/undo/UndoState.java trunk/model/src/app/net/sf/gridarta/model/validation/checks/MapCheckerScriptChecker.java trunk/model/src/test/net/sf/gridarta/model/archetype/TestDefaultArchetype.java trunk/model/src/test/net/sf/gridarta/model/baseobject/AbstractBaseObjectTest.java trunk/model/src/test/net/sf/gridarta/model/errorview/TestErrorView.java trunk/model/src/test/net/sf/gridarta/model/io/ArchetypeParserTest.java trunk/model/src/test/net/sf/gridarta/model/mapcursor/MapCursorTest.java trunk/model/src/test/net/sf/gridarta/model/match/NamedGameObjectMatcherTest.java trunk/plugin/src/app/net/sf/gridarta/plugin/BshThread.java trunk/plugin/src/app/net/sf/gridarta/plugin/Plugin.java trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/ArchParameter.java trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/DoubleParameter.java trunk/preferences/src/app/net/sf/gridarta/preferences/FilePreferencesFactory.java trunk/src/app/net/sf/gridarta/commands/Collector.java trunk/src/app/net/sf/gridarta/gui/autovalidator/AutoValidator.java trunk/src/app/net/sf/gridarta/gui/delayedmapmodel/DelayedMapModelListenerManager.java trunk/src/app/net/sf/gridarta/gui/dialog/bookmarks/BookmarkActions.java trunk/src/app/net/sf/gridarta/gui/dialog/bookmarks/ManageBookmarksDialog.java trunk/src/app/net/sf/gridarta/gui/dialog/bookmarks/MapMenuEntryIcons.java trunk/src/app/net/sf/gridarta/gui/dialog/errorview/ConsoleErrorView.java trunk/src/app/net/sf/gridarta/gui/dialog/errorview/DefaultErrorView.java trunk/src/app/net/sf/gridarta/gui/dialog/find/FindDialog.java trunk/src/app/net/sf/gridarta/gui/dialog/find/FindDialogManager.java trunk/src/app/net/sf/gridarta/gui/dialog/findarchetypes/FindArchetypesDialogManager.java trunk/src/app/net/sf/gridarta/gui/dialog/findarchetypes/TableModel.java trunk/src/app/net/sf/gridarta/gui/dialog/gameobjectattributes/DialogAttributeBitmask.java trunk/src/app/net/sf/gridarta/gui/dialog/gameobjectattributes/GameObjectAttributesDialog.java trunk/src/app/net/sf/gridarta/gui/dialog/gameobjectattributes/TypesBoxItemListener.java trunk/src/app/net/sf/gridarta/gui/dialog/gomap/GoMapDialog.java trunk/src/app/net/sf/gridarta/gui/dialog/newmap/AbstractNewMapDialog.java trunk/src/app/net/sf/gridarta/gui/dialog/plugin/ClosingIcon.java trunk/src/app/net/sf/gridarta/gui/dialog/plugin/PluginManagerFactory.java trunk/src/app/net/sf/gridarta/gui/dialog/plugin/PluginView.java trunk/src/app/net/sf/gridarta/gui/dialog/plugin/PluginViewPane.java trunk/src/app/net/sf/gridarta/gui/dialog/plugin/parameter/ArchComboBoxEditor.java trunk/src/app/net/sf/gridarta/gui/dialog/plugin/parameter/ArchComboBoxModel.java trunk/src/app/net/sf/gridarta/gui/dialog/plugin/parameter/MapParameterComboBoxModel.java trunk/src/app/net/sf/gridarta/gui/dialog/prefs/ResPreferences.java trunk/src/app/net/sf/gridarta/gui/dialog/replace/ReplaceDialog.java trunk/src/app/net/sf/gridarta/gui/dialog/replace/ReplaceDialogManager.java trunk/src/app/net/sf/gridarta/gui/dialog/shortcuts/ShortcutsDialog.java trunk/src/app/net/sf/gridarta/gui/dialog/shrinkmapsize/ShrinkMapSizeDialog.java trunk/src/app/net/sf/gridarta/gui/exitconnector/ExitConnectorController.java trunk/src/app/net/sf/gridarta/gui/filter/MenuItemCreator.java trunk/src/app/net/sf/gridarta/gui/mainwindow/GameObjectTextEditorTab.java trunk/src/app/net/sf/gridarta/gui/map/MapPreviewAccessory.java trunk/src/app/net/sf/gridarta/gui/map/event/MouseOpEvent.java trunk/src/app/net/sf/gridarta/gui/map/maptilepane/TilePanel.java trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewManager.java trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViews.java trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFile.java trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTree.java trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTreeActions.java trunk/src/app/net/sf/gridarta/gui/mapmenu/MapMenu.java trunk/src/app/net/sf/gridarta/gui/mapmenu/MapMenuEntryTreeCellRenderer.java trunk/src/app/net/sf/gridarta/gui/mapmenu/MapMenuManager.java trunk/src/app/net/sf/gridarta/gui/mapmenu/TreeDragSource.java trunk/src/app/net/sf/gridarta/gui/misc/About.java trunk/src/app/net/sf/gridarta/gui/misc/DefaultFileControl.java trunk/src/app/net/sf/gridarta/gui/misc/MainViewActions.java trunk/src/app/net/sf/gridarta/gui/misc/ShiftProcessor.java trunk/src/app/net/sf/gridarta/gui/misc/StatusBar.java trunk/src/app/net/sf/gridarta/gui/panel/archetypechooser/ArchetypePanel.java trunk/src/app/net/sf/gridarta/gui/panel/connectionview/View.java trunk/src/app/net/sf/gridarta/gui/panel/gameobjectattributes/AbstractGameObjectAttributesTab.java trunk/src/app/net/sf/gridarta/gui/panel/gameobjectattributes/ErrorListView.java trunk/src/app/net/sf/gridarta/gui/panel/gameobjectattributes/EventsTab.java trunk/src/app/net/sf/gridarta/gui/panel/gameobjectattributes/FaceTab.java trunk/src/app/net/sf/gridarta/gui/panel/gameobjectattributes/GameObjectAttributesControl.java trunk/src/app/net/sf/gridarta/gui/panel/gameobjectattributes/GameObjectAttributesModel.java trunk/src/app/net/sf/gridarta/gui/panel/objectchooser/DefaultObjectChooser.java trunk/src/app/net/sf/gridarta/gui/panel/pickmapchooser/PickmapChooserControl.java trunk/src/app/net/sf/gridarta/gui/panel/pickmapchooser/PickmapChooserView.java trunk/src/app/net/sf/gridarta/gui/panel/selectedsquare/ModelUpdater.java trunk/src/app/net/sf/gridarta/gui/panel/tools/DeletionTool.java trunk/src/app/net/sf/gridarta/gui/panel/tools/SelectionTool.java trunk/src/app/net/sf/gridarta/gui/scripts/DefaultScriptArchEditor.java trunk/src/app/net/sf/gridarta/gui/treasurelist/CFTreasureListTree.java trunk/src/app/net/sf/gridarta/gui/undo/UndoControl.java trunk/src/app/net/sf/gridarta/gui/utils/DirectionComponent.java trunk/src/app/net/sf/gridarta/gui/utils/DirectionLayout.java trunk/src/app/net/sf/gridarta/gui/utils/GList.java trunk/src/app/net/sf/gridarta/gui/utils/borderpanel/BorderSplitPane.java trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/Tab.java trunk/src/app/net/sf/gridarta/gui/utils/tristate/TristateCheckBox.java trunk/src/app/net/sf/gridarta/mainactions/MainActions.java trunk/src/app/net/sf/gridarta/mainactions/RandomFillDialog.java trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java trunk/src/test/net/sf/gridarta/actions/ExitConnectorActionsTest.java trunk/textedit/src/app/net/sf/gridarta/textedit/scripteditor/CFPythonPopup.java trunk/textedit/src/app/net/sf/gridarta/textedit/scripteditor/ScriptEditControl.java trunk/textedit/src/app/net/sf/gridarta/textedit/scripteditor/ScriptEditUndoActions.java trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/InputHandler.java trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/ScrollLayout.java trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/SyntaxStyle.java trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/TextAreaPainter.java trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/actions/Replace.java trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/tokenmarker/CTokenMarker.java trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/tokenmarker/HTMLTokenMarker.java trunk/utils/src/app/net/sf/gridarta/utils/CopyReader.java trunk/utils/src/app/net/sf/gridarta/utils/ProcessRunner.java trunk/utils/src/app/net/sf/gridarta/utils/SystemIcons.java trunk/utils/src/app/net/sf/gridarta/utils/WrappingStringBuilder.java Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/mappropertiesdialog/MapPropertiesDialog.java =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/mappropertiesdialog/MapPropertiesDialog.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/mappropertiesdialog/MapPropertiesDialog.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -106,7 +106,7 @@ * @serial */ @Nullable - private Window dialog = null; + private Window dialog; /** * The message text. Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/io/ArchetypeParser.java =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/io/ArchetypeParser.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/io/ArchetypeParser.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -69,7 +69,7 @@ /** * The multi-shape ID of the currently parsed archetype. */ - private int multiShapeID = 0; + private int multiShapeID; /** * Creates an ArchetypeParser. Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/maparchobject/MapArchObject.java =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/maparchobject/MapArchObject.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/maparchobject/MapArchObject.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -47,79 +47,79 @@ * No save map. * @serial */ - private boolean noSave = false; + private boolean noSave; /** * No magic spells. * @serial */ - private boolean noMagic = false; + private boolean noMagic; /** * No prayers. * @serial */ - private boolean noPriest = false; + private boolean noPriest; /** * No harmful spells allowed. * @serial */ - private boolean noHarm = false; + private boolean noHarm; /** * No summoning allowed. * @serial */ - private boolean noSummon = false; + private boolean noSummon; /** * Check map reset status after re-login. * @serial */ - private boolean fixedLogin = false; + private boolean fixedLogin; /** * Unique map. * @serial */ - private boolean unique = false; + private boolean unique; /** * Fixed reset time. * @serial */ - private boolean fixedResetTime = false; + private boolean fixedResetTime; /** * Players cannot save on this map. * @serial */ - private boolean playerNoSave = false; + private boolean playerNoSave; /** * Player vs Player combat allowed. * @serial */ - private boolean pvp = false; + private boolean pvp; /** * The tileset id. 0 means no available tileset id * @serial */ - private int tilesetId = 0; + private int tilesetId; /** * The tileset x coordinate. * @serial */ - private int tilesetX = 0; + private int tilesetX; /** * The tileset y coordinate. * @serial */ - private int tilesetY = 0; + private int tilesetY; /** * The name of the background music. Set to empty string if unset. Modified: trunk/atrinik/src/test/net/sf/gridarta/var/atrinik/model/io/ArchetypeParserTest.java =================================================================== --- trunk/atrinik/src/test/net/sf/gridarta/var/atrinik/model/io/ArchetypeParserTest.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/atrinik/src/test/net/sf/gridarta/var/atrinik/model/io/ArchetypeParserTest.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -61,7 +61,7 @@ * The loaded archetypes. */ @Nullable - private ArchetypeSet<GameObject, MapArchObject, Archetype> archetypeSet = null; + private ArchetypeSet<GameObject, MapArchObject, Archetype> archetypeSet; /** * Checks that mpart_id fields are parsed correctly. Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/FlatMapRenderer.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/FlatMapRenderer.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/FlatMapRenderer.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -107,7 +107,7 @@ * loading large and/or multiple maps. */ @Nullable - private SoftReference<BufferedImage> backBufferRef = null; + private SoftReference<BufferedImage> backBufferRef; /** * The map view settings instance. Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/mappropertiesdialog/MapPropertiesDialog.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/mappropertiesdialog/MapPropertiesDialog.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/mappropertiesdialog/MapPropertiesDialog.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -98,7 +98,7 @@ * @serial */ @Nullable - private Window dialog = null; + private Window dialog; /** * The {@link GridBagConstraints} for label fields before text input Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/maincontrol/DefaultEditorFactory.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/maincontrol/DefaultEditorFactory.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/maincontrol/DefaultEditorFactory.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -143,7 +143,7 @@ * The {@link SmoothFaces} instance. */ @Nullable - private SmoothFaces smoothFaces = null; + private SmoothFaces smoothFaces; /** * {@inheritDoc} Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/maparchobject/MapArchObject.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/maparchobject/MapArchObject.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/maparchobject/MapArchObject.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -53,55 +53,55 @@ * If set, this entire map is unique. * @serial */ - private boolean unique = false; + private boolean unique; /** * If set, this entire map is a template map. * @serial */ - private boolean template = false; + private boolean template; /** * If set, this entire map is no smooth. * @serial */ - private boolean noSmooth = false; + private boolean noSmooth; /** * Weather variable: temperature. * @serial */ - private int temperature = 0; + private int temperature; /** * Weather variable: pressure. * @serial */ - private int pressure = 0; + private int pressure; /** * Weather variable: humidity (water in the air). * @serial */ - private int humidity = 0; + private int humidity; /** * Weather variable: wind speed. * @serial */ - private int windSpeed = 0; + private int windSpeed; /** * Weather variable: wind direction. * @serial */ - private int windDirection = 0; + private int windDirection; /** * Weather variable: sky settings. * @serial */ - private int sky = 0; + private int sky; /** * The item spec for the shop, if there is one. @@ -121,19 +121,19 @@ * The greed of the shop. * @serial */ - private double shopGreed = 0.0; + private double shopGreed; /** * The minimum price the shop will trade for. * @serial */ - private int shopMin = 0; + private int shopMin; /** * The maximum price the shop will trade for. * @serial */ - private int shopMax = 0; + private int shopMax; /** * The region the map is in. Modified: trunk/crossfire/src/test/net/sf/gridarta/var/crossfire/model/io/ArchetypeParserTest.java =================================================================== --- trunk/crossfire/src/test/net/sf/gridarta/var/crossfire/model/io/ArchetypeParserTest.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/crossfire/src/test/net/sf/gridarta/var/crossfire/model/io/ArchetypeParserTest.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -59,7 +59,7 @@ * The loaded archetypes. */ @Nullable - private ArchetypeSet<GameObject, MapArchObject, Archetype> archetypeSet = null; + private ArchetypeSet<GameObject, MapArchObject, Archetype> archetypeSet; /** * Checks that inventory game objects are recognized. Modified: trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/gui/mappropertiesdialog/MapPropertiesDialog.java =================================================================== --- trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/gui/mappropertiesdialog/MapPropertiesDialog.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/gui/mappropertiesdialog/MapPropertiesDialog.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -114,7 +114,7 @@ * @serial */ @Nullable - private Window dialog = null; + private Window dialog; /** * The message text. Modified: trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/io/ArchetypeParser.java =================================================================== --- trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/io/ArchetypeParser.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/io/ArchetypeParser.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -61,7 +61,7 @@ /** * The multi-shape ID of the currently parsed archetype. */ - private int multiShapeID = 0; + private int multiShapeID; /** * Creates an ArchetypeParser. Modified: trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/maparchobject/MapArchObject.java =================================================================== --- trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/maparchobject/MapArchObject.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/maparchobject/MapArchObject.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -47,79 +47,79 @@ * No save map. * @serial */ - private boolean noSave = false; + private boolean noSave; /** * No magic spells. * @serial */ - private boolean noMagic = false; + private boolean noMagic; /** * No prayers. * @serial */ - private boolean noPriest = false; + private boolean noPriest; /** * No harmful spells allowed. * @serial */ - private boolean noHarm = false; + private boolean noHarm; /** * No summoning allowed. * @serial */ - private boolean noSummon = false; + private boolean noSummon; /** * Check map reset status after re-login. * @serial */ - private boolean fixedLogin = false; + private boolean fixedLogin; /** * Permanent death with revivable corpses. * @serial */ - private boolean permDeath = false; + private boolean permDeath; /** * Permanent death with corpses temporarily available. * @serial */ - private boolean ultraDeath = false; + private boolean ultraDeath; /** * Permanent death with instant character deletion. * @serial */ - private boolean ultimateDeath = false; + private boolean ultimateDeath; /** * Player vs Player combat allowed. * @serial */ - private boolean pvp = false; + private boolean pvp; /** * The tileset id. 0 means no available tileset id * @serial */ - private int tilesetId = 0; + private int tilesetId; /** * The tileset x coordinate. * @serial */ - private int tilesetX = 0; + private int tilesetX; /** * The tileset y coordinate. * @serial */ - private int tilesetY = 0; + private int tilesetY; /** * The name of the background music. Set to empty string if unset. Modified: trunk/gridarta.ipr =================================================================== --- trunk/gridarta.ipr 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/gridarta.ipr 2013-05-24 19:56:48 UTC (rev 9213) @@ -688,6 +688,7 @@ <option name="ignoreObjectConstruction" value="false" /> <option name="ignoreTypeCasts" value="false" /> </inspection_tool> + <inspection_tool class="RedundantFieldInitialization" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="RedundantImplements" enabled="true" level="WARNING" enabled_by_default="true"> <option name="ignoreSerializable" value="false" /> <option name="ignoreCloneable" value="false" /> Modified: trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetype.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetype.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetype.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -54,14 +54,14 @@ * objects. * @serial */ - private int multiX = 0; + private int multiX; /** * The y-distance of this part to the head part. Set to zero for single-part * objects. * @serial */ - private int multiY = 0; + private int multiY; /** * Set if this part of a multi-part object is the lowest part. The lowest @@ -75,20 +75,20 @@ * The multi shape id. * @serial */ - private int multiShapeID = 0; + private int multiShapeID; /** * The multi part id. * @serial */ - private int multiPartNr = 0; + private int multiPartNr; /** * The location in the archetype selector. * @serial */ @Nullable - private String editorFolder = null; + private String editorFolder; /** * If this flag is set, this Archetype is not a "real" Archetype but comes @@ -97,7 +97,7 @@ * for editor and server. * @serial */ - private boolean artifact = false; + private boolean artifact; /** * Creates a new instance. Modified: trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeBuilder.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeBuilder.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeBuilder.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -50,14 +50,14 @@ * The {@link ErrorViewCollector} for reporting errors. */ @Nullable - private ErrorViewCollector errorViewCollector = null; + private ErrorViewCollector errorViewCollector; /** * The {@link Archetype} being built. Set to <code>null</code> when not * building an archetype. */ @Nullable - private R archetype = null; + private R archetype; /** * Collected attributes. Modified: trunk/model/src/app/net/sf/gridarta/model/archetypechooser/ArchetypeChooserFolder.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetypechooser/ArchetypeChooserFolder.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/archetypechooser/ArchetypeChooserFolder.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -61,7 +61,7 @@ * It must be part of {@link #archetypes}. */ @Nullable - private R selectedArchetype = null; + private R selectedArchetype; /** * The registered listeners. Modified: trunk/model/src/app/net/sf/gridarta/model/archetypechooser/ArchetypeChooserModel.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetypechooser/ArchetypeChooserModel.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/archetypechooser/ArchetypeChooserModel.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -53,14 +53,14 @@ * #panels}. Set to <code>null</code> only if no panels do exist. */ @Nullable - private ArchetypeChooserPanel<G, A, R> selectedPanel = null; + private ArchetypeChooserPanel<G, A, R> selectedPanel; /** * The default direction for game objects created from archetypes. Set to * <code>null</code> for default direction. */ @Nullable - private Integer direction = null; + private Integer direction; /** * The registered listeners. Modified: trunk/model/src/app/net/sf/gridarta/model/archetypeset/DefaultArchetypeSet.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetypeset/DefaultArchetypeSet.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/archetypeset/DefaultArchetypeSet.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -70,7 +70,7 @@ * @val <code>false</code> when Archetypes were loaded from individual * .arc-files */ - private boolean loadedFromArchive = false; + private boolean loadedFromArchive; /** * The archetypes used for game objects which reference undefined Modified: trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSet.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSet.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSet.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -42,7 +42,7 @@ * matching any defined type. */ @Nullable - private ArchetypeType fallbackArchetypeType = null; + private ArchetypeType fallbackArchetypeType; /** * Lists with all {@link ArchetypeType ArchetypeTypes}. Contains all but the Modified: trunk/model/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -68,7 +68,7 @@ * @serial */ @Nullable - private String faceObjName = null; + private String faceObjName; /** * The state where the face comes from. @@ -82,7 +82,7 @@ * @serial */ @Nullable - private ImageIcon normalFace = null; + private ImageIcon normalFace; /** * The {@link FaceObjectProviders} for looking up faces. @@ -106,19 +106,19 @@ * @serial */ @Nullable - private StringBuilder msgText = null; + private StringBuilder msgText; /** * The map x position if on map. * @serial */ - private int mapX = 0; + private int mapX; /** * The map y position if on map. * @serial */ - private int mapY = 0; + private int mapY; /** * Data for multi-part objects. Stays <code>null</code> for single-part @@ -126,7 +126,7 @@ * @serial */ @Nullable - private MultiArchData<G, A, R, T> multi = null; + private MultiArchData<G, A, R, T> multi; /** * Edit Type. @@ -146,20 +146,20 @@ * @serial */ @Nullable - private String faceName = null; + private String faceName; /** * The object type. * @serial */ - private int typeNo = 0; + private int typeNo; /** * The object's animation animation. * @serial */ @Nullable - private String animName = null; + private String animName; /** * The direction determines to which direction the GameObject's face is @@ -167,7 +167,7 @@ * animated objects might even have 8 or 9 (8 + still) facings. * @serial */ - private int direction = 0; + private int direction; /** * The map lore. Modified: trunk/model/src/app/net/sf/gridarta/model/baseobject/GameObjectContainer.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/baseobject/GameObjectContainer.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/baseobject/GameObjectContainer.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -123,7 +123,7 @@ /** Current element (last element returned by {@link #next()}). */ @Nullable - private G current = null; + private G current; @Override public boolean hasNext() { Modified: trunk/model/src/app/net/sf/gridarta/model/data/NamedTreeNode.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/data/NamedTreeNode.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/data/NamedTreeNode.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -58,7 +58,7 @@ * @serial */ @Nullable - private NamedTreeNode<?>[] childNodeArray = null; + private NamedTreeNode<?>[] childNodeArray; /** * The parent node, which may be <code>null</code> for the root node. Modified: trunk/model/src/app/net/sf/gridarta/model/exitconnector/AbstractExitConnectorModel.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/exitconnector/AbstractExitConnectorModel.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/exitconnector/AbstractExitConnectorModel.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -39,7 +39,7 @@ * location has been remembered. */ @Nullable - private ExitLocation exitLocation = null; + private ExitLocation exitLocation; /** * Whether the exit's name should be set when pasted. Modified: trunk/model/src/app/net/sf/gridarta/model/face/DoubleImageFilter.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/face/DoubleImageFilter.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/face/DoubleImageFilter.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -42,12 +42,12 @@ /** * The image width. */ - private int width = 0; + private int width; /** * The destination image's pixels. */ - private int[] raster = null; + private int[] raster; /** * Creates a new instance. Modified: trunk/model/src/app/net/sf/gridarta/model/face/FaceObjectProviders.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/face/FaceObjectProviders.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/face/FaceObjectProviders.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -130,7 +130,7 @@ * The face provider for normal faces. */ @Nullable - private FaceProvider normalFaceProvider = null; + private FaceProvider normalFaceProvider; /** * The face provider for alpha faces. Modified: trunk/model/src/app/net/sf/gridarta/model/face/FilterFaceProvider.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/face/FilterFaceProvider.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/face/FilterFaceProvider.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -37,7 +37,7 @@ * The FaceProvider to get the original icon from. */ @Nullable - private FaceProvider parent = null; + private FaceProvider parent; /** * The Filter to apply. Modified: trunk/model/src/app/net/sf/gridarta/model/filter/AbstractFilterConfig.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/filter/AbstractFilterConfig.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/filter/AbstractFilterConfig.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -40,7 +40,7 @@ /** * Whether the filter is enabled. */ - private boolean enabled = false; + private boolean enabled; /** * The registered listeners. Modified: trunk/model/src/app/net/sf/gridarta/model/filter/FilterParser.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/filter/FilterParser.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/filter/FilterParser.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -36,7 +36,7 @@ * The {@link Element} instance being converted. */ @Nullable - private Element element = null; + private Element element; /** * The {@link FilterConfigVisitor} for converting {@link FilterConfig} Modified: trunk/model/src/app/net/sf/gridarta/model/filter/NamedFilterConfig.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/filter/NamedFilterConfig.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/filter/NamedFilterConfig.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -39,7 +39,7 @@ * (<code>false></code>). */ // TODO fix potential concurrency issues - private boolean inverted = false; + private boolean inverted; @NotNull private final Map<String, FilterConfig<?, ?>> map = new HashMap<String, FilterConfig<?, ?>>(); Modified: trunk/model/src/app/net/sf/gridarta/model/gameobject/AbstractGameObject.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/gameobject/AbstractGameObject.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/gameobject/AbstractGameObject.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -58,7 +58,7 @@ * @serial */ @Nullable - private GameObjectContainer<G, A, R> container = null; + private GameObjectContainer<G, A, R> container; /** * Creates a new instance. Modified: trunk/model/src/app/net/sf/gridarta/model/gameobject/DefaultIsoGameObject.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/gameobject/DefaultIsoGameObject.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/gameobject/DefaultIsoGameObject.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -110,21 +110,21 @@ * @serial */ @Nullable - private ImageIcon transFace = null; + private ImageIcon transFace; /** * The double face. * @serial */ @Nullable - private ImageIcon doubleFace = null; + private ImageIcon doubleFace; /** * The transparent double face. * @serial */ @Nullable - private ImageIcon transDoubleFace = null; + private ImageIcon transDoubleFace; /** * Creates a new instance. Modified: trunk/model/src/app/net/sf/gridarta/model/gameobject/MultiArchData.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/gameobject/MultiArchData.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/gameobject/MultiArchData.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -49,25 +49,25 @@ * The maximum coordinate of any part; it is never negative. * @serial */ - private int maxX = 0; + private int maxX; /** * The maximum coordinate of any part; it is never negative. * @serial */ - private int maxY = 0; + private int maxY; /** * The minimum coordinate of any part; it is never positive. * @serial */ - private int minX = 0; + private int minX; /** * The minimum coordinate of any part; it is never positive. * @serial */ - private int minY = 0; + private int minY; /** * The shape ID of this object. Modified: trunk/model/src/app/net/sf/gridarta/model/index/AbstractIndex.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/index/AbstractIndex.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/index/AbstractIndex.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -79,12 +79,12 @@ * Whether the state ({@link #timestamps} or {@link #names}) was modified * since last save. */ - private boolean modified = false; + private boolean modified; /** * Whether a transaction is active. */ - private boolean transaction = false; + private boolean transaction; /** * The values to delete at the end of the current transaction. Empty if no Modified: trunk/model/src/app/net/sf/gridarta/model/index/MapsIndexer.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/index/MapsIndexer.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/index/MapsIndexer.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -96,14 +96,14 @@ * The currently indexed maps directory. */ @Nullable - private File mapsDirectory = null; + private File mapsDirectory; /** * The maps directory to index. If <code>null</code>, {@link #mapsDirectory} * is valid. */ @Nullable - private File newMapsDirectory = null; + private File newMapsDirectory; /** * The object for synchronizing access to {@link #state}. Modified: trunk/model/src/app/net/sf/gridarta/model/io/FlatFileIterator.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/io/FlatFileIterator.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/io/FlatFileIterator.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -47,7 +47,7 @@ /** * The current index into {@link #files}. */ - private int pos = 0; + private int pos; /** * Creates a new instance. Modified: trunk/model/src/app/net/sf/gridarta/model/maparchobject/AbstractMapArchObject.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/maparchobject/AbstractMapArchObject.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/maparchobject/AbstractMapArchObject.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -85,44 +85,44 @@ /** * The x coordinate for entering the map. */ - private int enterX = 0; + private int enterX; /** * The y coordinate for entering the map. */ - private int enterY = 0; + private int enterY; /** * If set, this is an outdoor map. */ - private boolean outdoor = false; + private boolean outdoor; /** * The number of ticks that need to elapse before this map will be reset. */ - private int resetTimeout = 0; + private int resetTimeout; /** * The number of ticks that must elapse after tha map has not been used * before it gets swapped out. */ - private int swapTime = 0; + private int swapTime; /** * The map difficulty. If zero, server calculates something. */ - private int difficulty = 0; + private int difficulty; /** * If nonzero, the map reset time will not be updated when someone enters / * exits the map. */ - private boolean fixedReset = false; + private boolean fixedReset; /** * The light / darkness of map (overall). Zero means fully bright. */ - private int darkness = 0; + private int darkness; /** * The map tile paths used for map tiling. 0 = north, 1 = east, 2 = south, 3 @@ -143,19 +143,19 @@ * nesting level. * @invariant transactionDepth >= 0 */ - private int transactionDepth = 0; + private int transactionDepth; /** * The thread that performs the current transaction. * @invariant transactionDepth > 0 || transactionThread == null */ @Nullable - private transient Thread transactionThread = null; + private transient Thread transactionThread; /** * Set if any attribute has changed inside the current transaction. */ - private boolean attributeHasChanged = false; + private boolean attributeHasChanged; /** * Creates a new instance. Modified: trunk/model/src/app/net/sf/gridarta/model/mapgrid/MapGrid.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/mapgrid/MapGrid.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/mapgrid/MapGrid.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -76,14 +76,14 @@ /** * If set, {@link #cachedSelectedRec} is up-to-date. */ - private boolean cachedSelectedRecValid = false; + private boolean cachedSelectedRecValid; /** * The return value for {@link #getSelectedRec()}. Only valid if {@link * #cachedSelectedRecValid} is set. */ @Nullable - private Rectangle cachedSelectedRec = null; + private Rectangle cachedSelectedRec; /** * Selection - marks all selected squares. @@ -164,14 +164,14 @@ * nesting level. * @invariant transactionDepth >= 0 */ - private int transactionDepth = 0; + private int transactionDepth; /** * The thread that performs the current transaction. * @invariant transactionDepth > 0 || transactionThread == null */ @Nullable - private Thread transactionThread = null; + private Thread transactionThread; /** * Creates a new instance. Modified: trunk/model/src/app/net/sf/gridarta/model/mapmanager/AbstractMapManager.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/mapmanager/AbstractMapManager.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/mapmanager/AbstractMapManager.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -96,7 +96,7 @@ * The current top map we are working with. */ @Nullable - private MapControl<G, A, R> currentMapControl = null; + private MapControl<G, A, R> currentMapControl; /** * Create a new map manager. Modified: trunk/model/src/app/net/sf/gridarta/model/mapmodel/DefaultMapModel.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/mapmodel/DefaultMapModel.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/mapmodel/DefaultMapModel.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -117,14 +117,14 @@ * nesting level. * @invariant transactionDepth >= 0 */ - private int transactionDepth = 0; + private int transactionDepth; /** * The thread that performs the current transaction. * @invariant transactionDepth > 0 || transactionThread == null */ @Nullable - private transient Thread transactionThread = null; + private transient Thread transactionThread; /** * The ArrayList with changed squares. @@ -161,7 +161,7 @@ * Contains the edit types that have already been (requested and) calculated * (edit types get calculated only when needed to save time). */ - private int activeEditType = 0; + private int activeEditType; /** * The {@link GameObjectFactory} for creating {@link GameObject @@ -187,7 +187,7 @@ * been saved. */ @Nullable - private File mapFile = null; + private File mapFile; /** * Set if the map has changed since last save. Modified: trunk/model/src/app/net/sf/gridarta/model/match/ViewGameObjectMatcherManager.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/match/ViewGameObjectMatcherManager.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/match/ViewGameObjectMatcherManager.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -149,7 +149,7 @@ /** * Selected state. */ - private boolean selected = false; + private boolean selected; /** * A {@link MutableOrGameObjectMatcher} to add / remove {@link Modified: trunk/model/src/app/net/sf/gridarta/model/resource/AbstractResources.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/resource/AbstractResources.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/resource/AbstractResources.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -61,12 +61,12 @@ /** * Whether the resources have been loaded. */ - private boolean loaded = false; + private boolean loaded; /** * Whether the resources have been loaded from individual files. */ - private boolean loadedFromFiles = false; + private boolean loadedFromFiles; /** * Creates a new instance. Modified: trunk/model/src/app/net/sf/gridarta/model/settings/DefaultGlobalSettings.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/settings/DefaultGlobalSettings.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/settings/DefaultGlobalSettings.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -175,7 +175,7 @@ /** * Time for an automated documentation popup. */ - private boolean autoPopupDocumentation = false; + private boolean autoPopupDocumentation; /** * The the default directory for saving maps. Modified: trunk/model/src/app/net/sf/gridarta/model/undo/UndoModel.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/undo/UndoModel.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/undo/UndoModel.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -63,7 +63,7 @@ * 0</code>, "undo" is not possible; if <code>undoStackIndex == * undoStack.size()</code>, "redo" is not possible. */ - private int undoStackIndex = 0; + private int undoStackIndex; /** * The type for recording undo information. Modified: trunk/model/src/app/net/sf/gridarta/model/undo/UndoState.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/undo/UndoState.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/undo/UndoState.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -51,7 +51,7 @@ * operation started. */ @Nullable - private SavedSquares<G, A, R> savedSquares = null; + private SavedSquares<G, A, R> savedSquares; /** * Create a new instance. Modified: trunk/model/src/app/net/sf/gridarta/model/validation/checks/MapCheckerScriptChecker.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/validation/checks/MapCheckerScriptChecker.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/app/net/sf/gridarta/model/validation/checks/MapCheckerScriptChecker.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -107,7 +107,7 @@ * until created. */ @Nullable - private File tmpFile = null; + private File tmpFile; /** * Creates a new instance. @@ -408,7 +408,7 @@ * Otherwise points to <code>{@link #args}[0]</code>. */ @Nullable - private File cachedCommand = null; + private File cachedCommand; /** * Returns the command to execute. Returns or updates {@link Modified: trunk/model/src/test/net/sf/gridarta/model/archetype/TestDefaultArchetype.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/archetype/TestDefaultArchetype.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/test/net/sf/gridarta/model/archetype/TestDefaultArchetype.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -40,7 +40,7 @@ /** * The return value of {@link #usesDirection()}. */ - private boolean usesDirection = false; + private boolean usesDirection; /** * Creates a new instance. Modified: trunk/model/src/test/net/sf/gridarta/model/baseobject/AbstractBaseObjectTest.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/baseobject/AbstractBaseObjectTest.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/test/net/sf/gridarta/model/baseobject/AbstractBaseObjectTest.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -52,7 +52,7 @@ * The {@link SystemIcons} instance. */ @Nullable - private SystemIcons systemIcons = null; + private SystemIcons systemIcons; /** * Checks that setting the face name does work. Modified: trunk/model/src/test/net/sf/gridarta/model/errorview/TestErrorView.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/errorview/TestErrorView.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/test/net/sf/gridarta/model/errorview/TestErrorView.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -37,12 +37,12 @@ /** * Whether errors have been collected. */ - private boolean hasErrors = false; + private boolean hasErrors; /** * Whether warnings have been collected. */ - private boolean hasWarnings = false; + private boolean hasWarnings; /** * {@inheritDoc} Modified: trunk/model/src/test/net/sf/gridarta/model/io/ArchetypeParserTest.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/io/ArchetypeParserTest.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/test/net/sf/gridarta/model/io/ArchetypeParserTest.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -52,7 +52,7 @@ * The loaded archetypes. */ @Nullable - private ArchetypeSet<TestGameObject, TestMapArchObject, TestArchetype> archetypeSet = null; + private ArchetypeSet<TestGameObject, TestMapArchObject, TestArchetype> archetypeSet; /** * Checks that a missing "object" line is detected. Modified: trunk/model/src/test/net/sf/gridarta/model/mapcursor/MapCursorTest.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/mapcursor/MapCursorTest.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/test/net/sf/gridarta/model/mapcursor/MapCursorTest.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -483,12 +483,12 @@ /** * The number of calls to {@link #mapCursorChangedPos(Point)}. */ - private int changedPosCounter = 0; + private int changedPosCounter; /** * The number of calls to {@link #mapCursorChangedMode()}. */ - private int changedModeCounter = 0; + private int changedModeCounter; @Override public void mapCursorChangedPos(@Nullable final Point location) { Modified: trunk/model/src/test/net/sf/gridarta/model/match/NamedGameObjectMatcherTest.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/match/NamedGameObjectMatcherTest.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/model/src/test/net/sf/gridarta/model/match/NamedGameObjectMatcherTest.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -48,7 +48,7 @@ * The {@link SystemIcons} instance. */ @Nullable - private SystemIcons systemIcons = null; + private SystemIcons systemIcons; /** * Checks that a {@link NamedGameObjectMatcher} works correctly when not Modified: trunk/plugin/src/app/net/sf/gridarta/plugin/BshThread.java =================================================================== --- trunk/plugin/src/app/net/sf/gridarta/plugin/BshThread.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/plugin/src/app/net/sf/gridarta/plugin/BshThread.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -45,7 +45,7 @@ /** * Whether the plugin has been executed successfully. */ - private boolean success = false; + private boolean success; /** * Creates a new instance. Modified: trunk/plugin/src/app/net/sf/gridarta/plugin/Plugin.java =================================================================== --- trunk/plugin/src/app/net/sf/gridarta/plugin/Plugin.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/plugin/src/app/net/sf/gridarta/plugin/Plugin.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -93,17 +93,17 @@ /** * Whether this plugin is run whenever the editor starts. */ - private boolean autoBoot = false; + private boolean autoBoot; /** * Whether this plugin is a filter. */ - private boolean filter = false; + private boolean filter; /** * Whether this plugin is a stand-alone plugin. */ - private boolean script = false; + private boolean script; /** * The {@link ChangeListener ChangeListeners} to inform about changes. @@ -116,12 +116,12 @@ * plugin has no associated location. */ @Nullable - private File file = null; + private File file; /** * Whether the plugin contents has been modified since last save. */ - private boolean modified = false; + private boolean modified; /** * Creates a new instance. Modified: trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/ArchParameter.java =================================================================== --- trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/ArchParameter.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/ArchParameter.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -44,7 +44,7 @@ @NotNull private final ArchetypeSet<G, A, R> archetypeSet; - private String valueString = null; + private String valueString; /** * Creates a new instance. Modified: trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/DoubleParameter.java =================================================================== --- trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/DoubleParameter.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/DoubleParameter.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -38,7 +38,7 @@ /** * The minimal allowed value. */ - private double min = 0.0; + private double min; /** * The maximal allowed value. We do not use the {@link Double#MAX_VALUE} or Modified: trunk/preferences/src/app/net/sf/gridarta/preferences/FilePreferencesFactory.java =================================================================== --- trunk/preferences/src/app/net/sf/gridarta/preferences/FilePreferencesFactory.java 2013-05-24 19:37:16 UTC (rev 9212) +++ trunk/preferences/src/app/net/sf/gridarta/preferences/FilePreferencesFactory.java 2013-05-24 19:56:48 UTC (rev 9213) @@ -35,12 +35,12 @@ /** * The user preferences as returned by {@link #userRoot()}. */ - private static Preferences userRoot = null; + private static Preferences userRoot; /** * The system preferences as returned by {@link #userRoot()}. */ - private static Preferences systemRoot = null; + private static Preferences systemRoot; /** * Initialize the module. This function must be called before an instance is Modified: trunk/src/app/net/sf/gridarta/commands/Collector.java =================================================================== --- trunk/src/app/net... [truncated message content] |
From: <aki...@us...> - 2013-05-24 20:14:40
|
Revision: 9216 http://sourceforge.net/p/gridarta/code/9216 Author: akirschbaum Date: 2013-05-24 20:14:36 +0000 (Fri, 24 May 2013) Log Message: ----------- Simplify code. Modified Paths: -------------- trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSet.java trunk/src/app/net/sf/gridarta/gui/dialog/gameobjectattributes/GameObjectAttributesDialog.java Modified: trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSet.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSet.java 2013-05-24 20:08:51 UTC (rev 9215) +++ trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSet.java 2013-05-24 20:14:36 UTC (rev 9216) @@ -92,16 +92,6 @@ } /** - * Returns an {@link ArchetypeType} instance by index. - * @param n the index - * @return the archetype type instance - */ - @Nullable - public ArchetypeType getArchetypeType(final int n) { - return archetypeTypeList.get(n); - } - - /** * Returns the index of an {@link ArchetypeType} instance. * @param archetypeType the archetype type instance * @return the index @@ -269,4 +259,14 @@ sb.append('\n'); } + /** + * Returns whether a given {@link ArchetypeType} is the fallback archetype + * type used for game objects not matching any defined archetype type. + * @param archetypeType the archetype type to check + * @return whether the given archetype type is the fallback archetype type + */ + public boolean isFallbackArchetypeType(@NotNull final ArchetypeType archetypeType) { + return archetypeType == fallbackArchetypeType; + } + } Modified: trunk/src/app/net/sf/gridarta/gui/dialog/gameobjectattributes/GameObjectAttributesDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/dialog/gameobjectattributes/GameObjectAttributesDialog.java 2013-05-24 20:08:51 UTC (rev 9215) +++ trunk/src/app/net/sf/gridarta/gui/dialog/gameobjectattributes/GameObjectAttributesDialog.java 2013-05-24 20:14:36 UTC (rev 9216) @@ -1229,15 +1229,11 @@ // deal with syntax errors now if (errors != null) { - final boolean keepErrors; - if (tmpArchetypeType == archetypeTypeSet.getArchetypeType(0)) { - // for generic (misc) type, all errors are automatically kept. - // "misc" is no real type - it is more a default mask for unknown types - keepErrors = true; - } else { - // open a popup dialog and ask user to decide what to do with his errors - keepErrors = ConfirmErrorsDialog.askConfirmErrors(errors, this); - } + // For the fallback archetype type, all errors are automatically + // kept. "Misc" is no real type - it is more a default mask for + // unknown types. For all other archetype types, a popup dialog is + // opened and the user may decide what to do with his errors. + final boolean keepErrors = archetypeTypeSet.isFallbackArchetypeType(tmpArchetypeType) || ConfirmErrorsDialog.askConfirmErrors(errors, this); if (keepErrors) { gameObject.addObjectText(errors.trim()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2013-05-24 20:21:09
|
Revision: 9217 http://sourceforge.net/p/gridarta/code/9217 Author: akirschbaum Date: 2013-05-24 20:21:06 +0000 (Fri, 24 May 2013) Log Message: ----------- Merge duplicated code. Modified Paths: -------------- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/gameobject/GameObject.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/gameobject/GameObject.java trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSet.java trunk/src/app/net/sf/gridarta/gui/dialog/gameobjectattributes/GameObjectAttributesDialog.java trunk/src/app/net/sf/gridarta/gui/panel/gameobjecttexteditor/GameObjectTextEditor.java Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/gameobject/GameObject.java =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/gameobject/GameObject.java 2013-05-24 20:14:36 UTC (rev 9216) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/gameobject/GameObject.java 2013-05-24 20:21:06 UTC (rev 9217) @@ -74,7 +74,7 @@ @Override public void addLast(@NotNull final GameObject gameObject) { // force type change when a MONSTER is put in a spawn point - if (archetypeTypeSet.getTypeOfArch(this).getTypeNo() == Archetype.TYPE_SPAWN_POINT && archetypeTypeSet.getTypeOfArch(gameObject).getTypeNo() == Archetype.TYPE_MOB) { + if (archetypeTypeSet.getArchetypeType(this).getTypeNo() == Archetype.TYPE_SPAWN_POINT && archetypeTypeSet.getArchetypeType(gameObject).getTypeNo() == Archetype.TYPE_MOB) { gameObject.setAttributeInt(TYPE, Archetype.TYPE_SPAWN_POINT_MOB); // change to SPAWN_POINT_MOB } super.addLast(gameObject); @@ -86,7 +86,7 @@ @Override public void addFirst(@NotNull final GameObject gameObject) { // force type change when a MONSTER is put in a spawn point - if (archetypeTypeSet.getTypeOfArch(this).getTypeNo() == Archetype.TYPE_SPAWN_POINT && archetypeTypeSet.getTypeOfArch(gameObject).getTypeNo() == Archetype.TYPE_MOB) { + if (archetypeTypeSet.getArchetypeType(this).getTypeNo() == Archetype.TYPE_SPAWN_POINT && archetypeTypeSet.getArchetypeType(gameObject).getTypeNo() == Archetype.TYPE_MOB) { gameObject.setAttributeInt(TYPE, Archetype.TYPE_SPAWN_POINT_MOB); // change to SPAWN_POINT_MOB } super.addFirst(gameObject); Modified: trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/gameobject/GameObject.java =================================================================== --- trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/gameobject/GameObject.java 2013-05-24 20:14:36 UTC (rev 9216) +++ trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/gameobject/GameObject.java 2013-05-24 20:21:06 UTC (rev 9217) @@ -81,7 +81,7 @@ @Override public void addLast(@NotNull final GameObject gameObject) { // force type change when a MONSTER is put in a spawn point - if (archetypeTypeSet.getTypeOfArch(this).getTypeNo() == Archetype.TYPE_SPAWN_POINT && archetypeTypeSet.getTypeOfArch(gameObject).getTypeNo() == Archetype.TYPE_MOB) { + if (archetypeTypeSet.getArchetypeType(this).getTypeNo() == Archetype.TYPE_SPAWN_POINT && archetypeTypeSet.getArchetypeType(gameObject).getTypeNo() == Archetype.TYPE_MOB) { gameObject.setAttributeInt(TYPE, Archetype.TYPE_SPAWN_POINT_MOB); // change to SPAWN_POINT_MOB } super.addLast(gameObject); @@ -93,7 +93,7 @@ @Override public void addFirst(@NotNull final GameObject gameObject) { // force type change when a MONSTER is put in a spawn point - if (archetypeTypeSet.getTypeOfArch(this).getTypeNo() == Archetype.TYPE_SPAWN_POINT && archetypeTypeSet.getTypeOfArch(gameObject).getTypeNo() == Archetype.TYPE_MOB) { + if (archetypeTypeSet.getArchetypeType(this).getTypeNo() == Archetype.TYPE_SPAWN_POINT && archetypeTypeSet.getArchetypeType(gameObject).getTypeNo() == Archetype.TYPE_MOB) { gameObject.setAttributeInt(TYPE, Archetype.TYPE_SPAWN_POINT_MOB); // change to SPAWN_POINT_MOB } super.addFirst(gameObject); Modified: trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSet.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSet.java 2013-05-24 20:14:36 UTC (rev 9216) +++ trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSet.java 2013-05-24 20:21:06 UTC (rev 9217) @@ -110,25 +110,6 @@ } /** - * Find and return the type-structure (<code>ArchetypeType</code>) that - * matches for the given base object. This is not only a comparison between - * type numbers - special type-attributes must also be dealt with. <p/> - * @param baseObject the base object to find the type for - * @return the <code>ArchetypeType</code> which belongs to this base object, - * or the first (misc) type if no match is found. - */ - @NotNull - public ArchetypeType getTypeOfArch(@NotNull final BaseObject<?, ?, ?, ?> baseObject) { - for (final ArchetypeType tmp : archetypeTypeList) { - if (tmp.matches(baseObject)) { - return tmp; - } - } - - return fallbackArchetypeType; - } - - /** * Returns a bitmask type by name. * @param bitmaskName the bitmask name to look up * @return the bitmask type or <code>null</code> if the name does not exist Modified: trunk/src/app/net/sf/gridarta/gui/dialog/gameobjectattributes/GameObjectAttributesDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/dialog/gameobjectattributes/GameObjectAttributesDialog.java 2013-05-24 20:14:36 UTC (rev 9216) +++ trunk/src/app/net/sf/gridarta/gui/dialog/gameobjectattributes/GameObjectAttributesDialog.java 2013-05-24 20:21:06 UTC (rev 9217) @@ -1175,7 +1175,7 @@ * @return true if the settings were applied, false if error occurred */ private boolean applySettings2() { - final ArchetypeType tmpArchetypeType = archetypeTypeSet.getTypeOfArch(gameObject); // the type structure for this gameObject + final ArchetypeType tmpArchetypeType = archetypeTypeSet.getArchetypeType(gameObject); // the type structure for this gameObject final StringBuilder newArchText = new StringBuilder(); final String[] newMsg = new String[1]; Modified: trunk/src/app/net/sf/gridarta/gui/panel/gameobjecttexteditor/GameObjectTextEditor.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/panel/gameobjecttexteditor/GameObjectTextEditor.java 2013-05-24 20:14:36 UTC (rev 9216) +++ trunk/src/app/net/sf/gridarta/gui/panel/gameobjecttexteditor/GameObjectTextEditor.java 2013-05-24 20:21:06 UTC (rev 9217) @@ -124,7 +124,7 @@ try { final Document document = archEdit.getDocument(); - final ArchetypeType typeStruct = archetypeTypeSet.getTypeOfArch(gameObject); + final ArchetypeType typeStruct = archetypeTypeSet.getArchetypeType(gameObject); final String errorText = GameObjectUtils.getSyntaxErrors(gameObject, typeStruct); final String objectText = gameObject.getObjectText(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2013-05-24 20:38:24
|
Revision: 9222 http://sourceforge.net/p/gridarta/code/9222 Author: akirschbaum Date: 2013-05-24 20:38:21 +0000 (Fri, 24 May 2013) Log Message: ----------- Rename function names. Modified Paths: -------------- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/gameobject/GameObject.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/gameobject/GameObject.java trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSet.java trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParser.java trunk/model/src/test/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetTest.java trunk/src/app/net/sf/gridarta/gui/dialog/gameobjectattributes/GameObjectAttributesDialog.java trunk/src/app/net/sf/gridarta/gui/dialog/gameobjectattributes/TypesBoxItemListener.java trunk/src/app/net/sf/gridarta/gui/panel/gameobjecttexteditor/GameObjectTextEditor.java Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/gameobject/GameObject.java =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/gameobject/GameObject.java 2013-05-24 20:33:54 UTC (rev 9221) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/gameobject/GameObject.java 2013-05-24 20:38:21 UTC (rev 9222) @@ -74,7 +74,7 @@ @Override public void addLast(@NotNull final GameObject gameObject) { // force type change when a MONSTER is put in a spawn point - if (archetypeTypeSet.getArchetypeType(this).getTypeNo() == Archetype.TYPE_SPAWN_POINT && archetypeTypeSet.getArchetypeType(gameObject).getTypeNo() == Archetype.TYPE_MOB) { + if (archetypeTypeSet.getArchetypeTypeByBaseObject(this).getTypeNo() == Archetype.TYPE_SPAWN_POINT && archetypeTypeSet.getArchetypeTypeByBaseObject(gameObject).getTypeNo() == Archetype.TYPE_MOB) { gameObject.setAttributeInt(TYPE, Archetype.TYPE_SPAWN_POINT_MOB); // change to SPAWN_POINT_MOB } super.addLast(gameObject); @@ -86,7 +86,7 @@ @Override public void addFirst(@NotNull final GameObject gameObject) { // force type change when a MONSTER is put in a spawn point - if (archetypeTypeSet.getArchetypeType(this).getTypeNo() == Archetype.TYPE_SPAWN_POINT && archetypeTypeSet.getArchetypeType(gameObject).getTypeNo() == Archetype.TYPE_MOB) { + if (archetypeTypeSet.getArchetypeTypeByBaseObject(this).getTypeNo() == Archetype.TYPE_SPAWN_POINT && archetypeTypeSet.getArchetypeTypeByBaseObject(gameObject).getTypeNo() == Archetype.TYPE_MOB) { gameObject.setAttributeInt(TYPE, Archetype.TYPE_SPAWN_POINT_MOB); // change to SPAWN_POINT_MOB } super.addFirst(gameObject); Modified: trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/gameobject/GameObject.java =================================================================== --- trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/gameobject/GameObject.java 2013-05-24 20:33:54 UTC (rev 9221) +++ trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/gameobject/GameObject.java 2013-05-24 20:38:21 UTC (rev 9222) @@ -81,7 +81,7 @@ @Override public void addLast(@NotNull final GameObject gameObject) { // force type change when a MONSTER is put in a spawn point - if (archetypeTypeSet.getArchetypeType(this).getTypeNo() == Archetype.TYPE_SPAWN_POINT && archetypeTypeSet.getArchetypeType(gameObject).getTypeNo() == Archetype.TYPE_MOB) { + if (archetypeTypeSet.getArchetypeTypeByBaseObject(this).getTypeNo() == Archetype.TYPE_SPAWN_POINT && archetypeTypeSet.getArchetypeTypeByBaseObject(gameObject).getTypeNo() == Archetype.TYPE_MOB) { gameObject.setAttributeInt(TYPE, Archetype.TYPE_SPAWN_POINT_MOB); // change to SPAWN_POINT_MOB } super.addLast(gameObject); @@ -93,7 +93,7 @@ @Override public void addFirst(@NotNull final GameObject gameObject) { // force type change when a MONSTER is put in a spawn point - if (archetypeTypeSet.getArchetypeType(this).getTypeNo() == Archetype.TYPE_SPAWN_POINT && archetypeTypeSet.getArchetypeType(gameObject).getTypeNo() == Archetype.TYPE_MOB) { + if (archetypeTypeSet.getArchetypeTypeByBaseObject(this).getTypeNo() == Archetype.TYPE_SPAWN_POINT && archetypeTypeSet.getArchetypeTypeByBaseObject(gameObject).getTypeNo() == Archetype.TYPE_MOB) { gameObject.setAttributeInt(TYPE, Archetype.TYPE_SPAWN_POINT_MOB); // change to SPAWN_POINT_MOB } super.addFirst(gameObject); Modified: trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSet.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSet.java 2013-05-24 20:33:54 UTC (rev 9221) +++ trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSet.java 2013-05-24 20:38:21 UTC (rev 9222) @@ -76,7 +76,7 @@ * Adds an {@link ArchetypeType} instance. * @param archetypeType the archetype type instance */ - public void add(@NotNull final ArchetypeType archetypeType) { + public void addArchetypeType(@NotNull final ArchetypeType archetypeType) { archetypeTypeList.add(archetypeType); final String typeName = archetypeType.getTypeName(); archetypeTypeNames.put(typeName, archetypeType); @@ -106,7 +106,7 @@ * ("Misc") type if no match is found */ @NotNull - public ArchetypeType getTypeByName(@NotNull final String typeName) { + public ArchetypeType getArchetypeTypeByName(@NotNull final String typeName) { final ArchetypeType type = archetypeTypeNames.get(typeName.trim()); if (type != null) { return type; @@ -122,7 +122,7 @@ * if no match was found */ @NotNull - public ArchetypeType getArchetypeType(@NotNull final BaseObject<?, ?, ?, ?> baseObject) { + public ArchetypeType getArchetypeTypeByBaseObject(@NotNull final BaseObject<?, ?, ?, ?> baseObject) { for (final ArchetypeType archetypeType : archetypeTypeList) { if (archetypeType.matches(baseObject)) { return archetypeType; @@ -155,7 +155,7 @@ * counted. * @return the number of archetype types in the list */ - public int getLength() { + public int getArchetypeTypeCount() { return archetypeTypeList.size(); } @@ -215,7 +215,7 @@ */ @NotNull public String getDisplayName(@NotNull final BaseObject<?, ?, ?, ?> baseObject) { - return getArchetypeType(baseObject).getDisplayName(baseObject); + return getArchetypeTypeByBaseObject(baseObject).getDisplayName(baseObject); } /** Modified: trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParser.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParser.java 2013-05-24 20:33:54 UTC (rev 9221) +++ trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParser.java 2013-05-24 20:38:21 UTC (rev 9222) @@ -304,7 +304,7 @@ } if (log.isInfoEnabled()) { - log.info("Loaded " + archetypeTypeSet.getLength() + " types from '" + filename + "\'"); + log.info("Loaded " + archetypeTypeSet.getArchetypeTypeCount() + " types from '" + filename + "\'"); } } @@ -552,7 +552,7 @@ */ private void parseTypes(@NotNull final Element typeElement, @NotNull final ErrorViewCollector errorViewCollector, @NotNull final IgnorelistsDefinition ignorelistsDefinition) { if (!typeElement.getAttribute(XML_TYPE_AVAILABLE).equals("no")) { - archetypeTypeSet.add(archetypeTypeParser.loadAttributeList(typeElement, errorViewCollector, defaultArchetypeType, archetypeTypeSet, ignorelistsDefinition, false)); + archetypeTypeSet.addArchetypeType(archetypeTypeParser.loadAttributeList(typeElement, errorViewCollector, defaultArchetypeType, archetypeTypeSet, ignorelistsDefinition, false)); } } Modified: trunk/model/src/test/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetTest.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetTest.java 2013-05-24 20:33:54 UTC (rev 9221) +++ trunk/model/src/test/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetTest.java 2013-05-24 20:38:21 UTC (rev 9222) @@ -36,7 +36,7 @@ @Test(expected = UnsupportedOperationException.class) public void testIteratorReadOnly() { final ArchetypeTypeSet archetypeTypeSet = new ArchetypeTypeSet(); - archetypeTypeSet.add(new ArchetypeType("name", 0, "", false, null, false, null, null, 0, new ArchetypeAttributes(), new ArchetypeAttributesDefinition())); + archetypeTypeSet.addArchetypeType(new ArchetypeType("name", 0, "", false, null, false, null, null, 0, new ArchetypeAttributes(), new ArchetypeAttributesDefinition())); final Iterator<ArchetypeType> iterator = archetypeTypeSet.iterator(); Assert.assertTrue(iterator.hasNext()); iterator.next(); Modified: trunk/src/app/net/sf/gridarta/gui/dialog/gameobjectattributes/GameObjectAttributesDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/dialog/gameobjectattributes/GameObjectAttributesDialog.java 2013-05-24 20:33:54 UTC (rev 9221) +++ trunk/src/app/net/sf/gridarta/gui/dialog/gameobjectattributes/GameObjectAttributesDialog.java 2013-05-24 20:38:21 UTC (rev 9222) @@ -788,7 +788,7 @@ mapManager.addMapManagerListener(mapManagerListener); // first split top-left and -right - final ArchetypeType archetypeType = archetypeTypeSet.getArchetypeType(gameObject); + final ArchetypeType archetypeType = archetypeTypeSet.getArchetypeTypeByBaseObject(gameObject); final JComponent leftPane = buildHeader(archetypeTypeSet.getArchetypeTypeIndex(archetypeType), archetypeType); // Now split horizontally @@ -860,7 +860,7 @@ */ @NotNull private Component buildTypesBox(final int type, @NotNull final ArchetypeType archetypeType) { - final String[] nameList = new String[archetypeTypeSet.getLength()]; + final String[] nameList = new String[archetypeTypeSet.getArchetypeTypeCount()]; // read all type names int i = 0; @@ -1175,7 +1175,7 @@ * @return true if the settings were applied, false if error occurred */ private boolean applySettings2() { - final ArchetypeType tmpArchetypeType = archetypeTypeSet.getArchetypeType(gameObject); // the type structure for this gameObject + final ArchetypeType tmpArchetypeType = archetypeTypeSet.getArchetypeTypeByBaseObject(gameObject); // the type structure for this gameObject final StringBuilder newArchText = new StringBuilder(); final String[] newMsg = new String[1]; Modified: trunk/src/app/net/sf/gridarta/gui/dialog/gameobjectattributes/TypesBoxItemListener.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/dialog/gameobjectattributes/TypesBoxItemListener.java 2013-05-24 20:33:54 UTC (rev 9221) +++ trunk/src/app/net/sf/gridarta/gui/dialog/gameobjectattributes/TypesBoxItemListener.java 2013-05-24 20:38:21 UTC (rev 9222) @@ -130,7 +130,7 @@ if (e.getStateChange() == ItemEvent.DESELECTED) { deselected = ((String) e.getItem()).trim(); } else if (e.getStateChange() == ItemEvent.SELECTED && !e.getItem().equals(deselected)) { - final ArchetypeType newType = archetypeTypeSet.getTypeByName((String) e.getItem()); + final ArchetypeType newType = archetypeTypeSet.getArchetypeTypeByName((String) e.getItem()); typeComboBox.hidePopup(); gameObjectAttributesDialog.update(gameObjectAttributesDialog.getGraphics()); Modified: trunk/src/app/net/sf/gridarta/gui/panel/gameobjecttexteditor/GameObjectTextEditor.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/panel/gameobjecttexteditor/GameObjectTextEditor.java 2013-05-24 20:33:54 UTC (rev 9221) +++ trunk/src/app/net/sf/gridarta/gui/panel/gameobjecttexteditor/GameObjectTextEditor.java 2013-05-24 20:38:21 UTC (rev 9222) @@ -124,7 +124,7 @@ try { final Document document = archEdit.getDocument(); - final ArchetypeType typeStruct = archetypeTypeSet.getArchetypeType(gameObject); + final ArchetypeType typeStruct = archetypeTypeSet.getArchetypeTypeByBaseObject(gameObject); final String errorText = GameObjectUtils.getSyntaxErrors(gameObject, typeStruct); final String objectText = gameObject.getObjectText(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2013-05-28 17:57:05
|
Revision: 9229 http://sourceforge.net/p/gridarta/code/9229 Author: akirschbaum Date: 2013-05-28 17:56:59 +0000 (Tue, 28 May 2013) Log Message: ----------- Extract XmlUtils from ArchetypeTypeSetParser. Modified Paths: -------------- trunk/build.xml trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParser.java trunk/utils/utils.iml Added Paths: ----------- trunk/utils/src/app/net/sf/gridarta/utils/XmlUtils.java Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2013-05-25 17:23:39 UTC (rev 9228) +++ trunk/build.xml 2013-05-28 17:56:59 UTC (rev 9229) @@ -606,6 +606,7 @@ <path refid="path.lib.annotations"/> <path refid="path.lib.japi-swing-action"/> <path refid="path.lib.japi-util"/> + <path refid="path.lib.japi-xml"/> <path refid="path.lib.log4j"/> </classpath> <compilerarg line="${javac.args}"/> @@ -620,6 +621,7 @@ <path refid="path.lib.annotations"/> <path refid="path.lib.japi-swing-action"/> <path refid="path.lib.japi-util"/> + <path refid="path.lib.japi-xml"/> <path refid="path.lib.junit"/> </classpath> <compilerarg line="${javac.args}"/> Modified: trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParser.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParser.java 2013-05-25 17:23:39 UTC (rev 9228) +++ trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParser.java 2013-05-28 17:56:59 UTC (rev 9229) @@ -25,6 +25,7 @@ import net.sf.gridarta.model.errorview.ErrorViewCategory; import net.sf.gridarta.model.errorview.ErrorViewCollector; import net.sf.gridarta.utils.SyntaxErrorException; +import net.sf.gridarta.utils.XmlUtils; import net.sf.japi.xml.NodeListIterator; import org.apache.log4j.Category; import org.apache.log4j.Logger; @@ -293,10 +294,10 @@ */ public void loadTypesFromXML(@NotNull final ErrorViewCollector errorViewCollector, @NotNull final String filename, @NotNull final Document document) { final Element rootElement = document.getDocumentElement(); - parseBitmasks(getChild(rootElement, XML_ELEMENT_BITMASKS), errorViewCollector); - parseLists(getChild(rootElement, XML_ELEMENT_LISTS), errorViewCollector); - final IgnorelistsDefinition ignorelistsDefinition = parseIgnoreLists(getChild(rootElement, XML_ELEMENT_IGNORELISTS), errorViewCollector); - parseDefaultType(getChild(rootElement, XML_ELEMENT_DEFAULT_TYPE), errorViewCollector, ignorelistsDefinition); + parseBitmasks(XmlUtils.getChild(rootElement, XML_ELEMENT_BITMASKS), errorViewCollector); + parseLists(XmlUtils.getChild(rootElement, XML_ELEMENT_LISTS), errorViewCollector); + final IgnorelistsDefinition ignorelistsDefinition = parseIgnoreLists(XmlUtils.getChild(rootElement, XML_ELEMENT_IGNORELISTS), errorViewCollector); + parseDefaultType(XmlUtils.getChild(rootElement, XML_ELEMENT_DEFAULT_TYPE), errorViewCollector, ignorelistsDefinition); final Iterator<Element> typeElements = new NodeListIterator<Element>(rootElement, XML_ELEMENT_TYPE); while (typeElements.hasNext()) { @@ -309,22 +310,6 @@ } /** - * Returns a child {@link Element} of a parent element. The child element - * must exist. - * @param parentElement the parent element - * @param childName the name of the child element - * @return the child element - */ - @NotNull - private static Element getChild(@NotNull final Element parentElement, @NotNull final String childName) { - final Element element = NodeListIterator.getFirstChild(parentElement, childName); - if (element == null) { - throw new IllegalArgumentException("child element '" + childName + "' does not exist"); - } - return element; - } - - /** * Parses the {@link #XML_ELEMENT_BITMASKS} section of a types.xml file. * @param bitmasksElement the element to parse * @param errorViewCollector the error view collector for reporting errors Added: trunk/utils/src/app/net/sf/gridarta/utils/XmlUtils.java =================================================================== --- trunk/utils/src/app/net/sf/gridarta/utils/XmlUtils.java (rev 0) +++ trunk/utils/src/app/net/sf/gridarta/utils/XmlUtils.java 2013-05-28 17:56:59 UTC (rev 9229) @@ -0,0 +1,54 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2011 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.utils; + +import net.sf.japi.xml.NodeListIterator; +import org.jetbrains.annotations.NotNull; +import org.w3c.dom.Element; + +/** + * XML related utility functions. + * @author Andreas Kirschbaum + */ +public class XmlUtils { + + /** + * Private constructor to prevent instantiation. + */ + private XmlUtils() { + } + + /** + * Returns a child {@link Element} of a parent element. The child element + * must exist. + * @param parentElement the parent element + * @param childName the name of the child element + * @return the child element + */ + @NotNull + public static Element getChild(@NotNull final Element parentElement, @NotNull final String childName) { + final Element element = NodeListIterator.getFirstChild(parentElement, childName); + if (element == null) { + throw new IllegalArgumentException("child element '" + childName + "' does not exist"); + } + return element; + } + +} Property changes on: trunk/utils/src/app/net/sf/gridarta/utils/XmlUtils.java ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +LF \ No newline at end of property Modified: trunk/utils/utils.iml =================================================================== --- trunk/utils/utils.iml 2013-05-25 17:23:39 UTC (rev 9228) +++ trunk/utils/utils.iml 2013-05-28 17:56:59 UTC (rev 9229) @@ -10,6 +10,7 @@ <orderEntry type="library" name="annotations" level="project" /> <orderEntry type="library" name="japi-lib-swing-action" level="project" /> <orderEntry type="library" name="japi-lib-util" level="project" /> + <orderEntry type="library" name="japi-lib-xml" level="project" /> <orderEntry type="library" name="junit" level="project" /> <orderEntry type="library" name="log4j" level="project" /> </component> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2013-05-28 19:12:50
|
Revision: 9235 http://sourceforge.net/p/gridarta/code/9235 Author: akirschbaum Date: 2013-05-28 19:12:45 +0000 (Tue, 28 May 2013) Log Message: ----------- Rename and move source directories. Modified Paths: -------------- trunk/atrinik/atrinik.iml trunk/build.xml trunk/crossfire/crossfire.iml trunk/daimonin/daimonin.iml trunk/gridarta.iml trunk/model/model.iml trunk/plugin/plugin.iml trunk/preferences/preferences.iml trunk/textedit/textedit.iml trunk/utils/utils.iml Added Paths: ----------- trunk/atrinik/src/main/ trunk/atrinik/src/main/java/ trunk/atrinik/src/main/resources/ trunk/atrinik/src/test/java/ trunk/atrinik/src/test/java/net/ trunk/atrinik/src/test/resources/ trunk/crossfire/src/main/ trunk/crossfire/src/main/java/ trunk/crossfire/src/main/resources/ trunk/crossfire/src/test/java/ trunk/crossfire/src/test/java/net/ trunk/crossfire/src/test/resources/ trunk/daimonin/src/main/ trunk/daimonin/src/main/java/ trunk/daimonin/src/main/resources/ trunk/daimonin/src/test/java/ trunk/daimonin/src/test/java/net/ trunk/daimonin/src/test/resources/ trunk/model/src/main/ trunk/model/src/main/java/ trunk/model/src/main/resources/ trunk/model/src/test/java/ trunk/model/src/test/java/net/ trunk/model/src/test/resources/ trunk/plugin/src/main/ trunk/plugin/src/main/java/ trunk/plugin/src/main/resources/ trunk/plugin/src/test/java/ trunk/plugin/src/test/resources/ trunk/preferences/src/main/ trunk/preferences/src/main/java/ trunk/preferences/src/main/resources/ trunk/preferences/src/test/java/ trunk/preferences/src/test/resources/ trunk/src/main/ trunk/src/main/java/ trunk/src/main/resources/ trunk/src/test/java/ trunk/src/test/java/net/ trunk/src/test/resources/ trunk/textedit/src/main/ trunk/textedit/src/main/java/ trunk/textedit/src/main/resources/ trunk/textedit/src/test/java/ trunk/textedit/src/test/resources/ trunk/utils/src/main/ trunk/utils/src/main/java/ trunk/utils/src/main/resources/ trunk/utils/src/test/java/ trunk/utils/src/test/java/net/ trunk/utils/src/test/resources/ Removed Paths: ------------- trunk/atrinik/src/app/ trunk/atrinik/src/test/net/ trunk/crossfire/src/app/ trunk/crossfire/src/test/net/ trunk/daimonin/src/app/ trunk/daimonin/src/test/net/ trunk/model/src/app/ trunk/model/src/test/net/ trunk/plugin/src/app/ trunk/preferences/src/app/ trunk/src/app/ trunk/src/test/net/ trunk/textedit/src/app/ trunk/utils/src/app/ trunk/utils/src/test/net/ Modified: trunk/atrinik/atrinik.iml =================================================================== --- trunk/atrinik/atrinik.iml 2013-05-28 18:39:34 UTC (rev 9234) +++ trunk/atrinik/atrinik.iml 2013-05-28 19:12:45 UTC (rev 9235) @@ -4,8 +4,10 @@ <exclude-output /> <content url="file://$MODULE_DIR$"> <sourceFolder url="file://$MODULE_DIR$/resource" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/src/app" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" /> <excludeFolder url="file://$MODULE_DIR$/class" /> </content> <orderEntry type="inheritedJdk" /> Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2013-05-28 18:39:34 UTC (rev 9234) +++ trunk/build.xml 2013-05-28 19:12:45 UTC (rev 9235) @@ -327,7 +327,7 @@ <target name="compile-atrinik" description="Compiles the atrinik module." depends="compile-gridarta,compile-model,compile-preferences,compile-plugin,compile-utils"> <mkdir dir="${build.dir}/atrinik/app"/> - <javac srcdir="atrinik/src/app" destdir="${build.dir}/atrinik/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> + <javac srcdir="atrinik/src/main/java" destdir="${build.dir}/atrinik/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> <path refid="path.class.gridarta.app"/> <path refid="path.class.model.app"/> @@ -342,10 +342,10 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/atrinik/app"> - <fileset dir="atrinik/src/app" includes="**/*.properties"/> + <fileset dir="atrinik/src/main/java" includes="**/*.properties"/> </copy> <mkdir dir="${build.dir}/atrinik/test"/> - <javac srcdir="atrinik/src/test" destdir="${build.dir}/atrinik/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> + <javac srcdir="atrinik/src/test/java" destdir="${build.dir}/atrinik/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> <path refid="path.class.atrinik.app"/> <path refid="path.class.gridarta.test"/> @@ -358,13 +358,13 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/atrinik/test"> - <fileset dir="atrinik/src/test" includes="**/*.properties"/> + <fileset dir="atrinik/src/test/java" includes="**/*.properties"/> </copy> </target> <target name="compile-crossfire" description="Compiles the crossfire module." depends="compile-gridarta,compile-model,compile-preferences,compile-plugin,compile-utils"> <mkdir dir="${build.dir}/crossfire/app"/> - <javac srcdir="crossfire/src/app" destdir="${build.dir}/crossfire/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> + <javac srcdir="crossfire/src/main/java" destdir="${build.dir}/crossfire/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> <path refid="path.class.gridarta.app"/> <path refid="path.class.model.app"/> @@ -379,10 +379,10 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/crossfire/app"> - <fileset dir="crossfire/src/app" includes="**/*.properties"/> + <fileset dir="crossfire/src/main/java" includes="**/*.properties"/> </copy> <mkdir dir="${build.dir}/crossfire/test"/> - <javac srcdir="crossfire/src/test" destdir="${build.dir}/crossfire/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> + <javac srcdir="crossfire/src/test/java" destdir="${build.dir}/crossfire/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> <path refid="path.class.crossfire.app"/> <path refid="path.class.gridarta.test"/> @@ -395,13 +395,13 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/crossfire/test"> - <fileset dir="crossfire/src/test" includes="**/*.properties"/> + <fileset dir="crossfire/src/test/java" includes="**/*.properties"/> </copy> </target> <target name="compile-daimonin" description="Compiles the daimonin module." depends="compile-gridarta,compile-model,compile-plugin,compile-utils"> <mkdir dir="${build.dir}/daimonin/app"/> - <javac srcdir="daimonin/src/app" destdir="${build.dir}/daimonin/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> + <javac srcdir="daimonin/src/main/java" destdir="${build.dir}/daimonin/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> <path refid="path.class.gridarta.app"/> <path refid="path.class.model.app"/> @@ -416,10 +416,10 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/daimonin/test"> - <fileset dir="daimonin/src/test" includes="**/*.properties"/> + <fileset dir="daimonin/src/test/java" includes="**/*.properties"/> </copy> <mkdir dir="${build.dir}/daimonin/test"/> - <javac srcdir="daimonin/src/test" destdir="${build.dir}/daimonin/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> + <javac srcdir="daimonin/src/test/java" destdir="${build.dir}/daimonin/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> <path refid="path.class.daimonin.app"/> <path refid="path.class.gridarta.test"/> @@ -430,13 +430,13 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/daimonin/app"> - <fileset dir="daimonin/src/app" includes="**/*.properties"/> + <fileset dir="daimonin/src/main/java" includes="**/*.properties"/> </copy> </target> <target name="compile-gridarta" description="Compiles the gridarta module." depends="compile-model,compile-preferences,compile-plugin,compile-textedit,compile-utils"> <mkdir dir="${build.dir}/gridarta/app"/> - <javac srcdir="src/app" destdir="${build.dir}/gridarta/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> + <javac srcdir="src/main/java" destdir="${build.dir}/gridarta/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> <path refid="path.class.model.app"/> <path refid="path.class.preferences.app"/> @@ -460,10 +460,10 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/gridarta/test"> - <fileset dir="src/test" includes="**/*.properties,cfpython_menu.def"/> + <fileset dir="src/test/java" includes="**/*.properties,cfpython_menu.def"/> </copy> <mkdir dir="${build.dir}/gridarta/test"/> - <javac srcdir="src/test" destdir="${build.dir}/gridarta/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> + <javac srcdir="src/test/java" destdir="${build.dir}/gridarta/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> <path refid="path.class.gridarta.app"/> <path refid="path.class.model.test"/> @@ -477,13 +477,13 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/gridarta/app"> - <fileset dir="src/app" includes="**/*.properties,cfpython_menu.def"/> + <fileset dir="src/main/java" includes="**/*.properties,cfpython_menu.def"/> </copy> </target> <target name="compile-model" description="Compiles the model module." depends="compile-utils"> <mkdir dir="${build.dir}/model/app"/> - <javac srcdir="model/src/app" destdir="${build.dir}/model/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> + <javac srcdir="model/src/main/java" destdir="${build.dir}/model/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> <path refid="path.class.utils.app"/> <path refid="path.lib.annotations"/> @@ -497,10 +497,10 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/model/test"> - <fileset dir="model/src/test" includes="**/*.properties"/> + <fileset dir="model/src/test/java" includes="**/*.properties"/> </copy> <mkdir dir="${build.dir}/model/test"/> - <javac srcdir="model/src/test" destdir="${build.dir}/model/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> + <javac srcdir="model/src/test/java" destdir="${build.dir}/model/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> <path refid="path.class.model.app"/> <path refid="path.class.utils.test"/> @@ -514,13 +514,13 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/model/app"> - <fileset dir="model/src/app" includes="**/*.properties"/> + <fileset dir="model/src/main/java" includes="**/*.properties"/> </copy> </target> <target name="compile-preferences" description="Compiles the preferences module."> <mkdir dir="${build.dir}/preferences/app"/> - <javac srcdir="preferences/src/app" destdir="${build.dir}/preferences/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> + <javac srcdir="preferences/src/main/java" destdir="${build.dir}/preferences/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> <path refid="path.lib.annotations"/> <path refid="path.lib.japi-swing-action"/> @@ -529,23 +529,23 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/preferences/test"> - <fileset dir="preferences/src/test" includes="**/*.properties"/> + <fileset dir="preferences/src/test/java" includes="**/*.properties"/> </copy> <mkdir dir="${build.dir}/preferences/test"/> - <javac srcdir="preferences/src/test" destdir="${build.dir}/preferences/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> + <javac srcdir="preferences/src/test/java" destdir="${build.dir}/preferences/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> <path refid="path.class.preferences.app"/> </classpath> <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/preferences/app"> - <fileset dir="preferences/src/app" includes="**/*.properties"/> + <fileset dir="preferences/src/main/java" includes="**/*.properties"/> </copy> </target> <target name="compile-plugin" description="Compiles the plugin module." depends="compile-model,compile-utils"> <mkdir dir="${build.dir}/plugin/app"/> - <javac srcdir="plugin/src/app" destdir="${build.dir}/plugin/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> + <javac srcdir="plugin/src/main/java" destdir="${build.dir}/plugin/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> <path refid="path.class.model.app"/> <path refid="path.class.utils.app"/> @@ -558,23 +558,23 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/plugin/test"> - <fileset dir="plugin/src/test" includes="**/*.properties"/> + <fileset dir="plugin/src/test/java" includes="**/*.properties"/> </copy> <mkdir dir="${build.dir}/plugin/test"/> - <javac srcdir="plugin/src/test" destdir="${build.dir}/plugin/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> + <javac srcdir="plugin/src/test/java" destdir="${build.dir}/plugin/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> <path refid="path.class.plugin.app"/> </classpath> <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/plugin/app"> - <fileset dir="plugin/src/app" includes="**/*.properties"/> + <fileset dir="plugin/src/main/java" includes="**/*.properties"/> </copy> </target> <target name="compile-textedit" description="Compiles the textedit module." depends="compile-utils"> <mkdir dir="${build.dir}/textedit/app"/> - <javac srcdir="textedit/src/app" destdir="${build.dir}/textedit/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> + <javac srcdir="textedit/src/main/java" destdir="${build.dir}/textedit/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> <path refid="path.class.utils.app"/> <path refid="path.lib.annotations"/> @@ -584,10 +584,10 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/textedit/test"> - <fileset dir="textedit/src/test" includes="**/*.properties"/> + <fileset dir="textedit/src/test/java" includes="**/*.properties"/> </copy> <mkdir dir="${build.dir}/textedit/test"/> - <javac srcdir="textedit/src/test" destdir="${build.dir}/textedit/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> + <javac srcdir="textedit/src/test/java" destdir="${build.dir}/textedit/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> <path refid="path.class.textedit.app"/> <path refid="path.class.utils.test"/> @@ -595,13 +595,13 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/textedit/app"> - <fileset dir="textedit/src/app" includes="**/*.properties"/> + <fileset dir="textedit/src/main/java" includes="**/*.properties"/> </copy> </target> <target name="compile-utils" description="Compiles the utils module."> <mkdir dir="${build.dir}/utils/app"/> - <javac srcdir="utils/src/app" destdir="${build.dir}/utils/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> + <javac srcdir="utils/src/main/java" destdir="${build.dir}/utils/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> <path refid="path.lib.annotations"/> <path refid="path.lib.japi-swing-action"/> @@ -612,10 +612,10 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/utils/test"> - <fileset dir="utils/src/test" includes="**/*.properties"/> + <fileset dir="utils/src/test/java" includes="**/*.properties"/> </copy> <mkdir dir="${build.dir}/utils/test"/> - <javac srcdir="utils/src/test" destdir="${build.dir}/utils/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> + <javac srcdir="utils/src/test/java" destdir="${build.dir}/utils/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> <path refid="path.class.utils.app"/> <path refid="path.lib.annotations"/> @@ -627,7 +627,7 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/utils/app"> - <fileset dir="utils/src/app" includes="**/*.properties"/> + <fileset dir="utils/src/main/java" includes="**/*.properties"/> </copy> </target> @@ -674,7 +674,7 @@ <mkdir dir="${build.dir}/doc/api/${project.version}"/> <copy todir="${build.dir}/doc/api/${project.version}" file="src/doc/copyright.xhtml"/> <copy todir="${build.dir}/doc/api/${project.version}" file="src/doc/dev/api/.htaccess"/> - <javadoc destdir="${build.dir}/doc/api/${project.version}" access="protected" author="yes" version="yes" locale="en_US" use="yes" splitindex="yes" windowtitle="Gridarta API documentation" doctitle="Gridarta<br />Yet another Java API<br />API Documentation" header="Gridarta ${project.version}<br />Yet another Java API<br />API Documentation" footer="Gridarta<br />Yet another Java API<br />API Documentation" bottom="<div style="text-align:center;">© 2005-2006 The Gridarta Developers. All rights reserved. See <a href="{@docRoot}/copyright.xhtml">copyright</a></div>" serialwarn="yes" charset="${build.source.encoding}" docencoding="${build.source.encoding}" source="${build.source.version}" encoding="${build.source.encoding}" linksource="yes" overview="src/app/overview.html" link="${user.javadoc.link}"> + <javadoc destdir="${build.dir}/doc/api/${project.version}" access="protected" author="yes" version="yes" locale="en_US" use="yes" splitindex="yes" windowtitle="Gridarta API documentation" doctitle="Gridarta<br />Yet another Java API<br />API Documentation" header="Gridarta ${project.version}<br />Yet another Java API<br />API Documentation" footer="Gridarta<br />Yet another Java API<br />API Documentation" bottom="<div style="text-align:center;">© 2005-2006 The Gridarta Developers. All rights reserved. See <a href="{@docRoot}/copyright.xhtml">copyright</a></div>" serialwarn="yes" charset="${build.source.encoding}" docencoding="${build.source.encoding}" source="${build.source.version}" encoding="${build.source.encoding}" linksource="yes" overview="src/main/java/overview.html" link="${user.javadoc.link}"> <classpath> <fileset dir="atrinik/lib" includes="*.jar" excludes="*.jar-LICENSE"/> <fileset dir="daimonin/lib" includes="*.jar" excludes="*.jar-LICENSE"/> @@ -693,24 +693,24 @@ <path refid="path.class.textedit.test"/> <path refid="path.class.utils.test"/> </sourcepath> - <packageset dir="src/app" defaultexcludes="yes"/> - <packageset dir="src/test" defaultexcludes="yes"/> - <packageset dir="atrinik/src/app" defaultexcludes="yes"/> - <packageset dir="atrinik/src/test" defaultexcludes="yes"/> - <packageset dir="crossfire/src/app" defaultexcludes="yes"/> - <packageset dir="crossfire/src/test" defaultexcludes="yes"/> - <packageset dir="daimonin/src/app" defaultexcludes="yes"/> - <packageset dir="daimonin/src/test" defaultexcludes="yes"/> - <packageset dir="model/src/app" defaultexcludes="yes"/> - <packageset dir="model/src/test" defaultexcludes="yes"/> - <packageset dir="preferences/src/app" defaultexcludes="yes"/> - <packageset dir="preferences/src/test" defaultexcludes="yes"/> - <packageset dir="plugin/src/app" defaultexcludes="yes"/> - <packageset dir="plugin/src/test" defaultexcludes="yes"/> - <packageset dir="textedit/src/app" defaultexcludes="yes"/> - <packageset dir="textedit/src/test" defaultexcludes="yes"/> - <packageset dir="utils/src/app" defaultexcludes="yes"/> - <packageset dir="utils/src/test" defaultexcludes="yes"/> + <packageset dir="src/main/java" defaultexcludes="yes"/> + <packageset dir="src/test/java" defaultexcludes="yes"/> + <packageset dir="atrinik/src/main/java" defaultexcludes="yes"/> + <packageset dir="atrinik/src/test/java" defaultexcludes="yes"/> + <packageset dir="crossfire/src/main/java" defaultexcludes="yes"/> + <packageset dir="crossfire/src/test/java" defaultexcludes="yes"/> + <packageset dir="daimonin/src/main/java" defaultexcludes="yes"/> + <packageset dir="daimonin/src/test/java" defaultexcludes="yes"/> + <packageset dir="model/src/main/java" defaultexcludes="yes"/> + <packageset dir="model/src/test/java" defaultexcludes="yes"/> + <packageset dir="preferences/src/main/java" defaultexcludes="yes"/> + <packageset dir="preferences/src/test/java" defaultexcludes="yes"/> + <packageset dir="plugin/src/main/java" defaultexcludes="yes"/> + <packageset dir="plugin/src/test/java" defaultexcludes="yes"/> + <packageset dir="textedit/src/main/java" defaultexcludes="yes"/> + <packageset dir="textedit/src/test/java" defaultexcludes="yes"/> + <packageset dir="utils/src/main/java" defaultexcludes="yes"/> + <packageset dir="utils/src/test/java" defaultexcludes="yes"/> <tag name="todo" description="Todo:"/> <tag name="used" description="Manually marked as used." enabled="false"/> <tag name="fixme" description="Fixme:"/> @@ -880,24 +880,24 @@ <checkstyle config="src/checkstyle.xml" failOnViolation="true"> <formatter type="plain" tofile="${build.dir}/doc/checkstyle_report.txt"/> <formatter type="plain"/> - <fileset dir="src/app" includes="**/*.java"/> - <fileset dir="src/test" includes="**/*.java"/> - <fileset dir="atrinik/src/app" includes="**/*.java"/> - <fileset dir="atrinik/src/test" includes="**/*.java"/> - <fileset dir="crossfire/src/app" includes="**/*.java"/> - <fileset dir="crossfire/src/test" includes="**/*.java"/> - <fileset dir="daimonin/src/app" includes="**/*.java"/> - <fileset dir="daimonin/src/test" includes="**/*.java"/> - <fileset dir="model/src/app" includes="**/*.java"/> - <fileset dir="model/src/test" includes="**/*.java"/> - <fileset dir="preferences/src/app" includes="**/*.java"/> - <fileset dir="preferences/src/test" includes="**/*.java"/> - <fileset dir="plugin/src/app" includes="**/*.java"/> - <fileset dir="plugin/src/test" includes="**/*.java"/> - <fileset dir="textedit/src/app" includes="**/*.java"/> - <fileset dir="textedit/src/test" includes="**/*.java"/> - <fileset dir="utils/src/app" includes="**/*.java"/> - <fileset dir="utils/src/test" includes="**/*.java"/> + <fileset dir="src/main/java" includes="**/*.java"/> + <fileset dir="src/test/java" includes="**/*.java"/> + <fileset dir="atrinik/src/main/java" includes="**/*.java"/> + <fileset dir="atrinik/src/test/java" includes="**/*.java"/> + <fileset dir="crossfire/src/main/java" includes="**/*.java"/> + <fileset dir="crossfire/src/test/java" includes="**/*.java"/> + <fileset dir="daimonin/src/main/java" includes="**/*.java"/> + <fileset dir="daimonin/src/test/java" includes="**/*.java"/> + <fileset dir="model/src/main/java" includes="**/*.java"/> + <fileset dir="model/src/test/java" includes="**/*.java"/> + <fileset dir="preferences/src/main/java" includes="**/*.java"/> + <fileset dir="preferences/src/test/java" includes="**/*.java"/> + <fileset dir="plugin/src/main/java" includes="**/*.java"/> + <fileset dir="plugin/src/test/java" includes="**/*.java"/> + <fileset dir="textedit/src/main/java" includes="**/*.java"/> + <fileset dir="textedit/src/test/java" includes="**/*.java"/> + <fileset dir="utils/src/main/java" includes="**/*.java"/> + <fileset dir="utils/src/test/java" includes="**/*.java"/> </checkstyle> </target> @@ -917,7 +917,7 @@ <target name="javadoc" depends="init-properties" description="Creates the JavaDoc documentation for the complete editor source."> <mkdir dir="${build.dir}/doc/dev/api"/> - <javadoc destdir="${build.dir}/doc/dev/api" locale="en_US" version="yes" author="yes" use="yes" splitindex="yes" windowtitle="Gridarta — API Documentation" doctitle="Gridarta ${build.number}<br />API Documentation" header="Gridarta ${build.number}<br />API Documentation" footer="Gridarta ${build.number}<br />API Documentation" serialwarn="no" charset="utf-8" docencoding="utf-8" source="${build.source.version}" encoding="${build.source.encoding}" linksource="yes" private="yes" overview="src/app/overview.html" link="${user.javadoc.link}"> + <javadoc destdir="${build.dir}/doc/dev/api" locale="en_US" version="yes" author="yes" use="yes" splitindex="yes" windowtitle="Gridarta — API Documentation" doctitle="Gridarta ${build.number}<br />API Documentation" header="Gridarta ${build.number}<br />API Documentation" footer="Gridarta ${build.number}<br />API Documentation" serialwarn="no" charset="utf-8" docencoding="utf-8" source="${build.source.version}" encoding="${build.source.encoding}" linksource="yes" private="yes" overview="src/main/java/overview.html" link="${user.javadoc.link}"> <classpath> <fileset dir="atrinik/lib" includes="*.jar" excludes="*.jar-LICENSE"/> <fileset dir="daimonin/lib" includes="*.jar" excludes="*.jar-LICENSE"/> @@ -936,24 +936,24 @@ <path refid="path.class.textedit.test"/> <path refid="path.class.utils.test"/> </sourcepath> - <packageset dir="src/app" defaultexcludes="yes"/> - <packageset dir="src/test" defaultexcludes="yes"/> - <packageset dir="atrinik/src/app" defaultexcludes="yes"/> - <packageset dir="atrinik/src/test" defaultexcludes="yes"/> - <packageset dir="crossfire/src/app" defaultexcludes="yes"/> - <packageset dir="crossfire/src/test" defaultexcludes="yes"/> - <packageset dir="daimonin/src/app" defaultexcludes="yes"/> - <packageset dir="daimonin/src/test" defaultexcludes="yes"/> - <packageset dir="model/src/app" defaultexcludes="yes"/> - <packageset dir="model/src/test" defaultexcludes="yes"/> - <packageset dir="preferences/src/app" defaultexcludes="yes"/> - <packageset dir="preferences/src/test" defaultexcludes="yes"/> - <packageset dir="plugin/src/app" defaultexcludes="yes"/> - <packageset dir="plugin/src/test" defaultexcludes="yes"/> - <packageset dir="textedit/src/app" defaultexcludes="yes"/> - <packageset dir="textedit/src/test" defaultexcludes="yes"/> - <packageset dir="utils/src/app" defaultexcludes="yes"/> - <packageset dir="utils/src/test" defaultexcludes="yes"/> + <packageset dir="src/main/java" defaultexcludes="yes"/> + <packageset dir="src/test/java" defaultexcludes="yes"/> + <packageset dir="atrinik/src/main/java" defaultexcludes="yes"/> + <packageset dir="atrinik/src/test/java" defaultexcludes="yes"/> + <packageset dir="crossfire/src/main/java" defaultexcludes="yes"/> + <packageset dir="crossfire/src/test/java" defaultexcludes="yes"/> + <packageset dir="daimonin/src/main/java" defaultexcludes="yes"/> + <packageset dir="daimonin/src/test/java" defaultexcludes="yes"/> + <packageset dir="model/src/main/java" defaultexcludes="yes"/> + <packageset dir="model/src/test/java" defaultexcludes="yes"/> + <packageset dir="preferences/src/main/java" defaultexcludes="yes"/> + <packageset dir="preferences/src/test/java" defaultexcludes="yes"/> + <packageset dir="plugin/src/main/java" defaultexcludes="yes"/> + <packageset dir="plugin/src/test/java" defaultexcludes="yes"/> + <packageset dir="textedit/src/main/java" defaultexcludes="yes"/> + <packageset dir="textedit/src/test/java" defaultexcludes="yes"/> + <packageset dir="utils/src/main/java" defaultexcludes="yes"/> + <packageset dir="utils/src/test/java" defaultexcludes="yes"/> <bottom> <![CDATA[<address> <a href="http://sourceforge.net/"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=166996&type=1" alt="SourceForge.net Logo" width="88" height="31" class="now" /></a> Modified: trunk/crossfire/crossfire.iml =================================================================== --- trunk/crossfire/crossfire.iml 2013-05-28 18:39:34 UTC (rev 9234) +++ trunk/crossfire/crossfire.iml 2013-05-28 19:12:45 UTC (rev 9235) @@ -3,9 +3,11 @@ <component name="NewModuleRootManager" inherit-compiler-output="true"> <exclude-output /> <content url="file://$MODULE_DIR$"> - <sourceFolder url="file://$MODULE_DIR$/src/app" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/resource" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" /> <excludeFolder url="file://$MODULE_DIR$/class" /> <excludeFolder url="file://$MODULE_DIR$/classes" /> </content> Modified: trunk/daimonin/daimonin.iml =================================================================== --- trunk/daimonin/daimonin.iml 2013-05-28 18:39:34 UTC (rev 9234) +++ trunk/daimonin/daimonin.iml 2013-05-28 19:12:45 UTC (rev 9235) @@ -4,8 +4,10 @@ <exclude-output /> <content url="file://$MODULE_DIR$"> <sourceFolder url="file://$MODULE_DIR$/resource" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/src/app" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" /> <excludeFolder url="file://$MODULE_DIR$/class" /> </content> <orderEntry type="inheritedJdk" /> Modified: trunk/gridarta.iml =================================================================== --- trunk/gridarta.iml 2013-05-28 18:39:34 UTC (rev 9234) +++ trunk/gridarta.iml 2013-05-28 19:12:45 UTC (rev 9235) @@ -3,8 +3,10 @@ <component name="NewModuleRootManager" inherit-compiler-output="true"> <content url="file://$MODULE_DIR$"> <sourceFolder url="file://$MODULE_DIR$/resource" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/src/app" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" /> <excludeFolder url="file://$MODULE_DIR$/atrinik" /> <excludeFolder url="file://$MODULE_DIR$/classes" /> <excludeFolder url="file://$MODULE_DIR$/crossfire" /> Modified: trunk/model/model.iml =================================================================== --- trunk/model/model.iml 2013-05-28 18:39:34 UTC (rev 9234) +++ trunk/model/model.iml 2013-05-28 19:12:45 UTC (rev 9235) @@ -3,8 +3,10 @@ <component name="NewModuleRootManager" inherit-compiler-output="true"> <exclude-output /> <content url="file://$MODULE_DIR$"> - <sourceFolder url="file://$MODULE_DIR$/src/app" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" /> </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> Modified: trunk/plugin/plugin.iml =================================================================== --- trunk/plugin/plugin.iml 2013-05-28 18:39:34 UTC (rev 9234) +++ trunk/plugin/plugin.iml 2013-05-28 19:12:45 UTC (rev 9235) @@ -3,8 +3,10 @@ <component name="NewModuleRootManager" inherit-compiler-output="true"> <exclude-output /> <content url="file://$MODULE_DIR$"> - <sourceFolder url="file://$MODULE_DIR$/src/app" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" /> </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> Modified: trunk/preferences/preferences.iml =================================================================== --- trunk/preferences/preferences.iml 2013-05-28 18:39:34 UTC (rev 9234) +++ trunk/preferences/preferences.iml 2013-05-28 19:12:45 UTC (rev 9235) @@ -2,8 +2,10 @@ <module relativePaths="true" type="JAVA_MODULE" version="4"> <component name="NewModuleRootManager" inherit-compiler-output="true"> <content url="file://$MODULE_DIR$"> - <sourceFolder url="file://$MODULE_DIR$/src/app" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" /> </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> Modified: trunk/textedit/textedit.iml =================================================================== --- trunk/textedit/textedit.iml 2013-05-28 18:39:34 UTC (rev 9234) +++ trunk/textedit/textedit.iml 2013-05-28 19:12:45 UTC (rev 9235) @@ -2,8 +2,10 @@ <module relativePaths="true" type="JAVA_MODULE" version="4"> <component name="NewModuleRootManager" inherit-compiler-output="true"> <content url="file://$MODULE_DIR$"> - <sourceFolder url="file://$MODULE_DIR$/src/app" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" /> </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> Modified: trunk/utils/utils.iml =================================================================== --- trunk/utils/utils.iml 2013-05-28 18:39:34 UTC (rev 9234) +++ trunk/utils/utils.iml 2013-05-28 19:12:45 UTC (rev 9235) @@ -2,8 +2,10 @@ <module relativePaths="true" type="JAVA_MODULE" version="4"> <component name="NewModuleRootManager" inherit-compiler-output="true"> <content url="file://$MODULE_DIR$"> - <sourceFolder url="file://$MODULE_DIR$/src/app" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" /> </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2013-05-28 19:39:50
|
Revision: 9236 http://sourceforge.net/p/gridarta/code/9236 Author: akirschbaum Date: 2013-05-28 19:39:43 +0000 (Tue, 28 May 2013) Log Message: ----------- Move resource files into resources directories. Modified Paths: -------------- trunk/build.xml Added Paths: ----------- trunk/atrinik/src/main/resources/net/ trunk/atrinik/src/main/resources/net/sf/ trunk/atrinik/src/main/resources/net/sf/gridarta/ trunk/atrinik/src/main/resources/net/sf/gridarta/var/ trunk/atrinik/src/main/resources/net/sf/gridarta/var/atrinik/ trunk/atrinik/src/main/resources/net/sf/gridarta/var/atrinik/AtrinikEditor.properties trunk/atrinik/src/main/resources/net/sf/gridarta/var/atrinik/action.properties trunk/atrinik/src/main/resources/net/sf/gridarta/var/atrinik/messages.properties trunk/atrinik/src/main/resources/net/sf/gridarta/var/atrinik/messages_de.properties trunk/atrinik/src/main/resources/net/sf/gridarta/var/atrinik/messages_fr.properties trunk/atrinik/src/main/resources/net/sf/gridarta/var/atrinik/messages_sv.properties trunk/atrinik/src/main/resources/net/sf/gridarta/var/atrinik/tod.properties trunk/atrinik/src/main/resources/net/sf/gridarta/var/atrinik/tod_de.properties trunk/crossfire/src/main/resources/net/ trunk/crossfire/src/main/resources/net/sf/ trunk/crossfire/src/main/resources/net/sf/gridarta/ trunk/crossfire/src/main/resources/net/sf/gridarta/var/ trunk/crossfire/src/main/resources/net/sf/gridarta/var/crossfire/ trunk/crossfire/src/main/resources/net/sf/gridarta/var/crossfire/action.properties trunk/crossfire/src/main/resources/net/sf/gridarta/var/crossfire/messages.properties trunk/crossfire/src/main/resources/net/sf/gridarta/var/crossfire/messages_de.properties trunk/crossfire/src/main/resources/net/sf/gridarta/var/crossfire/messages_fr.properties trunk/crossfire/src/main/resources/net/sf/gridarta/var/crossfire/messages_sv.properties trunk/crossfire/src/main/resources/net/sf/gridarta/var/crossfire/tod.properties trunk/crossfire/src/main/resources/net/sf/gridarta/var/crossfire/tod_de.properties trunk/daimonin/src/main/resources/net/ trunk/daimonin/src/main/resources/net/sf/ trunk/daimonin/src/main/resources/net/sf/gridarta/ trunk/daimonin/src/main/resources/net/sf/gridarta/var/ trunk/daimonin/src/main/resources/net/sf/gridarta/var/daimonin/ trunk/daimonin/src/main/resources/net/sf/gridarta/var/daimonin/DaimoninEditor.properties trunk/daimonin/src/main/resources/net/sf/gridarta/var/daimonin/action.properties trunk/daimonin/src/main/resources/net/sf/gridarta/var/daimonin/messages.properties trunk/daimonin/src/main/resources/net/sf/gridarta/var/daimonin/messages_de.properties trunk/daimonin/src/main/resources/net/sf/gridarta/var/daimonin/messages_fr.properties trunk/daimonin/src/main/resources/net/sf/gridarta/var/daimonin/messages_sv.properties trunk/daimonin/src/main/resources/net/sf/gridarta/var/daimonin/tod.properties trunk/daimonin/src/main/resources/net/sf/gridarta/var/daimonin/tod_de.properties trunk/src/main/resources/cfpython_menu.def trunk/src/main/resources/net/ trunk/src/main/resources/net/sf/ trunk/src/main/resources/net/sf/gridarta/ trunk/src/main/resources/net/sf/gridarta/action.properties trunk/src/main/resources/net/sf/gridarta/gui/ trunk/src/main/resources/net/sf/gridarta/gui/panel/ trunk/src/main/resources/net/sf/gridarta/gui/panel/tools/ trunk/src/main/resources/net/sf/gridarta/gui/panel/tools/action.properties trunk/src/main/resources/net/sf/gridarta/gui/panel/tools/action_de.properties trunk/src/main/resources/net/sf/gridarta/gui/panel/tools/action_fr.properties trunk/src/main/resources/net/sf/gridarta/gui/panel/tools/action_sv.properties trunk/src/main/resources/net/sf/gridarta/messages.properties trunk/src/main/resources/net/sf/gridarta/messages_de.properties trunk/src/main/resources/net/sf/gridarta/messages_fr.properties trunk/src/main/resources/net/sf/gridarta/messages_sv.properties trunk/src/test/resources/net/ trunk/src/test/resources/net/sf/ trunk/src/test/resources/net/sf/gridarta/ trunk/src/test/resources/net/sf/gridarta/gui/ trunk/src/test/resources/net/sf/gridarta/gui/mapmenu/ trunk/src/test/resources/net/sf/gridarta/gui/mapmenu/testLoad1.properties Removed Paths: ------------- trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/AtrinikEditor.properties trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/action.properties trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/messages.properties trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/messages_de.properties trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/messages_fr.properties trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/messages_sv.properties trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/tod.properties trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/tod_de.properties trunk/crossfire/src/main/java/net/sf/gridarta/var/crossfire/action.properties trunk/crossfire/src/main/java/net/sf/gridarta/var/crossfire/messages.properties trunk/crossfire/src/main/java/net/sf/gridarta/var/crossfire/messages_de.properties trunk/crossfire/src/main/java/net/sf/gridarta/var/crossfire/messages_fr.properties trunk/crossfire/src/main/java/net/sf/gridarta/var/crossfire/messages_sv.properties trunk/crossfire/src/main/java/net/sf/gridarta/var/crossfire/tod.properties trunk/crossfire/src/main/java/net/sf/gridarta/var/crossfire/tod_de.properties trunk/daimonin/src/main/java/net/sf/gridarta/var/daimonin/DaimoninEditor.properties trunk/daimonin/src/main/java/net/sf/gridarta/var/daimonin/action.properties trunk/daimonin/src/main/java/net/sf/gridarta/var/daimonin/messages.properties trunk/daimonin/src/main/java/net/sf/gridarta/var/daimonin/messages_de.properties trunk/daimonin/src/main/java/net/sf/gridarta/var/daimonin/messages_fr.properties trunk/daimonin/src/main/java/net/sf/gridarta/var/daimonin/messages_sv.properties trunk/daimonin/src/main/java/net/sf/gridarta/var/daimonin/tod.properties trunk/daimonin/src/main/java/net/sf/gridarta/var/daimonin/tod_de.properties trunk/src/main/java/cfpython_menu.def trunk/src/main/java/net/sf/gridarta/action.properties trunk/src/main/java/net/sf/gridarta/gui/panel/tools/action.properties trunk/src/main/java/net/sf/gridarta/gui/panel/tools/action_de.properties trunk/src/main/java/net/sf/gridarta/gui/panel/tools/action_fr.properties trunk/src/main/java/net/sf/gridarta/gui/panel/tools/action_sv.properties trunk/src/main/java/net/sf/gridarta/messages.properties trunk/src/main/java/net/sf/gridarta/messages_de.properties trunk/src/main/java/net/sf/gridarta/messages_fr.properties trunk/src/main/java/net/sf/gridarta/messages_sv.properties trunk/src/test/java/net/sf/gridarta/gui/mapmenu/testLoad1.properties Deleted: trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/AtrinikEditor.properties =================================================================== --- trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/AtrinikEditor.properties 2013-05-28 19:12:45 UTC (rev 9235) +++ trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/AtrinikEditor.properties 2013-05-28 19:39:43 UTC (rev 9236) @@ -1,23 +0,0 @@ -# -# Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. -# Copyright (C) 2000-2010 The Gridarta Developers. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# - -setNormal=Sets the operation mode to normal.\nIn normal mode, the editor starts with GUI.\nCommand line arguments are maps to load immediately. -setCollectArches=Collect arches from the command line. -setBatchPNG=Reads all specified maps and creates PNG images for them. -setSinglePNG=Take the first argument as map file and the second argument as PNG name to write the map to. Deleted: trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/action.properties =================================================================== --- trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/action.properties 2013-05-28 19:12:45 UTC (rev 9235) +++ trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/action.properties 2013-05-28 19:39:43 UTC (rev 9236) @@ -1,71 +0,0 @@ -# -# Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. -# Copyright (C) 2000-2010 The Gridarta Developers. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# - -# Warning: This file MUST be ISO-8859-1 -# See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding - -ActionBuilder.additionalBundles=net.sf.gridarta.var.atrinik.messages - -######## -# Menus -main.menubar=file edit map archetypes pickmaps resources tools analyze view bookmarks plugins window help -file.menu=newMap openFile goMap recent closeMap - saveMap saveMapAs saveAllMaps - closeAllMaps reloadMap createImage - options shortcuts - exit -edit.menu=undo redo - clear cut copy paste pasteTiled - shift - find findNext findPrev replace fillAuto fillAbove fillBelow randFillAuto randFillAbove randFillBelow floodFill - selectAll invertSelection expandEmptySelection growSelection shrinkSelection -map.menu=autoJoin - enterExit nextExit prevExit enterNorthMap enterEastMap enterSouthMap enterWestMap enterNorthEastMap enterSouthEastMap enterSouthWestMap enterNorthWestMap - mapCreateView mapProperties shrinkMapSize deleteUnknownObjects - gameObjectTextEditor -archetypes.menu=displayGameObjectNames displayArchetypeNames displayIconsOnly - findArchetypes -#pickmaps.menu: See gridarta -resources.menu=collectArches collectSpells - reloadFaces - viewTreasurelists -tools.menu=newScript editScript - controlServer controlClient - validateMap cleanCompletelyBlockedSquares - zoom gc -analyze.menu= -view.menu=resetView - gridVisible lightVisible doubleFaces - prevWindow nextWindow -plugins.menu=- editPlugins - savePlugins importPlugin -window.menu=closeAllMaps -help.menu=showHelp tipOfTheDay about update - -mapwindow.menubar=mapwindowFile mapwindowEdit mapwindowMap mapwindowCursor - -mapwindowFile.menu=saveMap saveMapAs createImage - reloadMap - closeMap -mapwindowEdit.menu=undo redo - clear cut copy paste pasteTiled - shift - find findNext findPrev replace fillAuto fillAbove fillBelow randFillAuto randFillAbove randFillBelow floodFill - selectAll invertSelection expandEmptySelection growSelection shrinkSelection -mapwindowMap.menu=gridVisible lightVisible - goExit enterExit nextExit prevExit enterNorthMap enterEastMap enterSouthMap enterWestMap enterNorthEastMap enterSouthEastMap enterSouthWestMap enterNorthWestMap - mapCreateView mapProperties shrinkMapSize deleteUnknownObjects openInClient -mapwindowCursor.menu=moveCursor - exitConnector - selectSquare startStopDrag addToSelection subFromSelection releaseDrag - insertArch deleteArch - selectArchAbove selectArchBelow - archAttributes - -########## -# ToolBars -main.toolbar=newMap openFile saveMap saveMapAs - prevWindow nextWindow - undo redo - - -moveCursor.menu=moveCursorNorth moveCursorEast moveCursorSouth moveCursorWest moveCursorNorthEast moveCursorSouthEast moveCursorSouthWest moveCursorNorthWest - goLocation - -exitConnector.menu=exitCopy exitPaste exitConnect - -#control.toolbar=controlStart controlStop - -nextWindow.icon=navigation/Forward16 - -prevWindow.icon=navigation/Back16 - - -license.1.file=License -license.2.file=japi.jar-LICENSE -license.3.file=jlfgr-1_0.jar-LICENSE -license.4.file=log4j-1.2.13.jar-LICENSE - -about.logo=icons/atrinikLogoSmall.png - -update.url=http://www.atrinik.org/editor/update.properties Deleted: trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/messages.properties =================================================================== --- trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/messages.properties 2013-05-28 19:12:45 UTC (rev 9235) +++ trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/messages.properties 2013-05-28 19:39:43 UTC (rev 9236) @@ -1,179 +0,0 @@ -# -# Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. -# Copyright (C) 2000-2010 The Gridarta Developers. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# - -# Warning: This file MUST be ISO-8859-1 -# See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding - -application.name=Gridarta for Atrinik -mainWindow.title=Gridarta for Atrinik {0} - -configSources=net.sf.gridarta.var.atrinik.model.settings.FilesConfigSource net.sf.gridarta.var.atrinik.model.settings.CollectedConfigSource - -# configSource.<config source name>.<file type>.<sequence> values support the -# following variables: -# ${COLLECTED} collected directory (compile-time constant) -# ${MAPS} maps directory (set in settings dialog) -# ${ARCH} archetype directory (set in settings dialog) -# -# file types: -# - treasures treasure lists -# -# config source name: -# - COLLECTED collected archetypes (set in settings dialog) -# - ARCH_DIRECTORY individual files in archetype directory (set in settings -# dialog) -configSource.COLLECTED.treasures.0=${COLLECTED}/treasures -configSource.ARCH_DIRECTORY.treasures.0=${COLLECTED}/treasures - -configSource.image.name=atrinik.0 -configSource.face.name=bmaps -configSource.face.output=%3$s -configSource.facetree.name=facetree -configSource.facetree.input=^(.*) -configSource.facetree.output=%2$s - -# Internal version number of the included online-documentation. Increasing the -# number causes an automated popup of the docu when users upgrade their editor -# and run for the first time. -docuVersion=1 - -# Supported image set. The values must match the image file names: -# <name>.<image set name>.111 -availableImageSets= - -# The default archetype directory. -archDirectoryDefault=../arch - -# The default maps directory. -mapsDirectoryDefault=../maps - -# Whether a media directory is used. -mediaDirectory=true - -# The default media directory. -mediaDirectoryDefault=../client/media - -# Whether an image set is used. -imageSet=false - -# The default image set. -imageSetDefault= - -########## -# Dialogs -warning=Warning! - -mapUnsaved.title=Map Not Saved -mapUnsaved.message=Please save this map first. - -# Map Properties -mapMap=Map -mapRegion=Region -mapWeather=Weather -mapOutdoor=Outdoor -mapOptions=Options -mapNoSave=No Save -mapNoMagic=No Magic -mapNoPrayers=No Prayers -mapNoHarm=No Harmful Spells -mapNoSumm=No Summoning -mapFixedLogin=Fixed Login -mapUnique=Unique -mapFixedResetTime=Fixed Reset Time -mapPlayerNoSave=Players Cannot Save -mapPvP=PvP Enabled -mapText=Map Text - - -##################### -# Preference Modules - -# Options -optionsTitle=Options -optionsResMedia=Media -optionsResMedia.shortdescription=<html>The media directory is for choosing background sounds for maps.<br>Please know that you cannot simply choose any media directory you want.<br>The background sound will only work if the files exist on the client as well.<br>Therefore, choosing a standard atrinik media directory is crucial.</html> - - -####### -# Map - -enterExit.accel=ctrl pressed NUMPAD5 -enterNorthMap.accel=ctrl pressed NUMPAD9 -enterNorthEastMap.accel=ctrl pressed NUMPAD6 -enterEastMap.accel=ctrl pressed NUMPAD3 -enterSouthEastMap.accel=ctrl pressed NUMPAD2 -enterSouthMap.accel=ctrl pressed NUMPAD1 -enterSouthWestMap.accel=ctrl pressed NUMPAD4 -enterWestMap.accel=ctrl pressed NUMPAD7 -enterNorthWestMap.accel=ctrl pressed NUMPAD8 - - -####### -# Cursor - -moveCursorNorth.accel=NUMPAD9 -moveCursorNorthEast.accel=NUMPAD6 -moveCursorNorthEast.accel2=RIGHT -moveCursorEast.accel=NUMPAD3 -moveCursorSouthEast.accel=NUMPAD2 -moveCursorSouthEast.accel2=DOWN -moveCursorSouth.accel=NUMPAD1 -moveCursorSouthWest.accel=NUMPAD4 -moveCursorSouthWest.accel2=LEFT -moveCursorWest.accel=NUMPAD7 -moveCursorNorthWest.accel=NUMPAD8 -moveCursorNorthWest.accel2=UP - - -####### -# Help - -about.title=About Gridarta for Atrinik -about=<html><h1 align="center">Gridarta for Atrinik</h1><p>Editor for Atrinik MMORPG maps and arches</p><table><tr><td valign="top" align="right" width="50%">Copyright \xA9 2001-2010</td><td width="50%">Michael Toennies<br>Andreas Vogl<br>Peter Plischewsky<br>Gecko<br>Christian Hujer<br>Daniel Viegas<br>Andreas Kirschbaum</td></tr><tr><td align="right">Java version:</td><td>{0}</td></tr><tr><td align="right">Version:</td><td>{1}</td></tr><tr><td align="right">by:</td><td>{2}</td></tr><tr><td align="right">at:</td><td>{3}</td></tr></table></html> - -aboutBuildProperties.title=Build properties - - -####################### -# Various Log Messages -logDefArchWithInvalidMpartId=Arch part {0} has mpart_id {2}, but head part {1} has mpart_id {3} - - -# Actions not to be shown in Configure Shortcuts -shortcutsIgnoreActions=smoothing \ - scriptEditClose scriptEditCloseAll scriptEditCopy scriptEditCut scriptEditFind scriptEditFindAgain scriptEditNewScript scriptEditOpen scriptEditPaste scriptEditRedo scriptEditReplace scriptEditSave scriptEditSaveAs scriptEditUndo - - -########################### -# Map Validator definitions -validator.0=net.sf.gridarta.model.validation.checks.ConnectionChecker system_connection_source system_connection_sink system_connection_sink2 -validator.1=net.sf.gridarta.model.validation.checks.BlockedSpawnPointChecker 81 -validator.2=net.sf.gridarta.model.validation.checks.BlockedMobOrSpawnPointChecker 80 -validator.3=net.sf.gridarta.model.validation.checks.ConnectedInsideContainerChecker -validator.4=net.sf.gridarta.model.validation.checks.ConnectedPickableChecker -validator.5=net.sf.gridarta.model.validation.checks.DoubleLayerChecker -validator.6=net.sf.gridarta.model.validation.checks.EmptySpawnPointChecker 81 -validator.7=net.sf.gridarta.model.validation.checks.ExitChecker 66 -validator.8=net.sf.gridarta.model.validation.checks.MapDifficultyChecker 1 10000 -validator.9=net.sf.gridarta.model.validation.checks.MobOutsideSpawnPointChecker 80 -validator.10=net.sf.gridarta.model.validation.checks.TilePathsChecker 8 -validator.11=net.sf.gridarta.model.validation.checks.UndefinedArchetypeChecker -validator.12=net.sf.gridarta.model.validation.checks.UndefinedFaceChecker -validator.13=net.sf.gridarta.model.validation.checks.UnsetSlayingChecker 20,21,51,55,64,122 -validator.14=net.sf.gridarta.model.validation.checks.MapCheckerScriptChecker map-checker.py -c --text-only -a ${ARCH} -r ${MAPS}/regions.reg -m ${MAP} Deleted: trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/messages_de.properties =================================================================== --- trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/messages_de.properties 2013-05-28 19:12:45 UTC (rev 9235) +++ trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/messages_de.properties 2013-05-28 19:39:43 UTC (rev 9236) @@ -1,68 +0,0 @@ -# -# Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. -# Copyright (C) 2000-2010 The Gridarta Developers. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# - -# Warning: This file MUST be ISO-8859-1 -# See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding - -application.name=Gridarta f\xFCr Atrinik -mainWindow.title=Gridarta f\xFCr Atrinik {0} - - -########## -# Dialogs -warning=Warnung! - -#mapUnsaved.title= -#mapUnsaved.message= - -# Map Properties -mapMap=Karte -mapRegion=Region -mapWeather=Wetter -mapOutdoor=Im Freien -mapOptions=Optionen -mapNoSave=Nicht speichern -mapNoMagic=Keine Magie -mapNoPrayers=Keine Gebete -mapNoHarm=Keine gef\xE4hrlichen Zauber -mapNoSumm=Keine Herbeirufungszauber -mapFixedLogin=Login am Startpunkt -mapFixedResetTime=Fixer Reset -mapPlayerNoSave=Spieler kann nicht speichern -mapPvP=Spieler gegen Spieler aktiv -mapPlugins=Plugins -mapText=Kartentext - - -##################### -# Preference Modules - -# Options -optionsTitle=Optionen -#optionsResMedia= -#optionsResMedia.shortdescription= - - -####### -# Help - -about.title=\xDCber Gridarta f\xFCr Atrinik -about=<html><h1 align="center">Gridarta f\xFCr Atrinik</h1><p>Editor f\xFCr Atrinik MMORPG Karten und Objekte</p><table><tr><td valign="top" align="right" width="50%">Copyright \xA9 2001-2010</td><td width="50%">Michael Toennies<br>Andreas Vogl<br>Peter Plischewsky<br>Gecko<br>Christian Hujer<br>Daniel Viegas<br>Andreas Kirschbaum</td></tr><tr><td align="right">Java version:</td><td>{0}</td></tr><tr><td align="right">Version:</td><td>{1}</td></tr><tr><td align="right">Entwickler:</td><td>{2}</td></tr><tr><td align="right">Erstellung:</td><td>{3}</td></tr></table></html> - -#aboutBuildProperties.title= Deleted: trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/messages_fr.properties =================================================================== --- trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/messages_fr.properties 2013-05-28 19:12:45 UTC (rev 9235) +++ trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/messages_fr.properties 2013-05-28 19:39:43 UTC (rev 9236) @@ -1,71 +0,0 @@ -# -# Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. -# Copyright (C) 2000-2010 The Gridarta Developers. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# - -# Warning: This file MUST be ISO-8859-1 -# See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding -# Translation done by Marmoth - -application.name=Gridarta for Atrinik -mainWindow.title=Gridarta for Atrinik {0} - - -########## -# Dialogs -warning=Attention! - -#mapUnsaved.title= -#mapUnsaved.message= - -# Map Properties -#mapMap= -#mapRegion= -#mapWeather= -#mapOutdoor= -#mapOptions= -#mapNoSave= -#mapNoMagic= -#mapNoPrayers= -#mapNoHarm= -#mapNoSumm= -#mapFixedLogin= -#mapUnique= -#mapFixedResetTime= -#mapPlayerNoSave= -#mapPvP= -#mapPlugins= -#mapText= - - -##################### -# Preference Modules - -# Options -#optionsTitle= -#optionsUpdate= -#optionsResMedia= -#optionsResMedia.shortdescription= - - -####### -# Help - -#about.title= -#about= - -#aboutBuildProperties.title= Deleted: trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/messages_sv.properties =================================================================== --- trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/messages_sv.properties 2013-05-28 19:12:45 UTC (rev 9235) +++ trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/messages_sv.properties 2013-05-28 19:39:43 UTC (rev 9236) @@ -1,69 +0,0 @@ -# -# Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. -# Copyright (C) 2000-2010 The Gridarta Developers. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# - -# Warning: This file MUST be ISO-8859-1 -# See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding - -application.name=Gridarta for Atrinik -mainWindow.title=Gridarta for Atrinik {0} - - -########## -# Dialogs -warning=Varning! - -mapUnsaved.title=Kartan har inte sparats. -mapUnsaved.message=Var v\xE4nlig och spara den h\xE4r kartan f\xF6rst. - -# Map Properties -mapMap=Karta -#mapRegion= -#mapWeather= -mapOutdoor=Utomhus -mapOptions=Inst\xE4llningar -mapNoSave=Ingen spara -mapNoMagic=Ingen magi -mapNoPrayers=Inga b\xF6ner -mapNoHarm=Inga farliga trollformler -mapNoSumm=Ingen \xE5kallning -mapFixedLogin=Fixerad inloggning -#mapUnique= -#mapFixedResetTime= -#mapPlayerNoSave= -mapPvP=Spelare mot Spelare -#mapPlugins= -mapText=Karttext - - -##################### -# Preference Modules - -# Options -optionsTitle=Inst\xE4llningar -optionsResMedia=Media -optionsResMedia.shortdescription=<html>Mediakatalogen anv\xE4nds f\xF6r att v\xE4lja bakgrundsljud till kartor.<br>Observera att det inte g\xE5r att v\xE4lja vilka filer som helst.<br>Bakgrundsljud fungerar enbart om filen finns i klienten ocks\xE5.<br>D\xE4rf\xF6r \xE4r det viktigt att v\xE4lja en Atrinik standardkatalog f\xF6r media.</html> - - -####### -# Help - -about.title=Om Gridarta for Atrinik -about=<html><h1 align="center">Gridarta for Daimoin</h1><p>Editor for Atrinik MMORPG maps and arches</p><table><tr><td valign="top" align="right" width="50%">Copyright \xA9 2001-2010</td><td width="50%">Michael Toennies<br>Andreas Vogl<br>Peter Plischewsky<br>Gecko<br>Christian Hujer<br>Daniel Viegas<br>Andreas Kirschbaum</td></tr><tr><td align="right">Java version:</td><td>{0}</td></tr><tr><td align="right">Build number:</td><td>{1}</td></tr><tr><td align="right">av:</td><td>{2}</td></tr><tr><td align="right">datum:</td><td>{3}</td></tr></table></html> - -aboutBuildProperties.title=Build properties Deleted: trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/tod.properties =================================================================== --- trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/tod.properties 2013-05-28 19:12:45 UTC (rev 9235) +++ trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/tod.properties 2013-05-28 19:39:43 UTC (rev 9236) @@ -1,59 +0,0 @@ -# -# Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. -# Copyright (C) 2000-2010 The Gridarta Developers. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# - -# Warning: This file MUST be ISO-8859-1 -# See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding -# -# Tip Of The Day - -tod.text.1=<html>You can as well cycle through the tips using the arrow keys<br>(Arrow left / Arrow right) -tod.text.2=<html>This Tip Of The Day window is non-modal.<p>That means the window may stay open while using the editor. -tod.text.3=<html>You can online update the editor to get the latest version.<p>Menu: <code>Help -> Update</code>.<br>Keyboard: <kbd>Ctrl-U</kbd>.<p>This will update the editor to the latest build available (nightly build). -tod.text.4=<html>You can quickly cycle through open windows.<p>Menu: <code>View->Previous / Next Window</code>.<br>Keyboard: <kbd>Shift-Page Up</kbd> / <kbd>Shift-Page Down</kbd>. -tod.text.5=<html>You can display half-height walls stacked in the same way the client does.<p>Menu: <code>View->Draw Double Faces</code><br>Keyboard: <kbd>Ctrl+Shift-G</kbd>. -tod.text.6=<html>On most systems, <em>Atrinik Editor runs fastest at 32 Bit colour depth</em>.<p>This is because the editor uses transparency (Alpha Channel). -tod.text.7=<html>You can quickly move through tiled attached maps.<p>Hold <kbd>Ctrl</kbd> and use the numpad with the same directions as the client. -tod.text.8=<html>How to use the mouse?<ul><li>To <em>select</em> squares, use the left mouse button.<li>To <em>paint</em> (insert arches), use the right mouse button.<li>To <em>delete</em>, use the middle mouse button or hold Ctrl and use the right mouse button.</ul> -tod.text.9=<html>You can select all squares of a map at once.<p>Menu: <code>Edit -> Select All</code><br>Keyboard: <kbd>Ctrl-A</kbd>. -tod.text.10=<html>You can random paint by selecting a pickmap and painting.<p>Try this:<br>Select the "plants1" pickmap,<br>then paint with the right mouse button. -tod.text.11=<html>All tiled maps of Atrinik are of size 24\xD724?<p>Your maps should be 24\xD724 as well. -tod.text.12=<html>You can create random maps quite fast? Try this:<ol><li>Create a new map.<li>Select the entire map using Edit -> Select All or Ctrl-A<li>Select the "grass" pickmap (do not select a square in the pickmap)<li>Use Edit -> Random Fill Above or Ctrl-D<li>When asked for a fill seed value, simply press OK or Return (enter nothing).<li>Select the "trees1" pickmap (do not select a square in the pickmap)<li>Use Edit -> Random Fill Above or Ctrl-D<li>When asked for a fill seed value, now enter 3.</ol>Nice, isn''t it? -tod.text.13=<html>Maps can be tiled using absolute and relative paths.<p><em>Relative paths</em> are good for paths to maps from the same map set.<br><em>Absolute paths</em> are good for paths to maps from another map set.<p>The "RA"-Switch in the Map Properties can be used to individually convert absolute to relative paths and vice versa. -tod.text.14=<html>The editor runs better on Linux than on Windows.\nIt runs faster and smoother on Linux. -tod.text.15=<html>You can control the client.<p>Menu: <code>Tools -> Control Client</code>.<p>There you can start and stop the client as well as see its console output. -tod.text.16=<html>You can control the server.<p>Menu: <code>Tools -> Control Server</code>.<p><em><strong>Warning</strong>: This feature is experimental and might result in stale servers (zombies).</em> -tod.text.17=<html>The editor was developed on Linux, mainly using vim, Ant and <em>IntelliJ IDEA 5</em>.<p>JetBrains (<a href="http://www.jetbrains.com/">http://www.jetbrains.com/</a>) gave us a license for IntelliJ IDEA. Thanks alot, JetBrains!<br><img src="http://www.jetbrains.com/idea/opensource/img/banners/idea88x31_blue.gif" alt="JetBrains"> -tod.text.18=<html>You can easily make a false wall.<p>Change the Special attribute "blocking passage" to false or set <code>no_pass 0</code>. -tod.text.19=<html>The difference between an exit and a teleporter:<p>An exit always works while a teleporter needs a connection to be activated. -tod.text.20=<html>You can make anything glow (emit light), even mob.<p>Set the "glow radius" attribute (<code>glow_radius 1</code> for instance).<p>If you want to have a mob glow, be sure to set glow radius on the mob, not the spawn point. -tod.text.21=<html>To create a spawn point that spawns a mob, do this:<ol><li>Select "spawn_point" from the mobs Arch List.<li>Insert the spawn point.<li>Choose the mob you want to spawn from the mobs Arch List.<li>Use "Add Inv" to put the mob in the spawn point</ol>Done. -tod.text.22=<html>Pickmaps are an often underestimated feature. -tod.text.23=<html>The 10 most recently opened maps are quickly accessible.<p>Menu: <code>File -> Recent -> ...</code><br>Keyboard: <kbd>Alt-n</kbd> with n being a digit (1..9, 0) -tod.text.24=<html>To collect arches for your server, do this:<ol><li>Change the settings to not load arches from collection (<code>File -> Options, Global)<li>Restart the editor<li>Use <code>Resources -> Collect Arches<li>Run the install script of the server</ol> -tod.text.25=<html>How can you speed up the editor?<ul><li>Load arches from the collection<li>Use Linux<li>Use the latest Java version available<li>Use 32 Bit colour depth</ul> -tod.text.26=<html>The editor does not load all images at startup.<p>Instead, it loads images as needed.<p>This is called "lazy image loading". -tod.text.27=<html>The zoom feature knows different zoom resolutions.<p>This is a nice feature especially for map artists that want to publish previews. -tod.text.28=<html>Many features have tooltips to help you.<p>Just hover the mouse over the thing you want to know about for a while. -tod.text.29=<html>To attach a map to other maps, you must save it first. -tod.text.30=<html>The editor runs even better when using Java 6.0 (Java2 1.6). -tod.text.31=<html>You should stick to the default map size (24\xD724).<br>That map size is also best for the server. -tod.text.32=<html>Beware when editing large maps. You might run out of memory.<br>Be sure to increase the heap size (-Xmx parameter) of Gridarta''s Virtual Machine when editing large maps (e.g. 240\xD7240). -tod.text.33=<html>It''s amazing how much archetypes you could find using "Search archetype".<p>Menu: <code>Archetypes -> Find archetype</code>. -tod.text.34=<html>You can quickly switch to the game object text editor with <code>CTRl-ALT-E</code>. Press these keys again to close it. -tod.text.35=<html>To navigate to maps connected through exits, select Map|Go To Exit... or press <kbd>Ctrl-F12</kbd>. Then select the exit and press <kbd>Enter</kbd>. Deleted: trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/tod_de.properties =================================================================== --- trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/tod_de.properties 2013-05-28 19:12:45 UTC (rev 9235) +++ trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/tod_de.properties 2013-05-28 19:39:43 UTC (rev 9236) @@ -1,55 +0,0 @@ -# -# Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. -# Copyright (C) 2000-2010 The Gridarta Developers. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# - -# Warning: This file MUST be ISO-8859-1 -# See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding -# -# Tip Of The Day - -tod.text.1=<html>Sie k\xF6nnen mit Hilfe der Pfeiltasten durch die Tipps navigieren.<br>(Pfeil links / Pfeil rechts) -tod.text.2=<html>Dieses Tipps-Fenster ist nicht modal.<p>Das bedeutet, Sie k\xF6nnen es offen lassen, w\xE4hrend Sie den Editor verwenden. -tod.text.3=<html>Sie k\xF6nnen den Editor online aktualisieren, um die neueste Version zu erhalten.<p>Men\xFC: <code>Hilfe -> Aktualisieren</code>.<br>Tastatur: <kbd>Strg-U</kbd>.<p>Das wird den Editor auf die neueste verf\xFCgbare Version aktualisieren (nightly build). -tod.text.4=<html>Sie k\xF6nnen schnell zwischen ge\xF6ffneten Fenstern wechseln.<p>Men\xFC: <code>Ansicht->Vorheriges / N\xE4chstes Fenster.</code>.<br>Tastatur: <kbd>Umschalt-Bild Auf</kbd> / <kbd>Umschalt-Bild Ab</kbd>. -tod.text.5=<html>Sie k\xF6nnen halbhohe W\xE4nde genauso wie der Client gestapelt anzeigen lassen.<p>Men\xFC: <code>Ansicht->Zeichne doppelte Grafiken</code><br>Tastatur: <kbd>Strg+Umschalt-G</kbd>. -tod.text.6=<html>Auf den meisten Systemen l\xE4uft <em>Gridarta am schnellsten in 32 Bit Farbtiefe</em>.<p>Das ist so weil der Editor Transparenz verwendet (Alpha-Kanal). -tod.text.7=<html>Sie k\xF6nnen sich schnell durch verbundene Karten bewegen.<p>Halten Sie <kbd>Strg</kbd> gedr\xFCckt und verwenden Sie den Ziffernblock wie im Client. -tod.text.8=<html>Wie man die Maus benutzt?<ul><li>Zum <em>Selektieren</em>, linke Maustaste.<li>Zum <em>Einf\xFCgen</em>, rechte Maustaste.<li>Zum <em>L\xF6schen</em>: mittlere Maustaste oder Strg+rechte Maustaste.</ul> -tod.text.9=<html>Sie k\xF6nnen alle Felder einer Karte gleichzeitig selektieren.<p>Men\xFC: <code>Bearbeiten -> Alles ausw\xE4hlen</code><br>Tastatur: <kbd>Strg-A</kbd>. -tod.text.10=<html>Sie k\xF6nnen zuf\xE4llige Objekte aus einer Pickmap einf\xFCgen.<p>Versuchen Sie''s:<br>W\xE4hlen Sie die "plants1" pickmap,<br>malen Sie dann mit der rechten Maustaste. -tod.text.11=<html>Alle verbundenen Karten von Atrinik sind 24\xD724 gro\xDF.<p>Ihre Karten sollten auch 24\xD724 gro\xDF sein. -tod.text.12=<html>Man kann zuf\xE4llige Karten sehr schnell erstellen.<ol><li>Leere Karte erstellen.<li>Die ganze Karte ausw\xE4hlen<li>Die "gras" pickmap ausw\xE4hlen (kein Feld in der Pickmap ausw\xE4hlen!)<li>Verwenden Sie Bearbeiten -> Zuf\xE4llig oben f\xFCllen<li>Wenn nach dem Prozentsatz gefragt wird, einfach OK dr\xFCcken.<li>W\xE4hlen Sie die "trees1" pickmap.<li>Benutzen Sie wieder zuf\xE4llig oben f\xFCllen, diesmal mit dem Wert 3.</ol>Sch\xF6n, nicht wahr? -tod.text.17=<html>Der Editor wurde unter Linux entwickelt, haupts\xE4chlich mit vim, Ant und <em>IntelliJ IDEA 6</em>.<p>JetBrains (<a href="http://www.jetbrains.com/">http://www.jetbrains.com/</a>) gaben uns eine kostenlose Lizenz f\xFCr IntelliJ IDEA. Vielen Dank, JetBrains!<br><img src="http://www.jetbrains.com/idea/opensource/img/banners/idea88x31_blue.gif" alt="JetBrains"> -#tod.text.18= -#tod.text.19= -#tod.text.20= -#tod.text.21= -#tod.text.22= -tod.text.23=<html>Sie k\xF6nnen die letzten 10 ge\xF6ffneten Karten einfach erreichen.<p>Men\xFC: <code>Datei -> Zuletzt ge\xF6ffnet -> ...</code><br>Tastatur: <kbd>Alt-n</kbd> wobei n eine Ziffer ist (1..9, 0) -#tod.text.24= -tod.text.25=<html>Wie kann man den Editor beschleunigen?<ul><li>Vorbereitete Archetypen laden<li>Linux verwenden<li>Die aktuelle Java-Version verwenden<li>32 Bit Farbtiefe verwenden</ul> -tod.text.26=<html>Der Editor l\xE4dt beim Start nicht alle Bilder.<p>Diese werden erst dann geladen, wenn sie tats\xE4chlich ben\xF6tigt werden.<p>Dieses Verfahren nennt man "lazy image loading". -tod.text.27=<html>Das Werkzeug "Zoom" unterst\xFCtzt verschiedene Verg\xF6\xDFerungsstufen.<p>Dadurch ist es ein interessantes Feature f\xFCr Autoren, die Ansichten ihrer Karten ver\xF6ffentlichen m\xF6chten. -tod.text.28=<html>Viele Features haben Tooltips.<p>Bleiben Sie mit der Maus \xFCber dem Element, f\xFCr das Sie Hilfe ben\xF6tigen, f\xFCr eine Weile stehen. -tod.text.29=<html>Um eine Karte mit anderen Karten zu verbinden m\xFCssen Sie diese zuerst sichern. -#tod.text.30= -#tod.text.31= -tod.text.32=<html>Vorsicht beim Bearbeiten von gro\xDFen Karten: der Platz im Hauptspeicher k\xF6nnte nicht ausreichen.<br>Vergr\xF6\xDFern Sie die "heap size" (Parameter -Xmx beim Aufruf von java) von Gridarta, wenn Sie gro\xDFe Karten (bspw. 240\xD7240) bearbeiten m\xF6chten. -tod.text.33=<html>Es ist verbl\xFCffend, wie viele Archetypen man mit "Archetypen finden" entdecken kann.<p>Men\xFC: <code>Archetypen -> Archetypen finden</code>. -tod.text.34=<html>Sie k\xF6nnen den Objekt-Editor \xFCber die Tastenkombination <code>CTRl-ALT-E</code> \xF6ffnen. Dieselbe Tastenkombination schlie\xDFt ihn wieder. -tod.text.35=<html>Sie k\xF6nnen Karten hinter Ausg\xE4ngen \xFCber <code>Karte -> Folge Ausgang...</code> oder \xFCber die Tastenkombination <code>CTRL-F12</code> \xF6ffnen. Copied: trunk/atrinik/src/main/resources/net/sf/gridarta/var/atrinik/AtrinikEditor.properties (from rev 9235, trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/AtrinikEditor.properties) =================================================================== --- trunk/atrinik/src/main/resources/net/sf/gridarta/var/atrinik/AtrinikEditor.properties (rev 0) +++ trunk/atrinik/src/main/resources/net/sf/gridarta/var/atrinik/AtrinikEditor.properties 2013-05-28 19:39:43 UTC (rev 9236) @@ -0,0 +1,23 @@ +# +# Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. +# Copyright (C) 2000-2010 The Gridarta Developers. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# + +setNormal=Sets the operation mode to normal.\nIn normal mode, the editor starts with GUI.\nCommand line arguments are maps to load immediately. +setCollectArches=Collect arches from the command line. +setBatchPNG=Reads all specified maps and creates PNG images for them. +setSinglePNG=Take the first argument as map file and the second argument as PNG name to write the map to. Property changes on: trunk/atrinik/src/main/resources/net/sf/gridarta/var/atrinik/AtrinikEditor.properties ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +LF \ No newline at end of property Copied: trunk/atrinik/src/main/resources/net/sf/gridarta/var/atrinik/action.properties (from rev 9235, trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/action.properties) =================================================================== --- trunk/atrinik/src/main/resources/net/sf/gridarta/var/atrinik/action.properties (rev 0) +++ trunk/atrinik/src/main/resources/net/sf/gridarta/var/atrinik/action.properties 2013-05-28 19:39:43 UTC (rev 9236) @@ -0,0 +1,71 @@ +# +# Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. +# Copyright (C) 2000-2010 The Gridarta Developers. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# + +# Warning: This file MUST be ISO-8859-1 +# See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding + +ActionBuilder.additionalBundles=net.sf.gridarta.var.atrinik.messages + +######## +# Menus +main.menubar=file edit map archetypes pickmaps resources tools analyze view bookmarks plugins window help +file.menu=newMap openFile goMap recent closeMap - saveMap saveMapAs saveAllMaps - closeAllMaps reloadMap createImage - options shortcuts - exit +edit.menu=undo redo - clear cut copy paste pasteTiled - shift - find findNext findPrev replace fillAuto fillAbove fillBelow randFillAuto randFillAbove randFillBelow floodFill - selectAll invertSelection expandEmptySelection growSelection shrinkSelection +map.menu=autoJoin - enterExit nextExit prevExit enterNorthMap enterEastMap enterSouthMap enterWestMap enterNorthEastMap enterSouthEastMap enterSouthWestMap enterNorthWestMap - mapCreateView mapProperties shrinkMapSize deleteUnknownObjects - gameObjectTextEditor +archetypes.menu=displayGameObjectNames displayArchetypeNames displayIconsOnly - findArchetypes +#pickmaps.menu: See gridarta +resources.menu=collectArches collectSpells - reloadFaces - viewTreasurelists +tools.menu=newScript editScript - controlServer controlClient - validateMap cleanCompletelyBlockedSquares - zoom gc +analyze.menu= +view.menu=resetView - gridVisible lightVisible doubleFaces - prevWindow nextWindow +plugins.menu=- editPlugins - savePlugins importPlugin +window.menu=closeAllMaps +help.menu=showHelp tipOfTheDay about update + +mapwindow.menubar=mapwindowFile mapwindowEdit mapwindowMap mapwindowCursor + +mapwindowFile.menu=saveMap saveMapAs createImage - reloadMap - closeMap +mapwindowEdit.menu=undo redo - clear cut copy paste pasteTiled - shift - find findNext findPrev replace fillAuto fillAbove fillBelow randFillAuto randFillAbove randFillBelow floodFill - selectAll invertSelection expandEmptySelection growSelection shrinkSelection +mapwindowMap.menu=gridVisible lightVisible - goExit enterExit nextExit prevExit enterNorthMap enterEastMap enterSouthMap enterWestMap enterNorthEastMap enterSouthEastMap enterSouthWestMap enterNorthWestMap - mapCreateView mapProperties shrinkMapSize deleteUnknownObjects openInClient +mapwindowCursor.menu=moveCursor - exitConnector - selectSquare startStopDrag addToSelection subFromSelection releaseDrag - insertArch deleteArch - selectArchAbove selectArchBelow - archAttributes + +########## +# ToolBars +main.toolbar=newMap openFile saveMap saveMapAs - prevWindow nextWindow - undo redo + + +moveCursor.menu=moveCursorNorth moveCursorEast moveCursorSouth moveCursorWest moveCursorNorthEast moveCursorSouthEast moveCursorSouthWest moveCursorNorthWest - goLocation + +exitConnector.menu=exitCopy exitPaste exitConnect + +#control.toolbar=controlStart controlStop + +nextWindow.icon=navigation/Forward16 + +prevWindow.icon=navigation/Back16 + + +license.1.file=License +license.2.file=japi.jar-LICENSE +license.3.file=jlfgr-1_0.jar-LICENSE +license.4.file=log4j-1.2.13.jar-LICENSE + +about.logo=icons/atrinikLogoSmall.png + +update.url=http://www.atrinik.org/editor/update.properties Property changes on: trunk/atrinik/src/main/resources/net/sf/gridarta/var/atrinik/action.properties ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +LF \ No newline at end of property Copied: trunk/atrinik/src/main/resources/net/sf/gridarta/var/atrinik/messages.properties (from rev 9235, trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/messages.properties) =================================================================== --- trunk/atrinik/src/main/resources/net/sf/gridarta/var/atrinik/messages.properties (rev 0) +++ trunk/atrinik/src/main/resources/net/sf/gridarta/var/atrinik/messages.properties 2013-05-28 19:39:43 UTC (rev 9236) @@ -0,0 +1,179 @@ +# +# Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. +# Copyright (C) 2000-2010 The Gridarta Developers. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# + +# Warning: This file MUST be ISO-8859-1 +# See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding + +application.name=Gridarta for Atrinik +mainWindow.title=Gridarta for Atrinik {0} + +configSources=net.sf.gridarta.var.atrinik.model.settings.FilesConfigSource net.sf.gridarta.var.atrinik.model.settings.CollectedConfigSource + +# configSource.<config source name>.<file type>.<sequence> values support the +# following variables: +# ${COLLECTED} collected directory (compile-time constant) +# ${MAPS} maps directory (set in settings dialog) +# ${ARCH} archetype directory (set in settings dialog) +# +# file types: +# - treasures treasure lists +# +# config source name: +# - COLLECTED collected archetypes (set in settings dialog) +# - ARCH_DIRECTORY individual files in archetype directory (set in settings +# dialog) +configSource.COLLECTED.treasures.0=${COLLECTED}/treasures +configSource.ARCH_DIRECTORY.treasures.0=${COLLECTED}/treasures + +configSource.image.name=atrinik.0 +configSource.face.name=bmaps +configSource.face.output=%3$s +configSource.facetree.name=facetree +configSource.facetree.input=^(.*) +configSource.facetree.output=%2$s + +# Internal version number of the included online-documentation. Increasing the +# number causes an automated popup of the docu when users upgrade their editor +# and run for the first time. +docuVersion=1 + +# Supported image set. The values must match the image file names: +# <name>.<image set name>.111 +availableImageSets= + +# The default archetype directory. +archDirectoryDefault=../arch + +# The default maps directory. +mapsDirectoryDefault=../maps + +# Whether a media directory is used. +mediaDirectory=true + +# The default media directory. +mediaDirectoryDefault=../client/media + +# Whether an image set is used. +imageSet=false + +# The default image set. +imageSetDefault= + +########## +# Dialogs +warning=Warning! + +mapUnsaved.title=Map Not Saved +mapUnsaved.message=Please save this map first. + +# Map Properties +mapMap=Map +mapRegion=Region +mapWeather=Weather +mapOutdoor=Outdoor +mapOptions=Options +mapNoSave=No Save +mapNoMagic=No Magic +mapNoPrayers=No Prayers +mapNoHarm=No Harmful Spells +mapNoSumm=No Summoning +mapFixedLogin=Fixed Login +mapUnique=Unique +mapFixedResetTime=Fixed Reset Time +mapPlayerNoSave=Players Cannot Save +mapPvP=PvP Enabled +mapText=Map Text + + +##################### +# Preference Modules + +# Options +optionsTitle=Options +optionsResMedia=Media +optionsResMedia.shortdescription=<html>The media directory is for choosing background sounds for maps.<br>Please know that you cannot simply choose any media directory you want.<br>The background sound will only work if the files exist on the client as well.<br>Therefore, choosing a standard atrinik media directory is crucial.</html> + + +####### +# Map + +enterExit.accel=ctrl pressed NUMPAD5 +enterNorthMap.accel=ctrl pressed NUMPAD9 +enterNorthEastMap.accel=ctrl pressed NUMPAD6 +enterEastMap.accel=ctrl pressed NUMPAD3 +enterSouthEastMap.accel=ctrl pressed NUMPAD2 +enterSouthMap.accel=ctrl pressed NUMPAD1 +enterSouthWestMap.accel=ctrl pressed NUMPAD4 +enterWestMap.accel=ctrl pressed NUMPAD7 +enterNorthWestMap.accel=ctrl pressed NUMPAD8 + + +####### +# Cursor + +moveCursorNorth.accel=NUMPAD9 +moveCursorNorthEast.accel=NUMPAD6 +moveCursorNorthEast.accel2=RIGHT +moveCursorEast.accel=NUMPAD3 +moveCursorSouthEast.accel=NUMPAD2 +moveCursorSouthEast.accel2=DOWN +moveCursorSouth.accel=NUMPAD1 +moveCursorSouthWest.accel=NUMPAD4 +moveCursorSouthWest.accel2=LEFT +moveCursorWest.accel=NUMPAD7 +moveCursorNorthWest.accel=NUMPAD8 +moveCursorNorthWest.accel2=UP + + +####### +# Help + +about.title=About Gridarta for Atrinik +about=<html><h1 align="center">Gridarta for Atrinik</h1><p>Editor for Atrinik MMORPG maps and arches</p><table><tr><td valign="top" align="right" width="50%">Copyright \xA9 2001-2010</td><td width="50%">Michael Toennies<br>Andreas Vogl<br>Peter Plischewsky<br>Gecko<br>Christian Hujer<br>Daniel Viegas<br>Andreas Kirschbaum</td></tr><tr><td align="right">Java version:</td><td>{0}</td></tr><tr><td align="right">Version:</td><td>{1}</td></tr><tr><td align="right">by:</td><td>{2}</td></tr><tr><td align="right">at:</td><td>{3}</td></tr></table></html> + +aboutBuildProperties.title=Build properties + + +####################### +# Various Log Messages +logDefArchWithInvalidMpartId=Arch part {0} has mpart_id {2}, but head part {1} has mpart_id {3} + + +# Actions not to be shown in Configure Shortcuts +shortcutsIgnoreActions=smoothing \ + scriptEditClose scriptEditCloseAll scriptEditCopy scriptEditCut scriptEditFind scriptEditFindAgain scriptEditNewScript scriptEditOpen scriptEditPaste scriptEditRedo scriptEditReplace scriptEditSave scriptEditSaveAs scriptEditUndo + + +########################### +# Map Validator definitions +validator.0=net.sf.gridarta.model.validation.checks.ConnectionChecker system_connection_source system_connection_sink system_connection_sink2 +validator.1=net.sf.gridarta.model.validation.checks.BlockedSpawnPointChecker 81 +validator.2=net.sf.gridarta.model.validation.checks.BlockedMobOrSpawnPointChecker 80 +validator.3=net.sf.gridarta.model.validation.checks.ConnectedInsideContainerChecker +validator.4=net.sf.gridarta.model.validation.checks.ConnectedPickableChecker +validator.5=net.sf.gridarta.model.validation.checks.DoubleLayerChecker +validator.6=net.sf.gridarta.model.validation.checks.EmptySpawnPointChecker 81 +validator.7=net.sf.gridarta.model.validation.checks.ExitChecker 66 +validator.8=net.sf.gridarta.model.validation.checks.MapDifficultyChecker 1 10000 +validator.9=net.sf.gridarta.model.validation.checks.MobOutsideSpawnPointChecker 80 +validator.10=net.sf.gridarta.model.validation.checks.TilePathsChecker 8 +validator.11=net.sf.gridarta.model.validation.checks.UndefinedArchetypeChecker +validator.12=net.sf.gridarta.model.validation.checks.UndefinedFaceChecker +validator.13=net.sf.gridarta.model.validation.checks.UnsetSlayingChecker 20,21,51,55,64,122 +validator.14=net.sf.gridarta.model.validation.checks.MapCheckerScriptChecker map-checker.py -c --text-only -a ${ARCH} -r ${MAPS}/regions.reg -m ${MAP} Property changes on: trunk/atrinik/src/main/resources/net/sf/gridarta/var/atrinik/messages.properties ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +LF \ No newline at end of property Copied: trunk/atrinik/src/main/resources/net/sf/gridarta/var/atrinik/messages_de.properties (from rev 9235, trunk/atrinik/src/main/java/net/sf/gridarta/var/atrinik/messages_de.properties) =================================================================== --- trunk/atrinik/src/main/resources/net/sf/gridarta/var/atrinik/messages_de.properties (rev 0) +++ trunk/atrinik/src/main/resources/net/sf/gridarta/var/atrinik/messages_de.properties 2013-05-28 19:39:43 UTC (rev 9236) @@ -0,0 +1,68 @@ +# +# Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. +# Copyright (C) 2000-2010 The Gridarta Developers. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# + +# Warning: This file MUST be ISO-8859-1 +# See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding + +application.name=Gridarta f\xFCr Atrinik +mainWindow.title=Gridarta f\xFCr Atrinik {0} + + +########## +# Dialogs +warning=Warnung! + +#mapUnsaved.title= +#mapUnsaved.message= + +# Map Properties +mapMap=Karte +mapRegion=Region +mapWeather=Wetter +mapOutdoor=Im Freien +mapOptions=Optionen +mapNoSave=Nicht speichern +mapNoMagic=Keine Magie +mapNoPrayers=Keine Gebete +mapNoHarm=Keine gef\xE4hrlichen Zauber +mapNoSumm=Keine Herbeirufungszauber +mapFixedLogin=Login am Startpunkt +mapFixedResetTime=Fixer Reset +mapPlayerNoSave=Spieler kann nicht speichern +mapPvP=Spieler gegen Spieler aktiv +mapPlugins=Plugins +mapText=Kartentext + + +##################### +# Preference Modules + +# Options +optionsTitle=Optionen +#optionsResMedia= +#optionsResMedia.shortdescription= + + +####### +# Help + +about.title=\xDCber Gridarta f\xFCr Atrinik +about=<html><h1 align="center">Gridarta f\xFCr Atrinik</h1><p>Editor f\xFCr Atrinik MMORPG Karten und Objekte</p><table><tr><td valign="top" align="right" width="50%">Copyright \xA9 2001-2010</td><td width="50%">Michael Toennies<br>Andreas Vogl<br>Peter Plischewsky<br>Gecko<br>Christian Hujer<br>Daniel Viegas<br>Andreas Kirschbaum</td></tr><tr><td align="right">Java version:</td><td>{0}</td></tr><tr><td align="right">Version:</td><td>{1}</td></tr><tr><td align="right">Entwickler:</td><td>{2}</td></tr><tr><td align="right">Erstellung:</td><td>{3}</td></tr></table></html> + +#aboutBuildProperties.title= Property changes on: trunk/atrinik/src/main/resources/net/sf/gridarta/var/atrinik/messages_de.properties ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +LF \ No newline at end of property Copied: trunk/atrinik/src/main/resources/net/sf/gridarta/va... [truncated message content] |
From: <aki...@us...> - 2013-05-28 20:00:33
|
Revision: 9237 http://sourceforge.net/p/gridarta/code/9237 Author: akirschbaum Date: 2013-05-28 20:00:26 +0000 (Tue, 28 May 2013) Log Message: ----------- Move gridarta module into subdirectory. Modified Paths: -------------- trunk/build.xml trunk/gridarta.ipr Added Paths: ----------- trunk/gridarta/ trunk/gridarta/gridarta.iml trunk/gridarta/resource/ trunk/gridarta/src/ Removed Paths: ------------- trunk/gridarta.iml trunk/resource/ trunk/src/ Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2013-05-28 19:39:43 UTC (rev 9236) +++ trunk/build.xml 2013-05-28 20:00:26 UTC (rev 9237) @@ -17,7 +17,7 @@ ~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. --> -<!DOCTYPE project [<!ENTITY catalogForAnt SYSTEM "src/doc/dtd/catalogForAnt.xml">]> +<!DOCTYPE project [<!ENTITY catalogForAnt SYSTEM "gridarta/src/doc/dtd/catalogForAnt.xml">]> <project default="jar"> <description> @@ -179,8 +179,8 @@ <target name="clean" description="Removes all generated files."> <delete dir="${build.dir}"/> <delete dir="${dist.dir}"/> - <delete file="src/doc/dev/SafeCopy.java.xhtml"/> - <delete file="src/doc/dev/changelog.xml"/> + <delete file="gridarta/src/doc/dev/SafeCopy.java.xhtml"/> + <delete file="gridarta/src/doc/dev/changelog.xml"/> <delete dir="${docs.dir}"/> <delete file="AtrinikEditor.jar"/> <delete file="CrossfireEditor.jar"/> @@ -211,7 +211,7 @@ <include name="log4j-1.2.13.jar-LICENSE"/> <include name="rsyntaxtextarea-1.5.1.jar-LICENSE"/> </fileset> - <fileset dir="resource"/> + <fileset dir="gridarta/resource"/> <fileset dir="atrinik/resource"/> <zipfileset src="lib/bsh-classgen-2.0b4.jar" excludes="META-INF/**"/> <zipfileset src="lib/bsh-commands-2.0b4.jar" excludes="META-INF/**"/> @@ -251,7 +251,7 @@ <include name="log4j-1.2.13.jar-LICENSE"/> <include name="rsyntaxtextarea-1.5.1.jar-LICENSE"/> </fileset> - <fileset dir="resource"/> + <fileset dir="gridarta/resource"/> <fileset dir="crossfire/resource"/> <zipfileset src="lib/bsh-classgen-2.0b4.jar" excludes="META-INF/**"/> <zipfileset src="lib/bsh-commands-2.0b4.jar" excludes="META-INF/**"/> @@ -291,7 +291,7 @@ <include name="log4j-1.2.13.jar-LICENSE"/> <include name="rsyntaxtextarea-1.5.1.jar-LICENSE"/> </fileset> - <fileset dir="resource"/> + <fileset dir="gridarta/resource"/> <fileset dir="daimonin/resource"/> <zipfileset src="lib/bsh-classgen-2.0b4.jar" excludes="META-INF/**"/> <zipfileset src="lib/bsh-commands-2.0b4.jar" excludes="META-INF/**"/> @@ -436,7 +436,7 @@ <target name="compile-gridarta" description="Compiles the gridarta module." depends="compile-model,compile-preferences,compile-plugin,compile-textedit,compile-utils"> <mkdir dir="${build.dir}/gridarta/app"/> - <javac srcdir="src/main/java" destdir="${build.dir}/gridarta/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> + <javac srcdir="gridarta/src/main/java" destdir="${build.dir}/gridarta/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> <path refid="path.class.model.app"/> <path refid="path.class.preferences.app"/> @@ -460,10 +460,10 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/gridarta/test"> - <fileset dir="src/test/resources" includes="**/*.properties,cfpython_menu.def"/> + <fileset dir="gridarta/src/test/resources" includes="**/*.properties,cfpython_menu.def"/> </copy> <mkdir dir="${build.dir}/gridarta/test"/> - <javac srcdir="src/test/java" destdir="${build.dir}/gridarta/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> + <javac srcdir="gridarta/src/test/java" destdir="${build.dir}/gridarta/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> <path refid="path.class.gridarta.app"/> <path refid="path.class.model.test"/> @@ -477,7 +477,7 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/gridarta/app"> - <fileset dir="src/main/resources" includes="**/*.properties,cfpython_menu.def"/> + <fileset dir="gridarta/src/main/resources" includes="**/*.properties,cfpython_menu.def"/> </copy> </target> @@ -635,27 +635,27 @@ <target name="java2html" description="Converts documentation java sources to XHTML."> <taskdef name="java2html" classpath="lib/java2html.jar" classname="de.java2html.anttasks.Java2HtmlTask"/> - <java2html srcdir="src/doc" destdir="src/doc" includes="**/*.java" outputformat="xhtml11" tabs="4" style="eclipse" addlineanchors="true" includedocumentfooter="true" includedocumentheader="true" lineanchorprefix="line" showdefaulttitle="true" showfilename="true" showlinenumbers="true" showtableborder="true"/> + <java2html srcdir="gridarta/src/doc" destdir="gridarta/src/doc" includes="**/*.java" outputformat="xhtml11" tabs="4" style="eclipse" addlineanchors="true" includedocumentfooter="true" includedocumentheader="true" lineanchorprefix="line" showdefaulttitle="true" showfilename="true" showlinenumbers="true" showtableborder="true"/> </target> <target name="editorialDoc" description="Creates the editorial part of the project documentation." depends="java2html"> <mkdir dir="${build.dir}/doc"/> - <megaxslt srcdir="src/doc" destdir="${build.dir}/doc" includes="**/*.xhtml" validatesource="true" validatedest="true" ending="xhtml" transformerFactoryImplementationClassName="net.sf.saxon.TransformerFactoryImpl"> + <megaxslt srcdir="gridarta/src/doc" destdir="${build.dir}/doc" includes="**/*.xhtml" validatesource="true" validatedest="true" ending="xhtml" transformerFactoryImplementationClassName="net.sf.saxon.TransformerFactoryImpl"> <xmlcatalog refid="commonDTDs"/> - <transformation stylesheet="src/doc/transform.xslt"/> - <transformation stylesheet="src/doc/cleanupXhtml11.xslt"/> + <transformation stylesheet="gridarta/src/doc/transform.xslt"/> + <transformation stylesheet="gridarta/src/doc/cleanupXhtml11.xslt"/> </megaxslt> <megaxslt srcdir="${build.dir}/doc" destdir="${build.dir}/doc" includes="**/*.xhtml" validatesource="true" validatedest="false" ending="html" converttocanonical="true" transformerFactoryImplementationClassName="net.sf.saxon.TransformerFactoryImpl"> <xmlcatalog refid="commonDTDs"/> - <transformation stylesheet="src/doc/xhtml2html.xslt"/> + <transformation stylesheet="gridarta/src/doc/xhtml2html.xslt"/> </megaxslt> - <megaxslt srcdir="src/doc" destdir="." includes="faq.xhtml" validatesource="true" validatedest="false" ending="" transformerFactoryImplementationClassName="net.sf.saxon.TransformerFactoryImpl"> + <megaxslt srcdir="gridarta/src/doc" destdir="." includes="faq.xhtml" validatesource="true" validatedest="false" ending="" transformerFactoryImplementationClassName="net.sf.saxon.TransformerFactoryImpl"> <xmlcatalog refid="commonDTDs"/> - <transformation stylesheet="src/doc/faq2txt.xslt"/> + <transformation stylesheet="gridarta/src/doc/faq2txt.xslt"/> </megaxslt> <copy file="faq" tofile="FAQ"/> <copy todir="${build.dir}/doc"> - <fileset dir="src/doc"> + <fileset dir="gridarta/src/doc"> <include name="**/.htaccess"/> <include name="**/*.html"/> <include name="dtd/**/*.mod"/> @@ -672,9 +672,9 @@ <target name="apiDoc" description="Creates public javadoc documentation."> <mkdir dir="${build.dir}/doc/api/${project.version}"/> - <copy todir="${build.dir}/doc/api/${project.version}" file="src/doc/copyright.xhtml"/> - <copy todir="${build.dir}/doc/api/${project.version}" file="src/doc/dev/api/.htaccess"/> - <javadoc destdir="${build.dir}/doc/api/${project.version}" access="protected" author="yes" version="yes" locale="en_US" use="yes" splitindex="yes" windowtitle="Gridarta API documentation" doctitle="Gridarta<br />Yet another Java API<br />API Documentation" header="Gridarta ${project.version}<br />Yet another Java API<br />API Documentation" footer="Gridarta<br />Yet another Java API<br />API Documentation" bottom="<div style="text-align:center;">© 2005-2006 The Gridarta Developers. All rights reserved. See <a href="{@docRoot}/copyright.xhtml">copyright</a></div>" serialwarn="yes" charset="${build.source.encoding}" docencoding="${build.source.encoding}" source="${build.source.version}" encoding="${build.source.encoding}" linksource="yes" overview="src/main/java/overview.html" link="${user.javadoc.link}"> + <copy todir="${build.dir}/doc/api/${project.version}" file="gridarta/src/doc/copyright.xhtml"/> + <copy todir="${build.dir}/doc/api/${project.version}" file="gridarta/src/doc/dev/api/.htaccess"/> + <javadoc destdir="${build.dir}/doc/api/${project.version}" access="protected" author="yes" version="yes" locale="en_US" use="yes" splitindex="yes" windowtitle="Gridarta API documentation" doctitle="Gridarta<br />Yet another Java API<br />API Documentation" header="Gridarta ${project.version}<br />Yet another Java API<br />API Documentation" footer="Gridarta<br />Yet another Java API<br />API Documentation" bottom="<div style="text-align:center;">© 2005-2006 The Gridarta Developers. All rights reserved. See <a href="{@docRoot}/copyright.xhtml">copyright</a></div>" serialwarn="yes" charset="${build.source.encoding}" docencoding="${build.source.encoding}" source="${build.source.version}" encoding="${build.source.encoding}" linksource="yes" overview="gridarta/src/main/java/overview.html" link="${user.javadoc.link}"> <classpath> <fileset dir="atrinik/lib" includes="*.jar" excludes="*.jar-LICENSE"/> <fileset dir="daimonin/lib" includes="*.jar" excludes="*.jar-LICENSE"/> @@ -693,8 +693,8 @@ <path refid="path.class.textedit.test"/> <path refid="path.class.utils.test"/> </sourcepath> - <packageset dir="src/main/java" defaultexcludes="yes"/> - <packageset dir="src/test/java" defaultexcludes="yes"/> + <packageset dir="gridarta/src/main/java" defaultexcludes="yes"/> + <packageset dir="gridarta/src/test/java" defaultexcludes="yes"/> <packageset dir="atrinik/src/main/java" defaultexcludes="yes"/> <packageset dir="atrinik/src/test/java" defaultexcludes="yes"/> <packageset dir="crossfire/src/main/java" defaultexcludes="yes"/> @@ -734,19 +734,19 @@ <parallel> <tar tarfile="${distSrc}.tar"> <tarfileset dir="." prefix="gridarta-${project.version}"> - <include name="src/**"/> + <include name="gridarta/src/**"/> <include name="build.xml"/> </tarfileset> </tar> <zip destfile="${distSrc}.zip"> <zipfileset dir="." prefix="gridarta-${project.version}"> - <include name="src/**"/> + <include name="gridarta/src/**"/> <include name="build.xml"/> </zipfileset> </zip> <jar destfile="${distSrc}.jar"> <zipfileset dir="." prefix="gridarta-${project.version}"> - <include name="src/**"/> + <include name="gridarta/src/**"/> <include name="build.xml"/> </zipfileset> </jar> @@ -809,14 +809,14 @@ </target> <target name="releaseDist" description="Uploads distribution archives to sourceforge." if="developer.email" depends="checkDevMail, dist"> - <touch file="src/doc/api/start.xhtml" millis="0"/> - <megaxslt srcdir="src/doc/api" destdir="src/doc/api" includes="start.xhtml" validatesource="true" validatedest="true" ending="xhtml" converttocanonical="true" checktimestamps="true"> + <touch file="gridarta/src/doc/api/start.xhtml" millis="0"/> + <megaxslt srcdir="gridarta/src/doc/api" destdir="gridarta/src/doc/api" includes="start.xhtml" validatesource="true" validatedest="true" ending="xhtml" converttocanonical="true" checktimestamps="true"> <xmlcatalog refid="commonDTDs"/> <parameter name="project.version" value="${project.version}"/> - <transformation stylesheet="src/doc/api/release.xslt"/> + <transformation stylesheet="gridarta/src/doc/api/release.xslt"/> </megaxslt> <svn javahl="${user.svn.javahl}"> - <commit file="src/doc/api/start.xhtml" message="Updating API link to include ${project.version}."/> + <commit file="gridarta/src/doc/api/start.xhtml" message="Updating API link to include ${project.version}."/> </svn> <exec executable="rsync" failonerror="true"> <arg line="-auzv -e ssh ${build.dir}/doc/api/ ${user.rsync.username}@${user.rsync.host}:${user.rsync.dir}/htdocs/api/"/> @@ -877,11 +877,11 @@ <target name="checkstyle" description="Runs checkstyle to style-check the source code"> <taskdef resource="checkstyletask.properties" classpath="lib/checkstyle-all-5.0.jar"/> <mkdir dir="${build.dir}/doc"/> - <checkstyle config="src/checkstyle.xml" failOnViolation="true"> + <checkstyle config="gridarta/src/checkstyle.xml" failOnViolation="true"> <formatter type="plain" tofile="${build.dir}/doc/checkstyle_report.txt"/> <formatter type="plain"/> - <fileset dir="src/main/java" includes="**/*.java"/> - <fileset dir="src/test/java" includes="**/*.java"/> + <fileset dir="gridarta/src/main/java" includes="**/*.java"/> + <fileset dir="gridarta/src/test/java" includes="**/*.java"/> <fileset dir="atrinik/src/main/java" includes="**/*.java"/> <fileset dir="atrinik/src/test/java" includes="**/*.java"/> <fileset dir="crossfire/src/main/java" includes="**/*.java"/> @@ -906,18 +906,18 @@ </target> <target name="changelog" description="Updates the changelog"> - <exec executable="svn" output="src/doc/dev/changelog.xml"> + <exec executable="svn" output="gridarta/src/doc/dev/changelog.xml"> <arg line="log -v --xml"/> </exec> - <megaxslt srcdir="src/doc/dev" destdir="src/doc/dev" includes="changelog.xml" validatesource="false" validatedest="false" ending="xhtml" converttocanonical="true" transformerFactoryImplementationClassName="net.sf.saxon.TransformerFactoryImpl"> + <megaxslt srcdir="gridarta/src/doc/dev" destdir="gridarta/src/doc/dev" includes="changelog.xml" validatesource="false" validatedest="false" ending="xhtml" converttocanonical="true" transformerFactoryImplementationClassName="net.sf.saxon.TransformerFactoryImpl"> <xmlcatalog refid="commonDTDs"/> - <transformation stylesheet="src/doc/dev/changelog.xslt"/> + <transformation stylesheet="gridarta/src/doc/dev/changelog.xslt"/> </megaxslt> </target> <target name="javadoc" depends="init-properties" description="Creates the JavaDoc documentation for the complete editor source."> <mkdir dir="${build.dir}/doc/dev/api"/> - <javadoc destdir="${build.dir}/doc/dev/api" locale="en_US" version="yes" author="yes" use="yes" splitindex="yes" windowtitle="Gridarta — API Documentation" doctitle="Gridarta ${build.number}<br />API Documentation" header="Gridarta ${build.number}<br />API Documentation" footer="Gridarta ${build.number}<br />API Documentation" serialwarn="no" charset="utf-8" docencoding="utf-8" source="${build.source.version}" encoding="${build.source.encoding}" linksource="yes" private="yes" overview="src/main/java/overview.html" link="${user.javadoc.link}"> + <javadoc destdir="${build.dir}/doc/dev/api" locale="en_US" version="yes" author="yes" use="yes" splitindex="yes" windowtitle="Gridarta — API Documentation" doctitle="Gridarta ${build.number}<br />API Documentation" header="Gridarta ${build.number}<br />API Documentation" footer="Gridarta ${build.number}<br />API Documentation" serialwarn="no" charset="utf-8" docencoding="utf-8" source="${build.source.version}" encoding="${build.source.encoding}" linksource="yes" private="yes" overview="gridarta/src/main/java/overview.html" link="${user.javadoc.link}"> <classpath> <fileset dir="atrinik/lib" includes="*.jar" excludes="*.jar-LICENSE"/> <fileset dir="daimonin/lib" includes="*.jar" excludes="*.jar-LICENSE"/> @@ -936,8 +936,8 @@ <path refid="path.class.textedit.test"/> <path refid="path.class.utils.test"/> </sourcepath> - <packageset dir="src/main/java" defaultexcludes="yes"/> - <packageset dir="src/test/java" defaultexcludes="yes"/> + <packageset dir="gridarta/src/main/java" defaultexcludes="yes"/> + <packageset dir="gridarta/src/test/java" defaultexcludes="yes"/> <packageset dir="atrinik/src/main/java" defaultexcludes="yes"/> <packageset dir="atrinik/src/test/java" defaultexcludes="yes"/> <packageset dir="crossfire/src/main/java" defaultexcludes="yes"/> @@ -1073,7 +1073,7 @@ <path refid="path.lib.japi-swing-action"/> <path refid="path.lib.junit"/> <path refid="path.lib.log4j"/> - <pathelement location="resource"/> + <pathelement location="gridarta/resource"/> </classpath> <formatter type="plain"/> <formatter type="xml"/> @@ -1097,7 +1097,7 @@ <path refid="path.lib.japi-xml"/> <path refid="path.lib.junit"/> <path refid="path.lib.log4j"/> - <pathelement location="resource"/> + <pathelement location="gridarta/resource"/> </classpath> <formatter type="plain"/> <formatter type="xml"/> Copied: trunk/gridarta/gridarta.iml (from rev 9235, trunk/gridarta.iml) =================================================================== --- trunk/gridarta/gridarta.iml (rev 0) +++ trunk/gridarta/gridarta.iml 2013-05-28 20:00:26 UTC (rev 9237) @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" inherit-compiler-output="true"> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/resource" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" /> + <excludeFolder url="file://$MODULE_DIR$/src/screenshots" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="module" module-name="model" /> + <orderEntry type="module" module-name="preferences" /> + <orderEntry type="module" module-name="plugin" /> + <orderEntry type="module" module-name="textedit" /> + <orderEntry type="module" module-name="utils" /> + <orderEntry type="library" name="annotations" level="project" /> + <orderEntry type="library" name="bsh-core" level="project" /> + <orderEntry type="library" name="bsh-util" level="project" /> + <orderEntry type="library" name="java-getopt" level="project" /> + <orderEntry type="library" name="japi-lib-lang" level="project" /> + <orderEntry type="library" name="japi-lib-swing-about" level="project" /> + <orderEntry type="library" name="japi-lib-swing-action" level="project" /> + <orderEntry type="library" name="japi-lib-swing-extlib" level="project" /> + <orderEntry type="library" name="japi-lib-swing-misc" level="project" /> + <orderEntry type="library" name="japi-lib-swing-prefs" level="project" /> + <orderEntry type="library" name="japi-lib-swing-tod" level="project" /> + <orderEntry type="library" name="japi-lib-util" level="project" /> + <orderEntry type="library" name="japi-lib-xml" level="project" /> + <orderEntry type="library" name="jdom" level="project" /> + <orderEntry type="library" name="junit" level="project" /> + <orderEntry type="library" name="log4j" level="project" /> + <orderEntry type="library" name="rsyntaxtextarea" level="project" /> + </component> +</module> + Deleted: trunk/gridarta.iml =================================================================== --- trunk/gridarta.iml 2013-05-28 19:39:43 UTC (rev 9236) +++ trunk/gridarta.iml 2013-05-28 20:00:26 UTC (rev 9237) @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<module relativePaths="true" type="JAVA_MODULE" version="4"> - <component name="NewModuleRootManager" inherit-compiler-output="true"> - <content url="file://$MODULE_DIR$"> - <sourceFolder url="file://$MODULE_DIR$/resource" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> - <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" /> - <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" /> - <excludeFolder url="file://$MODULE_DIR$/atrinik" /> - <excludeFolder url="file://$MODULE_DIR$/classes" /> - <excludeFolder url="file://$MODULE_DIR$/crossfire" /> - <excludeFolder url="file://$MODULE_DIR$/daimonin" /> - <excludeFolder url="file://$MODULE_DIR$/dest" /> - <excludeFolder url="file://$MODULE_DIR$/doc" /> - <excludeFolder url="file://$MODULE_DIR$/docs" /> - <excludeFolder url="file://$MODULE_DIR$/metrics" /> - <excludeFolder url="file://$MODULE_DIR$/src/screenshots" /> - <excludeFolder url="file://$MODULE_DIR$/teststuff" /> - </content> - <orderEntry type="inheritedJdk" /> - <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="module" module-name="model" /> - <orderEntry type="module" module-name="preferences" /> - <orderEntry type="module" module-name="plugin" /> - <orderEntry type="module" module-name="textedit" /> - <orderEntry type="module" module-name="utils" /> - <orderEntry type="library" name="annotations" level="project" /> - <orderEntry type="library" name="bsh-core" level="project" /> - <orderEntry type="library" name="bsh-util" level="project" /> - <orderEntry type="library" name="java-getopt" level="project" /> - <orderEntry type="library" name="japi-lib-lang" level="project" /> - <orderEntry type="library" name="japi-lib-swing-about" level="project" /> - <orderEntry type="library" name="japi-lib-swing-action" level="project" /> - <orderEntry type="library" name="japi-lib-swing-extlib" level="project" /> - <orderEntry type="library" name="japi-lib-swing-misc" level="project" /> - <orderEntry type="library" name="japi-lib-swing-prefs" level="project" /> - <orderEntry type="library" name="japi-lib-swing-tod" level="project" /> - <orderEntry type="library" name="japi-lib-util" level="project" /> - <orderEntry type="library" name="japi-lib-xml" level="project" /> - <orderEntry type="library" name="jdom" level="project" /> - <orderEntry type="library" name="junit" level="project" /> - <orderEntry type="library" name="log4j" level="project" /> - <orderEntry type="library" name="rsyntaxtextarea" level="project" /> - </component> -</module> - Modified: trunk/gridarta.ipr =================================================================== --- trunk/gridarta.ipr 2013-05-28 19:39:43 UTC (rev 9236) +++ trunk/gridarta.ipr 2013-05-28 20:00:26 UTC (rev 9237) @@ -1323,6 +1323,24 @@ <option name="FILTER_INFO" value="true" /> <option name="CUSTOM_FILTER" /> </component> + <component name="NullableNotNullManager"> + <option name="myDefaultNullable" value="org.jetbrains.annotations.Nullable" /> + <option name="myDefaultNotNull" value="org.jetbrains.annotations.NotNull" /> + <option name="myNullables"> + <value> + <list size="0" /> + </value> + </option> + <option name="myNotNulls"> + <value> + <list size="3"> + <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" /> + <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" /> + <item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" /> + </list> + </value> + </option> + </component> <component name="Palette2"> <group name="Swing"> <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false"> @@ -2155,7 +2173,7 @@ <module fileurl="file://$PROJECT_DIR$/atrinik/atrinik.iml" filepath="$PROJECT_DIR$/atrinik/atrinik.iml" /> <module fileurl="file://$PROJECT_DIR$/crossfire/crossfire.iml" filepath="$PROJECT_DIR$/crossfire/crossfire.iml" /> <module fileurl="file://$PROJECT_DIR$/daimonin/daimonin.iml" filepath="$PROJECT_DIR$/daimonin/daimonin.iml" /> - <module fileurl="file://$PROJECT_DIR$/gridarta.iml" filepath="$PROJECT_DIR$/gridarta.iml" /> + <module fileurl="file://$PROJECT_DIR$/gridarta/gridarta.iml" filepath="$PROJECT_DIR$/gridarta/gridarta.iml" /> <module fileurl="file://$PROJECT_DIR$/model/model.iml" filepath="$PROJECT_DIR$/model/model.iml" /> <module fileurl="file://$PROJECT_DIR$/plugin/plugin.iml" filepath="$PROJECT_DIR$/plugin/plugin.iml" /> <module fileurl="file://$PROJECT_DIR$/preferences/preferences.iml" filepath="$PROJECT_DIR$/preferences/preferences.iml" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2013-05-28 20:09:26
|
Revision: 9238 http://sourceforge.net/p/gridarta/code/9238 Author: akirschbaum Date: 2013-05-28 20:09:22 +0000 (Tue, 28 May 2013) Log Message: ----------- Move java sources into common src directory. Modified Paths: -------------- trunk/build.xml trunk/gridarta.ipr Added Paths: ----------- trunk/src/ trunk/src/atrinik/ trunk/src/crossfire/ trunk/src/daimonin/ trunk/src/gridarta/ trunk/src/model/ trunk/src/plugin/ trunk/src/preferences/ trunk/src/textedit/ trunk/src/utils/ Removed Paths: ------------- trunk/atrinik/ trunk/crossfire/ trunk/daimonin/ trunk/gridarta/ trunk/model/ trunk/plugin/ trunk/preferences/ trunk/textedit/ trunk/utils/ Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2013-05-28 20:00:26 UTC (rev 9237) +++ trunk/build.xml 2013-05-28 20:09:22 UTC (rev 9238) @@ -17,7 +17,7 @@ ~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. --> -<!DOCTYPE project [<!ENTITY catalogForAnt SYSTEM "gridarta/src/doc/dtd/catalogForAnt.xml">]> +<!DOCTYPE project [<!ENTITY catalogForAnt SYSTEM "src/gridarta/src/doc/dtd/catalogForAnt.xml">]> <project default="jar"> <description> @@ -60,7 +60,7 @@ <path id="path.class.atrinik.app"> <pathelement location="${build.dir}/atrinik/app"/> - <pathelement location="atrinik/resource"/> + <pathelement location="src/atrinik/resource"/> </path> <path id="path.class.atrinik.test"> <path refid="path.class.atrinik.app"/> @@ -69,7 +69,7 @@ <path id="path.class.crossfire.app"> <pathelement location="${build.dir}/crossfire/app"/> - <pathelement location="crossfire/resource"/> + <pathelement location="src/crossfire/resource"/> </path> <path id="path.class.crossfire.test"> <path refid="path.class.crossfire.app"/> @@ -78,7 +78,7 @@ <path id="path.class.daimonin.app"> <pathelement location="${build.dir}/daimonin/app"/> - <pathelement location="daimonin/resource"/> + <pathelement location="src/daimonin/resource"/> </path> <path id="path.class.daimonin.test"> <path refid="path.class.daimonin.app"/> @@ -179,8 +179,8 @@ <target name="clean" description="Removes all generated files."> <delete dir="${build.dir}"/> <delete dir="${dist.dir}"/> - <delete file="gridarta/src/doc/dev/SafeCopy.java.xhtml"/> - <delete file="gridarta/src/doc/dev/changelog.xml"/> + <delete file="src/gridarta/src/doc/dev/SafeCopy.java.xhtml"/> + <delete file="src/gridarta/src/doc/dev/changelog.xml"/> <delete dir="${docs.dir}"/> <delete file="AtrinikEditor.jar"/> <delete file="CrossfireEditor.jar"/> @@ -200,7 +200,7 @@ <fileset dir="${build.dir}/utils/app"/> <fileset dir="${build.dir}" includes="build.properties"/> <fileset file="COPYING"/> - <fileset dir="atrinik/lib"> + <fileset dir="src/atrinik/lib"> <include name="*-LICENSE"/> </fileset> <fileset dir="lib"> @@ -211,8 +211,8 @@ <include name="log4j-1.2.13.jar-LICENSE"/> <include name="rsyntaxtextarea-1.5.1.jar-LICENSE"/> </fileset> - <fileset dir="gridarta/resource"/> - <fileset dir="atrinik/resource"/> + <fileset dir="src/gridarta/resource"/> + <fileset dir="src/atrinik/resource"/> <zipfileset src="lib/bsh-classgen-2.0b4.jar" excludes="META-INF/**"/> <zipfileset src="lib/bsh-commands-2.0b4.jar" excludes="META-INF/**"/> <zipfileset src="lib/bsh-core-2.0b4.jar" excludes="META-INF/**"/> @@ -240,7 +240,7 @@ <fileset dir="${build.dir}/utils/app"/> <fileset dir="${build.dir}" includes="build.properties"/> <fileset file="COPYING"/> - <fileset dir="crossfire/lib"> + <fileset dir="src/crossfire/lib"> <include name="*-LICENSE"/> </fileset> <fileset dir="lib"> @@ -251,8 +251,8 @@ <include name="log4j-1.2.13.jar-LICENSE"/> <include name="rsyntaxtextarea-1.5.1.jar-LICENSE"/> </fileset> - <fileset dir="gridarta/resource"/> - <fileset dir="crossfire/resource"/> + <fileset dir="src/gridarta/resource"/> + <fileset dir="src/crossfire/resource"/> <zipfileset src="lib/bsh-classgen-2.0b4.jar" excludes="META-INF/**"/> <zipfileset src="lib/bsh-commands-2.0b4.jar" excludes="META-INF/**"/> <zipfileset src="lib/bsh-core-2.0b4.jar" excludes="META-INF/**"/> @@ -280,7 +280,7 @@ <fileset dir="${build.dir}/utils/app"/> <fileset dir="${build.dir}" includes="build.properties"/> <fileset file="COPYING"/> - <fileset dir="daimonin/lib"> + <fileset dir="src/daimonin/lib"> <include name="*-LICENSE"/> </fileset> <fileset dir="lib"> @@ -291,8 +291,8 @@ <include name="log4j-1.2.13.jar-LICENSE"/> <include name="rsyntaxtextarea-1.5.1.jar-LICENSE"/> </fileset> - <fileset dir="gridarta/resource"/> - <fileset dir="daimonin/resource"/> + <fileset dir="src/gridarta/resource"/> + <fileset dir="src/daimonin/resource"/> <zipfileset src="lib/bsh-classgen-2.0b4.jar" excludes="META-INF/**"/> <zipfileset src="lib/bsh-commands-2.0b4.jar" excludes="META-INF/**"/> <zipfileset src="lib/bsh-core-2.0b4.jar" excludes="META-INF/**"/> @@ -327,7 +327,7 @@ <target name="compile-atrinik" description="Compiles the atrinik module." depends="compile-gridarta,compile-model,compile-preferences,compile-plugin,compile-utils"> <mkdir dir="${build.dir}/atrinik/app"/> - <javac srcdir="atrinik/src/main/java" destdir="${build.dir}/atrinik/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> + <javac srcdir="src/atrinik/src/main/java" destdir="${build.dir}/atrinik/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> <path refid="path.class.gridarta.app"/> <path refid="path.class.model.app"/> @@ -342,10 +342,10 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/atrinik/app"> - <fileset dir="atrinik/src/main/resources" includes="**/*.properties"/> + <fileset dir="src/atrinik/src/main/resources" includes="**/*.properties"/> </copy> <mkdir dir="${build.dir}/atrinik/test"/> - <javac srcdir="atrinik/src/test/java" destdir="${build.dir}/atrinik/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> + <javac srcdir="src/atrinik/src/test/java" destdir="${build.dir}/atrinik/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> <path refid="path.class.atrinik.app"/> <path refid="path.class.gridarta.test"/> @@ -358,13 +358,13 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/atrinik/test"> - <fileset dir="atrinik/src/test/resources" includes="**/*.properties"/> + <fileset dir="src/atrinik/src/test/resources" includes="**/*.properties"/> </copy> </target> <target name="compile-crossfire" description="Compiles the crossfire module." depends="compile-gridarta,compile-model,compile-preferences,compile-plugin,compile-utils"> <mkdir dir="${build.dir}/crossfire/app"/> - <javac srcdir="crossfire/src/main/java" destdir="${build.dir}/crossfire/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> + <javac srcdir="src/crossfire/src/main/java" destdir="${build.dir}/crossfire/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> <path refid="path.class.gridarta.app"/> <path refid="path.class.model.app"/> @@ -379,10 +379,10 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/crossfire/app"> - <fileset dir="crossfire/src/main/resources" includes="**/*.properties"/> + <fileset dir="src/crossfire/src/main/resources" includes="**/*.properties"/> </copy> <mkdir dir="${build.dir}/crossfire/test"/> - <javac srcdir="crossfire/src/test/java" destdir="${build.dir}/crossfire/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> + <javac srcdir="src/crossfire/src/test/java" destdir="${build.dir}/crossfire/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> <path refid="path.class.crossfire.app"/> <path refid="path.class.gridarta.test"/> @@ -395,13 +395,13 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/crossfire/test"> - <fileset dir="crossfire/src/test/resources" includes="**/*.properties"/> + <fileset dir="src/crossfire/src/test/resources" includes="**/*.properties"/> </copy> </target> <target name="compile-daimonin" description="Compiles the daimonin module." depends="compile-gridarta,compile-model,compile-plugin,compile-utils"> <mkdir dir="${build.dir}/daimonin/app"/> - <javac srcdir="daimonin/src/main/java" destdir="${build.dir}/daimonin/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> + <javac srcdir="src/daimonin/src/main/java" destdir="${build.dir}/daimonin/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> <path refid="path.class.gridarta.app"/> <path refid="path.class.model.app"/> @@ -416,10 +416,10 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/daimonin/test"> - <fileset dir="daimonin/src/test/resources" includes="**/*.properties"/> + <fileset dir="src/daimonin/src/test/resources" includes="**/*.properties"/> </copy> <mkdir dir="${build.dir}/daimonin/test"/> - <javac srcdir="daimonin/src/test/java" destdir="${build.dir}/daimonin/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> + <javac srcdir="src/daimonin/src/test/java" destdir="${build.dir}/daimonin/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> <path refid="path.class.daimonin.app"/> <path refid="path.class.gridarta.test"/> @@ -430,13 +430,13 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/daimonin/app"> - <fileset dir="daimonin/src/main/resources" includes="**/*.properties"/> + <fileset dir="src/daimonin/src/main/resources" includes="**/*.properties"/> </copy> </target> <target name="compile-gridarta" description="Compiles the gridarta module." depends="compile-model,compile-preferences,compile-plugin,compile-textedit,compile-utils"> <mkdir dir="${build.dir}/gridarta/app"/> - <javac srcdir="gridarta/src/main/java" destdir="${build.dir}/gridarta/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> + <javac srcdir="src/gridarta/src/main/java" destdir="${build.dir}/gridarta/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> <path refid="path.class.model.app"/> <path refid="path.class.preferences.app"/> @@ -460,10 +460,10 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/gridarta/test"> - <fileset dir="gridarta/src/test/resources" includes="**/*.properties,cfpython_menu.def"/> + <fileset dir="src/gridarta/src/test/resources" includes="**/*.properties,cfpython_menu.def"/> </copy> <mkdir dir="${build.dir}/gridarta/test"/> - <javac srcdir="gridarta/src/test/java" destdir="${build.dir}/gridarta/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> + <javac srcdir="src/gridarta/src/test/java" destdir="${build.dir}/gridarta/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> <path refid="path.class.gridarta.app"/> <path refid="path.class.model.test"/> @@ -477,13 +477,13 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/gridarta/app"> - <fileset dir="gridarta/src/main/resources" includes="**/*.properties,cfpython_menu.def"/> + <fileset dir="src/gridarta/src/main/resources" includes="**/*.properties,cfpython_menu.def"/> </copy> </target> <target name="compile-model" description="Compiles the model module." depends="compile-utils"> <mkdir dir="${build.dir}/model/app"/> - <javac srcdir="model/src/main/java" destdir="${build.dir}/model/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> + <javac srcdir="src/model/src/main/java" destdir="${build.dir}/model/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> <path refid="path.class.utils.app"/> <path refid="path.lib.annotations"/> @@ -497,10 +497,10 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/model/test"> - <fileset dir="model/src/test/resources" includes="**/*.properties"/> + <fileset dir="src/model/src/test/resources" includes="**/*.properties"/> </copy> <mkdir dir="${build.dir}/model/test"/> - <javac srcdir="model/src/test/java" destdir="${build.dir}/model/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> + <javac srcdir="src/model/src/test/java" destdir="${build.dir}/model/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> <path refid="path.class.model.app"/> <path refid="path.class.utils.test"/> @@ -514,13 +514,13 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/model/app"> - <fileset dir="model/src/main/resources" includes="**/*.properties"/> + <fileset dir="src/model/src/main/resources" includes="**/*.properties"/> </copy> </target> <target name="compile-preferences" description="Compiles the preferences module."> <mkdir dir="${build.dir}/preferences/app"/> - <javac srcdir="preferences/src/main/java" destdir="${build.dir}/preferences/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> + <javac srcdir="src/preferences/src/main/java" destdir="${build.dir}/preferences/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> <path refid="path.lib.annotations"/> <path refid="path.lib.japi-swing-action"/> @@ -529,23 +529,23 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/preferences/test"> - <fileset dir="preferences/src/test/resources" includes="**/*.properties"/> + <fileset dir="src/preferences/src/test/resources" includes="**/*.properties"/> </copy> <mkdir dir="${build.dir}/preferences/test"/> - <javac srcdir="preferences/src/test/java" destdir="${build.dir}/preferences/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> + <javac srcdir="src/preferences/src/test/java" destdir="${build.dir}/preferences/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> <path refid="path.class.preferences.app"/> </classpath> <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/preferences/app"> - <fileset dir="preferences/src/main/resources" includes="**/*.properties"/> + <fileset dir="src/preferences/src/main/resources" includes="**/*.properties"/> </copy> </target> <target name="compile-plugin" description="Compiles the plugin module." depends="compile-model,compile-utils"> <mkdir dir="${build.dir}/plugin/app"/> - <javac srcdir="plugin/src/main/java" destdir="${build.dir}/plugin/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> + <javac srcdir="src/plugin/src/main/java" destdir="${build.dir}/plugin/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> <path refid="path.class.model.app"/> <path refid="path.class.utils.app"/> @@ -558,23 +558,23 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/plugin/test"> - <fileset dir="plugin/src/test/resources" includes="**/*.properties"/> + <fileset dir="src/plugin/src/test/resources" includes="**/*.properties"/> </copy> <mkdir dir="${build.dir}/plugin/test"/> - <javac srcdir="plugin/src/test/java" destdir="${build.dir}/plugin/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> + <javac srcdir="src/plugin/src/test/java" destdir="${build.dir}/plugin/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> <path refid="path.class.plugin.app"/> </classpath> <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/plugin/app"> - <fileset dir="plugin/src/main/resources" includes="**/*.properties"/> + <fileset dir="src/plugin/src/main/resources" includes="**/*.properties"/> </copy> </target> <target name="compile-textedit" description="Compiles the textedit module." depends="compile-utils"> <mkdir dir="${build.dir}/textedit/app"/> - <javac srcdir="textedit/src/main/java" destdir="${build.dir}/textedit/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> + <javac srcdir="src/textedit/src/main/java" destdir="${build.dir}/textedit/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> <path refid="path.class.utils.app"/> <path refid="path.lib.annotations"/> @@ -584,10 +584,10 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/textedit/test"> - <fileset dir="textedit/src/test/resources" includes="**/*.properties"/> + <fileset dir="src/textedit/src/test/resources" includes="**/*.properties"/> </copy> <mkdir dir="${build.dir}/textedit/test"/> - <javac srcdir="textedit/src/test/java" destdir="${build.dir}/textedit/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> + <javac srcdir="src/textedit/src/test/java" destdir="${build.dir}/textedit/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> <path refid="path.class.textedit.app"/> <path refid="path.class.utils.test"/> @@ -595,13 +595,13 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/textedit/app"> - <fileset dir="textedit/src/main/resources" includes="**/*.properties"/> + <fileset dir="src/textedit/src/main/resources" includes="**/*.properties"/> </copy> </target> <target name="compile-utils" description="Compiles the utils module."> <mkdir dir="${build.dir}/utils/app"/> - <javac srcdir="utils/src/main/java" destdir="${build.dir}/utils/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> + <javac srcdir="src/utils/src/main/java" destdir="${build.dir}/utils/app" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="${debug}"> <classpath> <path refid="path.lib.annotations"/> <path refid="path.lib.japi-swing-action"/> @@ -612,10 +612,10 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/utils/test"> - <fileset dir="utils/src/test/resources" includes="**/*.properties"/> + <fileset dir="src/utils/src/test/resources" includes="**/*.properties"/> </copy> <mkdir dir="${build.dir}/utils/test"/> - <javac srcdir="utils/src/test/java" destdir="${build.dir}/utils/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> + <javac srcdir="src/utils/src/test/java" destdir="${build.dir}/utils/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> <classpath> <path refid="path.class.utils.app"/> <path refid="path.lib.annotations"/> @@ -627,7 +627,7 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/utils/app"> - <fileset dir="utils/src/main/resources" includes="**/*.properties"/> + <fileset dir="src/utils/src/main/resources" includes="**/*.properties"/> </copy> </target> @@ -635,27 +635,27 @@ <target name="java2html" description="Converts documentation java sources to XHTML."> <taskdef name="java2html" classpath="lib/java2html.jar" classname="de.java2html.anttasks.Java2HtmlTask"/> - <java2html srcdir="gridarta/src/doc" destdir="gridarta/src/doc" includes="**/*.java" outputformat="xhtml11" tabs="4" style="eclipse" addlineanchors="true" includedocumentfooter="true" includedocumentheader="true" lineanchorprefix="line" showdefaulttitle="true" showfilename="true" showlinenumbers="true" showtableborder="true"/> + <java2html srcdir="src/gridarta/src/doc" destdir="src/gridarta/src/doc" includes="**/*.java" outputformat="xhtml11" tabs="4" style="eclipse" addlineanchors="true" includedocumentfooter="true" includedocumentheader="true" lineanchorprefix="line" showdefaulttitle="true" showfilename="true" showlinenumbers="true" showtableborder="true"/> </target> <target name="editorialDoc" description="Creates the editorial part of the project documentation." depends="java2html"> <mkdir dir="${build.dir}/doc"/> - <megaxslt srcdir="gridarta/src/doc" destdir="${build.dir}/doc" includes="**/*.xhtml" validatesource="true" validatedest="true" ending="xhtml" transformerFactoryImplementationClassName="net.sf.saxon.TransformerFactoryImpl"> + <megaxslt srcdir="src/gridarta/src/doc" destdir="${build.dir}/doc" includes="**/*.xhtml" validatesource="true" validatedest="true" ending="xhtml" transformerFactoryImplementationClassName="net.sf.saxon.TransformerFactoryImpl"> <xmlcatalog refid="commonDTDs"/> - <transformation stylesheet="gridarta/src/doc/transform.xslt"/> - <transformation stylesheet="gridarta/src/doc/cleanupXhtml11.xslt"/> + <transformation stylesheet="src/gridarta/src/doc/transform.xslt"/> + <transformation stylesheet="src/gridarta/src/doc/cleanupXhtml11.xslt"/> </megaxslt> <megaxslt srcdir="${build.dir}/doc" destdir="${build.dir}/doc" includes="**/*.xhtml" validatesource="true" validatedest="false" ending="html" converttocanonical="true" transformerFactoryImplementationClassName="net.sf.saxon.TransformerFactoryImpl"> <xmlcatalog refid="commonDTDs"/> - <transformation stylesheet="gridarta/src/doc/xhtml2html.xslt"/> + <transformation stylesheet="src/gridarta/src/doc/xhtml2html.xslt"/> </megaxslt> - <megaxslt srcdir="gridarta/src/doc" destdir="." includes="faq.xhtml" validatesource="true" validatedest="false" ending="" transformerFactoryImplementationClassName="net.sf.saxon.TransformerFactoryImpl"> + <megaxslt srcdir="src/gridarta/src/doc" destdir="." includes="faq.xhtml" validatesource="true" validatedest="false" ending="" transformerFactoryImplementationClassName="net.sf.saxon.TransformerFactoryImpl"> <xmlcatalog refid="commonDTDs"/> - <transformation stylesheet="gridarta/src/doc/faq2txt.xslt"/> + <transformation stylesheet="src/gridarta/src/doc/faq2txt.xslt"/> </megaxslt> <copy file="faq" tofile="FAQ"/> <copy todir="${build.dir}/doc"> - <fileset dir="gridarta/src/doc"> + <fileset dir="src/gridarta/src/doc"> <include name="**/.htaccess"/> <include name="**/*.html"/> <include name="dtd/**/*.mod"/> @@ -672,13 +672,13 @@ <target name="apiDoc" description="Creates public javadoc documentation."> <mkdir dir="${build.dir}/doc/api/${project.version}"/> - <copy todir="${build.dir}/doc/api/${project.version}" file="gridarta/src/doc/copyright.xhtml"/> - <copy todir="${build.dir}/doc/api/${project.version}" file="gridarta/src/doc/dev/api/.htaccess"/> - <javadoc destdir="${build.dir}/doc/api/${project.version}" access="protected" author="yes" version="yes" locale="en_US" use="yes" splitindex="yes" windowtitle="Gridarta API documentation" doctitle="Gridarta<br />Yet another Java API<br />API Documentation" header="Gridarta ${project.version}<br />Yet another Java API<br />API Documentation" footer="Gridarta<br />Yet another Java API<br />API Documentation" bottom="<div style="text-align:center;">© 2005-2006 The Gridarta Developers. All rights reserved. See <a href="{@docRoot}/copyright.xhtml">copyright</a></div>" serialwarn="yes" charset="${build.source.encoding}" docencoding="${build.source.encoding}" source="${build.source.version}" encoding="${build.source.encoding}" linksource="yes" overview="gridarta/src/main/java/overview.html" link="${user.javadoc.link}"> + <copy todir="${build.dir}/doc/api/${project.version}" file="src/gridarta/src/doc/copyright.xhtml"/> + <copy todir="${build.dir}/doc/api/${project.version}" file="src/gridarta/src/doc/dev/api/.htaccess"/> + <javadoc destdir="${build.dir}/doc/api/${project.version}" access="protected" author="yes" version="yes" locale="en_US" use="yes" splitindex="yes" windowtitle="Gridarta API documentation" doctitle="Gridarta<br />Yet another Java API<br />API Documentation" header="Gridarta ${project.version}<br />Yet another Java API<br />API Documentation" footer="Gridarta<br />Yet another Java API<br />API Documentation" bottom="<div style="text-align:center;">© 2005-2006 The Gridarta Developers. All rights reserved. See <a href="{@docRoot}/copyright.xhtml">copyright</a></div>" serialwarn="yes" charset="${build.source.encoding}" docencoding="${build.source.encoding}" source="${build.source.version}" encoding="${build.source.encoding}" linksource="yes" overview="src/gridarta/src/main/java/overview.html" link="${user.javadoc.link}"> <classpath> - <fileset dir="atrinik/lib" includes="*.jar" excludes="*.jar-LICENSE"/> - <fileset dir="daimonin/lib" includes="*.jar" excludes="*.jar-LICENSE"/> - <fileset dir="crossfire/lib" includes="*.jar" excludes="*.jar-LICENSE"/> + <fileset dir="src/atrinik/lib" includes="*.jar" excludes="*.jar-LICENSE"/> + <fileset dir="src/daimonin/lib" includes="*.jar" excludes="*.jar-LICENSE"/> + <fileset dir="src/crossfire/lib" includes="*.jar" excludes="*.jar-LICENSE"/> <fileset dir="lib" includes="*.jar" excludes="*.jar-LICENSE"/> </classpath> <sourcepath> @@ -693,24 +693,24 @@ <path refid="path.class.textedit.test"/> <path refid="path.class.utils.test"/> </sourcepath> - <packageset dir="gridarta/src/main/java" defaultexcludes="yes"/> - <packageset dir="gridarta/src/test/java" defaultexcludes="yes"/> - <packageset dir="atrinik/src/main/java" defaultexcludes="yes"/> - <packageset dir="atrinik/src/test/java" defaultexcludes="yes"/> - <packageset dir="crossfire/src/main/java" defaultexcludes="yes"/> - <packageset dir="crossfire/src/test/java" defaultexcludes="yes"/> - <packageset dir="daimonin/src/main/java" defaultexcludes="yes"/> - <packageset dir="daimonin/src/test/java" defaultexcludes="yes"/> - <packageset dir="model/src/main/java" defaultexcludes="yes"/> - <packageset dir="model/src/test/java" defaultexcludes="yes"/> - <packageset dir="preferences/src/main/java" defaultexcludes="yes"/> - <packageset dir="preferences/src/test/java" defaultexcludes="yes"/> - <packageset dir="plugin/src/main/java" defaultexcludes="yes"/> - <packageset dir="plugin/src/test/java" defaultexcludes="yes"/> - <packageset dir="textedit/src/main/java" defaultexcludes="yes"/> - <packageset dir="textedit/src/test/java" defaultexcludes="yes"/> - <packageset dir="utils/src/main/java" defaultexcludes="yes"/> - <packageset dir="utils/src/test/java" defaultexcludes="yes"/> + <packageset dir="src/gridarta/src/main/java" defaultexcludes="yes"/> + <packageset dir="src/gridarta/src/test/java" defaultexcludes="yes"/> + <packageset dir="src/atrinik/src/main/java" defaultexcludes="yes"/> + <packageset dir="src/atrinik/src/test/java" defaultexcludes="yes"/> + <packageset dir="src/crossfire/src/main/java" defaultexcludes="yes"/> + <packageset dir="src/crossfire/src/test/java" defaultexcludes="yes"/> + <packageset dir="src/daimonin/src/main/java" defaultexcludes="yes"/> + <packageset dir="src/daimonin/src/test/java" defaultexcludes="yes"/> + <packageset dir="src/model/src/main/java" defaultexcludes="yes"/> + <packageset dir="src/model/src/test/java" defaultexcludes="yes"/> + <packageset dir="src/preferences/src/main/java" defaultexcludes="yes"/> + <packageset dir="src/preferences/src/test/java" defaultexcludes="yes"/> + <packageset dir="src/plugin/src/main/java" defaultexcludes="yes"/> + <packageset dir="src/plugin/src/test/java" defaultexcludes="yes"/> + <packageset dir="src/textedit/src/main/java" defaultexcludes="yes"/> + <packageset dir="src/textedit/src/test/java" defaultexcludes="yes"/> + <packageset dir="src/utils/src/main/java" defaultexcludes="yes"/> + <packageset dir="src/utils/src/test/java" defaultexcludes="yes"/> <tag name="todo" description="Todo:"/> <tag name="used" description="Manually marked as used." enabled="false"/> <tag name="fixme" description="Fixme:"/> @@ -734,19 +734,19 @@ <parallel> <tar tarfile="${distSrc}.tar"> <tarfileset dir="." prefix="gridarta-${project.version}"> - <include name="gridarta/src/**"/> + <include name="src/gridarta/src/**"/> <include name="build.xml"/> </tarfileset> </tar> <zip destfile="${distSrc}.zip"> <zipfileset dir="." prefix="gridarta-${project.version}"> - <include name="gridarta/src/**"/> + <include name="src/gridarta/src/**"/> <include name="build.xml"/> </zipfileset> </zip> <jar destfile="${distSrc}.jar"> <zipfileset dir="." prefix="gridarta-${project.version}"> - <include name="gridarta/src/**"/> + <include name="src/gridarta/src/**"/> <include name="build.xml"/> </zipfileset> </jar> @@ -809,14 +809,14 @@ </target> <target name="releaseDist" description="Uploads distribution archives to sourceforge." if="developer.email" depends="checkDevMail, dist"> - <touch file="gridarta/src/doc/api/start.xhtml" millis="0"/> - <megaxslt srcdir="gridarta/src/doc/api" destdir="gridarta/src/doc/api" includes="start.xhtml" validatesource="true" validatedest="true" ending="xhtml" converttocanonical="true" checktimestamps="true"> + <touch file="src/gridarta/src/doc/api/start.xhtml" millis="0"/> + <megaxslt srcdir="src/gridarta/src/doc/api" destdir="src/gridarta/src/doc/api" includes="start.xhtml" validatesource="true" validatedest="true" ending="xhtml" converttocanonical="true" checktimestamps="true"> <xmlcatalog refid="commonDTDs"/> <parameter name="project.version" value="${project.version}"/> - <transformation stylesheet="gridarta/src/doc/api/release.xslt"/> + <transformation stylesheet="src/gridarta/src/doc/api/release.xslt"/> </megaxslt> <svn javahl="${user.svn.javahl}"> - <commit file="gridarta/src/doc/api/start.xhtml" message="Updating API link to include ${project.version}."/> + <commit file="src/gridarta/src/doc/api/start.xhtml" message="Updating API link to include ${project.version}."/> </svn> <exec executable="rsync" failonerror="true"> <arg line="-auzv -e ssh ${build.dir}/doc/api/ ${user.rsync.username}@${user.rsync.host}:${user.rsync.dir}/htdocs/api/"/> @@ -877,27 +877,27 @@ <target name="checkstyle" description="Runs checkstyle to style-check the source code"> <taskdef resource="checkstyletask.properties" classpath="lib/checkstyle-all-5.0.jar"/> <mkdir dir="${build.dir}/doc"/> - <checkstyle config="gridarta/src/checkstyle.xml" failOnViolation="true"> + <checkstyle config="src/gridarta/src/checkstyle.xml" failOnViolation="true"> <formatter type="plain" tofile="${build.dir}/doc/checkstyle_report.txt"/> <formatter type="plain"/> - <fileset dir="gridarta/src/main/java" includes="**/*.java"/> - <fileset dir="gridarta/src/test/java" includes="**/*.java"/> - <fileset dir="atrinik/src/main/java" includes="**/*.java"/> - <fileset dir="atrinik/src/test/java" includes="**/*.java"/> - <fileset dir="crossfire/src/main/java" includes="**/*.java"/> - <fileset dir="crossfire/src/test/java" includes="**/*.java"/> - <fileset dir="daimonin/src/main/java" includes="**/*.java"/> - <fileset dir="daimonin/src/test/java" includes="**/*.java"/> - <fileset dir="model/src/main/java" includes="**/*.java"/> - <fileset dir="model/src/test/java" includes="**/*.java"/> - <fileset dir="preferences/src/main/java" includes="**/*.java"/> - <fileset dir="preferences/src/test/java" includes="**/*.java"/> - <fileset dir="plugin/src/main/java" includes="**/*.java"/> - <fileset dir="plugin/src/test/java" includes="**/*.java"/> - <fileset dir="textedit/src/main/java" includes="**/*.java"/> - <fileset dir="textedit/src/test/java" includes="**/*.java"/> - <fileset dir="utils/src/main/java" includes="**/*.java"/> - <fileset dir="utils/src/test/java" includes="**/*.java"/> + <fileset dir="src/gridarta/src/main/java" includes="**/*.java"/> + <fileset dir="src/gridarta/src/test/java" includes="**/*.java"/> + <fileset dir="src/atrinik/src/main/java" includes="**/*.java"/> + <fileset dir="src/atrinik/src/test/java" includes="**/*.java"/> + <fileset dir="src/crossfire/src/main/java" includes="**/*.java"/> + <fileset dir="src/crossfire/src/test/java" includes="**/*.java"/> + <fileset dir="src/daimonin/src/main/java" includes="**/*.java"/> + <fileset dir="src/daimonin/src/test/java" includes="**/*.java"/> + <fileset dir="src/model/src/main/java" includes="**/*.java"/> + <fileset dir="src/model/src/test/java" includes="**/*.java"/> + <fileset dir="src/preferences/src/main/java" includes="**/*.java"/> + <fileset dir="src/preferences/src/test/java" includes="**/*.java"/> + <fileset dir="src/plugin/src/main/java" includes="**/*.java"/> + <fileset dir="src/plugin/src/test/java" includes="**/*.java"/> + <fileset dir="src/textedit/src/main/java" includes="**/*.java"/> + <fileset dir="src/textedit/src/test/java" includes="**/*.java"/> + <fileset dir="src/utils/src/main/java" includes="**/*.java"/> + <fileset dir="src/utils/src/test/java" includes="**/*.java"/> </checkstyle> </target> @@ -906,22 +906,22 @@ </target> <target name="changelog" description="Updates the changelog"> - <exec executable="svn" output="gridarta/src/doc/dev/changelog.xml"> + <exec executable="svn" output="src/gridarta/src/doc/dev/changelog.xml"> <arg line="log -v --xml"/> </exec> - <megaxslt srcdir="gridarta/src/doc/dev" destdir="gridarta/src/doc/dev" includes="changelog.xml" validatesource="false" validatedest="false" ending="xhtml" converttocanonical="true" transformerFactoryImplementationClassName="net.sf.saxon.TransformerFactoryImpl"> + <megaxslt srcdir="src/gridarta/src/doc/dev" destdir="src/gridarta/src/doc/dev" includes="changelog.xml" validatesource="false" validatedest="false" ending="xhtml" converttocanonical="true" transformerFactoryImplementationClassName="net.sf.saxon.TransformerFactoryImpl"> <xmlcatalog refid="commonDTDs"/> - <transformation stylesheet="gridarta/src/doc/dev/changelog.xslt"/> + <transformation stylesheet="src/gridarta/src/doc/dev/changelog.xslt"/> </megaxslt> </target> <target name="javadoc" depends="init-properties" description="Creates the JavaDoc documentation for the complete editor source."> <mkdir dir="${build.dir}/doc/dev/api"/> - <javadoc destdir="${build.dir}/doc/dev/api" locale="en_US" version="yes" author="yes" use="yes" splitindex="yes" windowtitle="Gridarta — API Documentation" doctitle="Gridarta ${build.number}<br />API Documentation" header="Gridarta ${build.number}<br />API Documentation" footer="Gridarta ${build.number}<br />API Documentation" serialwarn="no" charset="utf-8" docencoding="utf-8" source="${build.source.version}" encoding="${build.source.encoding}" linksource="yes" private="yes" overview="gridarta/src/main/java/overview.html" link="${user.javadoc.link}"> + <javadoc destdir="${build.dir}/doc/dev/api" locale="en_US" version="yes" author="yes" use="yes" splitindex="yes" windowtitle="Gridarta — API Documentation" doctitle="Gridarta ${build.number}<br />API Documentation" header="Gridarta ${build.number}<br />API Documentation" footer="Gridarta ${build.number}<br />API Documentation" serialwarn="no" charset="utf-8" docencoding="utf-8" source="${build.source.version}" encoding="${build.source.encoding}" linksource="yes" private="yes" overview="src/gridarta/src/main/java/overview.html" link="${user.javadoc.link}"> <classpath> - <fileset dir="atrinik/lib" includes="*.jar" excludes="*.jar-LICENSE"/> - <fileset dir="daimonin/lib" includes="*.jar" excludes="*.jar-LICENSE"/> - <fileset dir="crossfire/lib" includes="*.jar" excludes="*.jar-LICENSE"/> + <fileset dir="src/atrinik/lib" includes="*.jar" excludes="*.jar-LICENSE"/> + <fileset dir="src/daimonin/lib" includes="*.jar" excludes="*.jar-LICENSE"/> + <fileset dir="src/crossfire/lib" includes="*.jar" excludes="*.jar-LICENSE"/> <fileset dir="lib" includes="*.jar" excludes="*.jar-LICENSE"/> </classpath> <sourcepath> @@ -936,24 +936,24 @@ <path refid="path.class.textedit.test"/> <path refid="path.class.utils.test"/> </sourcepath> - <packageset dir="gridarta/src/main/java" defaultexcludes="yes"/> - <packageset dir="gridarta/src/test/java" defaultexcludes="yes"/> - <packageset dir="atrinik/src/main/java" defaultexcludes="yes"/> - <packageset dir="atrinik/src/test/java" defaultexcludes="yes"/> - <packageset dir="crossfire/src/main/java" defaultexcludes="yes"/> - <packageset dir="crossfire/src/test/java" defaultexcludes="yes"/> - <packageset dir="daimonin/src/main/java" defaultexcludes="yes"/> - <packageset dir="daimonin/src/test/java" defaultexcludes="yes"/> - <packageset dir="model/src/main/java" defaultexcludes="yes"/> - <packageset dir="model/src/test/java" defaultexcludes="yes"/> - <packageset dir="preferences/src/main/java" defaultexcludes="yes"/> - <packageset dir="preferences/src/test/java" defaultexcludes="yes"/> - <packageset dir="plugin/src/main/java" defaultexcludes="yes"/> - <packageset dir="plugin/src/test/java" defaultexcludes="yes"/> - <packageset dir="textedit/src/main/java" defaultexcludes="yes"/> - <packageset dir="textedit/src/test/java" defaultexcludes="yes"/> - <packageset dir="utils/src/main/java" defaultexcludes="yes"/> - <packageset dir="utils/src/test/java" defaultexcludes="yes"/> + <packageset dir="src/gridarta/src/main/java" defaultexcludes="yes"/> + <packageset dir="src/gridarta/src/test/java" defaultexcludes="yes"/> + <packageset dir="src/atrinik/src/main/java" defaultexcludes="yes"/> + <packageset dir="src/atrinik/src/test/java" defaultexcludes="yes"/> + <packageset dir="src/crossfire/src/main/java" defaultexcludes="yes"/> + <packageset dir="src/crossfire/src/test/java" defaultexcludes="yes"/> + <packageset dir="src/daimonin/src/main/java" defaultexcludes="yes"/> + <packageset dir="src/daimonin/src/test/java" defaultexcludes="yes"/> + <packageset dir="src/model/src/main/java" defaultexcludes="yes"/> + <packageset dir="src/model/src/test/java" defaultexcludes="yes"/> + <packageset dir="src/preferences/src/main/java" defaultexcludes="yes"/> + <packageset dir="src/preferences/src/test/java" defaultexcludes="yes"/> + <packageset dir="src/plugin/src/main/java" defaultexcludes="yes"/> + <packageset dir="src/plugin/src/test/java" defaultexcludes="yes"/> + <packageset dir="src/textedit/src/main/java" defaultexcludes="yes"/> + <packageset dir="src/textedit/src/test/java" defaultexcludes="yes"/> + <packageset dir="src/utils/src/main/java" defaultexcludes="yes"/> + <packageset dir="src/utils/src/test/java" defaultexcludes="yes"/> <bottom> <![CDATA[<address> <a href="http://sourceforge.net/"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=166996&type=1" alt="SourceForge.net Logo" width="88" height="31" class="now" /></a> @@ -1073,7 +1073,7 @@ <path refid="path.lib.japi-swing-action"/> <path refid="path.lib.junit"/> <path refid="path.lib.log4j"/> - <pathelement location="gridarta/resource"/> + <pathelement location="src/gridarta/resource"/> </classpath> <formatter type="plain"/> <formatter type="xml"/> @@ -1097,7 +1097,7 @@ <path refid="path.lib.japi-xml"/> <path refid="path.lib.junit"/> <path refid="path.lib.log4j"/> - <pathelement location="gridarta/resource"/> + <pathelement location="src/gridarta/resource"/> </classpath> <formatter type="plain"/> <formatter type="xml"/> Modified: trunk/gridarta.ipr =================================================================== --- trunk/gridarta.ipr 2013-05-28 20:00:26 UTC (rev 9237) +++ trunk/gridarta.ipr 2013-05-28 20:09:22 UTC (rev 9238) @@ -2170,15 +2170,15 @@ </component> <component name="ProjectModuleManager"> <modules> - <module fileurl="file://$PROJECT_DIR$/atrinik/atrinik.iml" filepath="$PROJECT_DIR$/atrinik/atrinik.iml" /> - <module fileurl="file://$PROJECT_DIR$/crossfire/crossfire.iml" filepath="$PROJECT_DIR$/crossfire/crossfire.iml" /> - <module fileurl="file://$PROJECT_DIR$/daimonin/daimonin.iml" filepath="$PROJECT_DIR$/daimonin/daimonin.iml" /> - <module fileurl="file://$PROJECT_DIR$/gridarta/gridarta.iml" filepath="$PROJECT_DIR$/gridarta/gridarta.iml" /> - <module fileurl="file://$PROJECT_DIR$/model/model.iml" filepath="$PROJECT_DIR$/model/model.iml" /> - <module fileurl="file://$PROJECT_DIR$/plugin/plugin.iml" filepath="$PROJECT_DIR$/plugin/plugin.iml" /> - <module fileurl="file://$PROJECT_DIR$/preferences/preferences.iml" filepath="$PROJECT_DIR$/preferences/preferences.iml" /> - <module fileurl="file://$PROJECT_DIR$/textedit/textedit.iml" filepath="$PROJECT_DIR$/textedit/textedit.iml" /> - <module fileurl="file://$PROJECT_DIR$/utils/utils.iml" filepath="$PROJECT_DIR$/utils/utils.iml" /> + <module fileurl="file://$PROJECT_DIR$/src/atrinik/atrinik.iml" filepath="$PROJECT_DIR$/src/atrinik/atrinik.iml" /> + <module fileurl="file://$PROJECT_DIR$/src/crossfire/crossfire.iml" filepath="$PROJECT_DIR$/src/crossfire/crossfire.iml" /> + <module fileurl="file://$PROJECT_DIR$/src/daimonin/daimonin.iml" filepath="$PROJECT_DIR$/src/daimonin/daimonin.iml" /> + <module fileurl="file://$PROJECT_DIR$/src/gridarta/gridarta.iml" filepath="$PROJECT_DIR$/src/gridarta/gridarta.iml" /> + <module fileurl="file://$PROJECT_DIR$/src/model/model.iml" filepath="$PROJECT_DIR$/src/model/model.iml" /> + <module fileurl="file://$PROJECT_DIR$/src/plugin/plugin.iml" filepath="$PROJECT_DIR$/src/plugin/plugin.iml" /> + <module fileurl="file://$PROJECT_DIR$/src/preferences/preferences.iml" filepath="$PROJECT_DIR$/src/preferences/preferences.iml" /> + <module fileurl="file://$PROJECT_DIR$/src/textedit/textedit.iml" filepath="$PROJECT_DIR$/src/textedit/textedit.iml" /> + <module fileurl="file://$PROJECT_DIR$/src/utils/utils.iml" filepath="$PROJECT_DIR$/src/utils/utils.iml" /> </modules> </component> <component name="ProjectResources"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2013-05-28 21:57:33
|
Revision: 9239 http://sourceforge.net/p/gridarta/code/9239 Author: akirschbaum Date: 2013-05-28 21:57:28 +0000 (Tue, 28 May 2013) Log Message: ----------- Move resource files into resources directories. Modified Paths: -------------- trunk/build.xml trunk/gridarta.ipr trunk/src/atrinik/atrinik.iml trunk/src/atrinik/src/main/resources/HelpFiles/tut_DScript.html trunk/src/crossfire/crossfire.iml trunk/src/crossfire/src/main/resources/resource/HelpFiles/tut_map.html trunk/src/crossfire/src/main/resources/resource/HelpFiles/tut_mapattr.html trunk/src/daimonin/daimonin.iml trunk/src/daimonin/src/main/resources/HelpFiles/tut_DScript.html trunk/src/gridarta/gridarta.iml Added Paths: ----------- trunk/src/atrinik/src/main/resources/HelpFiles/ trunk/src/atrinik/src/main/resources/icons/ trunk/src/atrinik/src/main/resources/system/ trunk/src/crossfire/src/main/resources/gridarta-crossfire.png trunk/src/crossfire/src/main/resources/icons/ trunk/src/crossfire/src/main/resources/resource/ trunk/src/crossfire/src/main/resources/system/ trunk/src/daimonin/src/main/resources/HelpFiles/ trunk/src/daimonin/src/main/resources/icons/ trunk/src/daimonin/src/main/resources/system/ trunk/src/gridarta/src/main/resources/icons/ trunk/src/gridarta/src/main/resources/log4j.properties trunk/src/gridarta/src/main/resources/misc/ trunk/src/model/src/main/resources/system/ trunk/src/model/src/main/resources/system/dtd/ Removed Paths: ------------- trunk/src/atrinik/resource/ trunk/src/crossfire/resource/ trunk/src/daimonin/resource/ trunk/src/gridarta/resource/ Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2013-05-28 20:09:22 UTC (rev 9238) +++ trunk/build.xml 2013-05-28 21:57:28 UTC (rev 9239) @@ -60,77 +60,92 @@ <path id="path.class.atrinik.app"> <pathelement location="${build.dir}/atrinik/app"/> - <pathelement location="src/atrinik/resource"/> + <pathelement location="src/atrinik/src/main/resources"/> </path> <path id="path.class.atrinik.test"> <path refid="path.class.atrinik.app"/> <pathelement location="${build.dir}/atrinik/test"/> + <pathelement location="src/atrinik/src/test/resources"/> </path> <path id="path.class.crossfire.app"> <pathelement location="${build.dir}/crossfire/app"/> - <pathelement location="src/crossfire/resource"/> + <pathelement location="src/crossfire/src/main/resources"/> </path> <path id="path.class.crossfire.test"> <path refid="path.class.crossfire.app"/> <pathelement location="${build.dir}/crossfire/test"/> + <pathelement location="src/crossfire/src/test/resources"/> </path> <path id="path.class.daimonin.app"> <pathelement location="${build.dir}/daimonin/app"/> - <pathelement location="src/daimonin/resource"/> + <pathelement location="src/daimonin/src/main/resources"/> </path> <path id="path.class.daimonin.test"> <path refid="path.class.daimonin.app"/> <pathelement location="${build.dir}/daimonin/test"/> + <pathelement location="src/daimonin/src/test/resources"/> </path> <path id="path.class.gridarta.app"> <pathelement location="${build.dir}/gridarta/app"/> + <pathelement location="src/gridarta/src/main/resources"/> </path> <path id="path.class.gridarta.test"> <path refid="path.class.gridarta.app"/> <pathelement location="${build.dir}/gridarta/test"/> + <pathelement location="src/gridarta/src/test/resources"/> </path> <path id="path.class.model.app"> <pathelement location="${build.dir}/model/app"/> + <pathelement location="src/model/src/main/resources"/> </path> <path id="path.class.model.test"> <path refid="path.class.model.app"/> <pathelement location="${build.dir}/model/test"/> + <pathelement location="src/model/src/test/resources"/> </path> <path id="path.class.preferences.app"> <pathelement location="${build.dir}/preferences/app"/> + <pathelement location="src/preferences/src/main/resources"/> </path> <path id="path.class.preferences.test"> <path refid="path.class.preferences.app"/> <pathelement location="${build.dir}/preferences/test"/> + <pathelement location="src/preferences/src/test/resources"/> </path> <path id="path.class.plugin.app"> <pathelement location="${build.dir}/plugin/app"/> + <pathelement location="src/plugin/src/main/resources"/> </path> <path id="path.class.plugin.test"> <path refid="path.class.plugin.app"/> <pathelement location="${build.dir}/plugin/test"/> + <pathelement location="src/plugin/src/test/resources"/> </path> <path id="path.class.textedit.app"> <pathelement location="${build.dir}/textedit/app"/> + <pathelement location="src/textedit/src/main/resources"/> </path> <path id="path.class.textedit.test"> <path refid="path.class.textedit.app"/> <pathelement location="${build.dir}/textedit/test"/> + <pathelement location="src/textedit/src/test/resources"/> </path> <path id="path.class.utils.app"> <pathelement location="${build.dir}/utils/app"/> + <pathelement location="src/utils/src/main/resources"/> </path> <path id="path.class.utils.test"> <path refid="path.class.utils.app"/> <pathelement location="${build.dir}/utils/test"/> + <pathelement location="src/utils/src/test/resources"/> </path> <path id="path.lib.annotations" location="lib/annotations.jar"/> @@ -211,8 +226,13 @@ <include name="log4j-1.2.13.jar-LICENSE"/> <include name="rsyntaxtextarea-1.5.1.jar-LICENSE"/> </fileset> - <fileset dir="src/gridarta/resource"/> - <fileset dir="src/atrinik/resource"/> + <fileset dir="src/atrinik/src/main/resources"/> + <fileset dir="src/gridarta/src/main/resources"/> + <fileset dir="src/model/src/main/resources"/> + <fileset dir="src/preferences/src/main/resources"/> + <fileset dir="src/plugin/src/main/resources"/> + <fileset dir="src/textedit/src/main/resources"/> + <fileset dir="src/utils/src/main/resources"/> <zipfileset src="lib/bsh-classgen-2.0b4.jar" excludes="META-INF/**"/> <zipfileset src="lib/bsh-commands-2.0b4.jar" excludes="META-INF/**"/> <zipfileset src="lib/bsh-core-2.0b4.jar" excludes="META-INF/**"/> @@ -251,8 +271,13 @@ <include name="log4j-1.2.13.jar-LICENSE"/> <include name="rsyntaxtextarea-1.5.1.jar-LICENSE"/> </fileset> - <fileset dir="src/gridarta/resource"/> - <fileset dir="src/crossfire/resource"/> + <fileset dir="src/crossfire/src/main/resources"/> + <fileset dir="src/gridarta/src/main/resources"/> + <fileset dir="src/model/src/main/resources"/> + <fileset dir="src/preferences/src/main/resources"/> + <fileset dir="src/plugin/src/main/resources"/> + <fileset dir="src/textedit/src/main/resources"/> + <fileset dir="src/utils/src/main/resources"/> <zipfileset src="lib/bsh-classgen-2.0b4.jar" excludes="META-INF/**"/> <zipfileset src="lib/bsh-commands-2.0b4.jar" excludes="META-INF/**"/> <zipfileset src="lib/bsh-core-2.0b4.jar" excludes="META-INF/**"/> @@ -291,8 +316,13 @@ <include name="log4j-1.2.13.jar-LICENSE"/> <include name="rsyntaxtextarea-1.5.1.jar-LICENSE"/> </fileset> - <fileset dir="src/gridarta/resource"/> - <fileset dir="src/daimonin/resource"/> + <fileset dir="src/daimonin/src/main/resources"/> + <fileset dir="src/gridarta/src/main/resources"/> + <fileset dir="src/model/src/main/resources"/> + <fileset dir="src/preferences/src/main/resources"/> + <fileset dir="src/plugin/src/main/resources"/> + <fileset dir="src/textedit/src/main/resources"/> + <fileset dir="src/utils/src/main/resources"/> <zipfileset src="lib/bsh-classgen-2.0b4.jar" excludes="META-INF/**"/> <zipfileset src="lib/bsh-commands-2.0b4.jar" excludes="META-INF/**"/> <zipfileset src="lib/bsh-core-2.0b4.jar" excludes="META-INF/**"/> @@ -342,7 +372,7 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/atrinik/app"> - <fileset dir="src/atrinik/src/main/resources" includes="**/*.properties"/> + <fileset dir="src/atrinik/src/main/resources"/> </copy> <mkdir dir="${build.dir}/atrinik/test"/> <javac srcdir="src/atrinik/src/test/java" destdir="${build.dir}/atrinik/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> @@ -379,7 +409,7 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/crossfire/app"> - <fileset dir="src/crossfire/src/main/resources" includes="**/*.properties"/> + <fileset dir="src/crossfire/src/main/resources"/> </copy> <mkdir dir="${build.dir}/crossfire/test"/> <javac srcdir="src/crossfire/src/test/java" destdir="${build.dir}/crossfire/test" encoding="${build.source.encoding}" source="${build.source.version}" target="${build.target.version}" includeantruntime="false" debug="yes"> @@ -430,7 +460,7 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/daimonin/app"> - <fileset dir="src/daimonin/src/main/resources" includes="**/*.properties"/> + <fileset dir="src/daimonin/src/main/resources"/> </copy> </target> @@ -477,7 +507,7 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/gridarta/app"> - <fileset dir="src/gridarta/src/main/resources" includes="**/*.properties,cfpython_menu.def"/> + <fileset dir="src/gridarta/src/main/resources"/> </copy> </target> @@ -514,7 +544,7 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/model/app"> - <fileset dir="src/model/src/main/resources" includes="**/*.properties"/> + <fileset dir="src/model/src/main/resources"/> </copy> </target> @@ -539,7 +569,7 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/preferences/app"> - <fileset dir="src/preferences/src/main/resources" includes="**/*.properties"/> + <fileset dir="src/preferences/src/main/resources"/> </copy> </target> @@ -568,7 +598,7 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/plugin/app"> - <fileset dir="src/plugin/src/main/resources" includes="**/*.properties"/> + <fileset dir="src/plugin/src/main/resources"/> </copy> </target> @@ -595,7 +625,7 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/textedit/app"> - <fileset dir="src/textedit/src/main/resources" includes="**/*.properties"/> + <fileset dir="src/textedit/src/main/resources"/> </copy> </target> @@ -627,7 +657,7 @@ <compilerarg line="${javac.args}"/> </javac> <copy todir="${build.dir}/utils/app"> - <fileset dir="src/utils/src/main/resources" includes="**/*.properties"/> + <fileset dir="src/utils/src/main/resources"/> </copy> </target> @@ -1073,7 +1103,6 @@ <path refid="path.lib.japi-swing-action"/> <path refid="path.lib.junit"/> <path refid="path.lib.log4j"/> - <pathelement location="src/gridarta/resource"/> </classpath> <formatter type="plain"/> <formatter type="xml"/> @@ -1097,7 +1126,6 @@ <path refid="path.lib.japi-xml"/> <path refid="path.lib.junit"/> <path refid="path.lib.log4j"/> - <pathelement location="src/gridarta/resource"/> </classpath> <formatter type="plain"/> <formatter type="xml"/> Modified: trunk/gridarta.ipr =================================================================== --- trunk/gridarta.ipr 2013-05-28 20:09:22 UTC (rev 9238) +++ trunk/gridarta.ipr 2013-05-28 21:57:28 UTC (rev 9239) @@ -1328,7 +1328,11 @@ <option name="myDefaultNotNull" value="org.jetbrains.annotations.NotNull" /> <option name="myNullables"> <value> - <list size="0" /> + <list size="3"> + <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" /> + <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" /> + <item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" /> + </list> </value> </option> <option name="myNotNulls"> Modified: trunk/src/atrinik/atrinik.iml =================================================================== --- trunk/src/atrinik/atrinik.iml 2013-05-28 20:09:22 UTC (rev 9238) +++ trunk/src/atrinik/atrinik.iml 2013-05-28 21:57:28 UTC (rev 9239) @@ -3,12 +3,10 @@ <component name="NewModuleRootManager" inherit-compiler-output="true"> <exclude-output /> <content url="file://$MODULE_DIR$"> - <sourceFolder url="file://$MODULE_DIR$/resource" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" /> - <excludeFolder url="file://$MODULE_DIR$/class" /> </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> Modified: trunk/src/atrinik/src/main/resources/HelpFiles/tut_DScript.html =================================================================== --- trunk/src/atrinik/resource/resource/HelpFiles/tut_DScript.html 2013-05-28 20:09:22 UTC (rev 9238) +++ trunk/src/atrinik/src/main/resources/HelpFiles/tut_DScript.html 2013-05-28 21:57:28 UTC (rev 9239) @@ -34,15 +34,15 @@ <H1 align=center><font size="+1">There are three different types or groups of Daimonin Scripting Commands. They are:</font></H1> -<H1 align=center><font color="#000000" size="+2"><strong><a href="#DFunc">Daimonin - Functions</a>, <a href="#MMeth">Map Methods</a> & <a href="#OMeth">Object +<H1 align=center><font color="#000000" size="+2"><strong><a href="tut_DScript.html#DFunc">Daimonin + Functions</a>, <a href="tut_DScript.html#MMeth">Map Methods</a> & <a href="tut_DScript.html#OMeth">Object Methods</a></strong></font></H1> <H1 align=center><font color="#000000" size="+1">Click on one of the above topics to be taken to that subject.</font></H1> <P><strong><font size="+2">Daimonin Functions:<a name="DFunc"></a> -</font></strong><a href="#DSC">back to the top</a></P> +</font></strong><a href="tut_DScript.html#DSC">back to the top</a></P> <P>LoadObject <br> @@ -346,7 +346,7 @@ <p> </p> <p><strong><font size="+2">Map Methods<a name="MMeth"></a> -</font></strong><a href="#DSC">back to the top</a></p> +</font></strong><a href="tut_DScript.html#DSC">back to the top</a></p> <p>GetFirstObjectOnSquare <br> @@ -476,7 +476,7 @@ <p></p> <p><font size="+2"><strong>Object Methods<a name="OMeth"></a> -</strong></font><a href="#DSC">back to the top</a></p> +</strong></font><a href="tut_DScript.html#DSC">back to the top</a></p> <p>GetSkill <br> Modified: trunk/src/crossfire/crossfire.iml =================================================================== --- trunk/src/crossfire/crossfire.iml 2013-05-28 20:09:22 UTC (rev 9238) +++ trunk/src/crossfire/crossfire.iml 2013-05-28 21:57:28 UTC (rev 9239) @@ -3,13 +3,10 @@ <component name="NewModuleRootManager" inherit-compiler-output="true"> <exclude-output /> <content url="file://$MODULE_DIR$"> - <sourceFolder url="file://$MODULE_DIR$/resource" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" /> - <excludeFolder url="file://$MODULE_DIR$/class" /> - <excludeFolder url="file://$MODULE_DIR$/classes" /> </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> Copied: trunk/src/crossfire/src/main/resources/gridarta-crossfire.png (from rev 9238, trunk/src/crossfire/resource/gridarta-crossfire.png) =================================================================== (Binary files differ) Index: trunk/src/crossfire/src/main/resources/gridarta-crossfire.png =================================================================== --- trunk/src/crossfire/resource/gridarta-crossfire.png 2013-05-28 20:09:22 UTC (rev 9238) +++ trunk/src/crossfire/src/main/resources/gridarta-crossfire.png 2013-05-28 21:57:28 UTC (rev 9239) Property changes on: trunk/src/crossfire/src/main/resources/gridarta-crossfire.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +image/png \ No newline at end of property Modified: trunk/src/crossfire/src/main/resources/resource/HelpFiles/tut_map.html =================================================================== --- trunk/src/crossfire/resource/resource/HelpFiles/tut_map.html 2013-05-28 20:09:22 UTC (rev 9238) +++ trunk/src/crossfire/src/main/resources/resource/HelpFiles/tut_map.html 2013-05-28 21:57:28 UTC (rev 9239) @@ -33,9 +33,9 @@ the following actions with your mouse:</p> <ul> - <li>left mouse button: <a href="#select">select game object(s)</a> - <li>right mouse button: <a href="#insert">insert an game object</a> - <li>middle mouse button: <a href="#delete">delete an game object</a> + <li>left mouse button: <a href="tut_map.html#select">select game object(s)</a> + <li>right mouse button: <a href="tut_map.html#insert">insert an game object</a> + <li>middle mouse button: <a href="tut_map.html#delete">delete an game object</a> </ul> <h2><a name="select">Selecting game object</a></h2> Modified: trunk/src/crossfire/src/main/resources/resource/HelpFiles/tut_mapattr.html =================================================================== --- trunk/src/crossfire/resource/resource/HelpFiles/tut_mapattr.html 2013-05-28 20:09:22 UTC (rev 9238) +++ trunk/src/crossfire/src/main/resources/resource/HelpFiles/tut_mapattr.html 2013-05-28 21:57:28 UTC (rev 9239) @@ -59,7 +59,7 @@ <p><b>Fixed reset:</b> If enabled, the map reset countdown will not start over when someone enters the map. Thus, once the map has been loaded, it will - reset in after <a href="#parameters">"Reset Timeout"</a> seconds, no matter + reset in after <a href="tut_mapattr.html#parameters">"Reset Timeout"</a> seconds, no matter what access happens. This is very useful for shops and towns which are constantly accessed, but should be reset periodically.</p> Modified: trunk/src/daimonin/daimonin.iml =================================================================== --- trunk/src/daimonin/daimonin.iml 2013-05-28 20:09:22 UTC (rev 9238) +++ trunk/src/daimonin/daimonin.iml 2013-05-28 21:57:28 UTC (rev 9239) @@ -3,12 +3,10 @@ <component name="NewModuleRootManager" inherit-compiler-output="true"> <exclude-output /> <content url="file://$MODULE_DIR$"> - <sourceFolder url="file://$MODULE_DIR$/resource" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" /> - <excludeFolder url="file://$MODULE_DIR$/class" /> </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> Modified: trunk/src/daimonin/src/main/resources/HelpFiles/tut_DScript.html =================================================================== --- trunk/src/daimonin/resource/resource/HelpFiles/tut_DScript.html 2013-05-28 20:09:22 UTC (rev 9238) +++ trunk/src/daimonin/src/main/resources/HelpFiles/tut_DScript.html 2013-05-28 21:57:28 UTC (rev 9239) @@ -34,15 +34,15 @@ <H1 align=center><font size="+1">There are three different types or groups of Daimonin Scripting Commands. They are:</font></H1> -<H1 align=center><font color="#000000" size="+2"><strong><a href="#DFunc">Daimonin - Functions</a>, <a href="#MMeth">Map Methods</a> & <a href="#OMeth">Object +<H1 align=center><font color="#000000" size="+2"><strong><a href="tut_DScript.html#DFunc">Daimonin + Functions</a>, <a href="tut_DScript.html#MMeth">Map Methods</a> & <a href="tut_DScript.html#OMeth">Object Methods</a></strong></font></H1> <H1 align=center><font color="#000000" size="+1">Click on one of the above topics to be taken to that subject.</font></H1> <P><strong><font size="+2">Daimonin Functions:<a name="DFunc"></a> -</font></strong><a href="#DSC">back to the top</a></P> +</font></strong><a href="tut_DScript.html#DSC">back to the top</a></P> <P>LoadObject <br> @@ -346,7 +346,7 @@ <p> </p> <p><strong><font size="+2">Map Methods<a name="MMeth"></a> -</font></strong><a href="#DSC">back to the top</a></p> +</font></strong><a href="tut_DScript.html#DSC">back to the top</a></p> <p>GetFirstObjectOnSquare <br> @@ -476,7 +476,7 @@ <p></p> <p><font size="+2"><strong>Object Methods<a name="OMeth"></a> -</strong></font><a href="#DSC">back to the top</a></p> +</strong></font><a href="tut_DScript.html#DSC">back to the top</a></p> <p>GetSkill <br> Modified: trunk/src/gridarta/gridarta.iml =================================================================== --- trunk/src/gridarta/gridarta.iml 2013-05-28 20:09:22 UTC (rev 9238) +++ trunk/src/gridarta/gridarta.iml 2013-05-28 21:57:28 UTC (rev 9239) @@ -2,7 +2,6 @@ <module type="JAVA_MODULE" version="4"> <component name="NewModuleRootManager" inherit-compiler-output="true"> <content url="file://$MODULE_DIR$"> - <sourceFolder url="file://$MODULE_DIR$/resource" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> Copied: trunk/src/gridarta/src/main/resources/log4j.properties (from rev 9238, trunk/src/gridarta/resource/log4j.properties) =================================================================== --- trunk/src/gridarta/src/main/resources/log4j.properties (rev 0) +++ trunk/src/gridarta/src/main/resources/log4j.properties 2013-05-28 21:57:28 UTC (rev 9239) @@ -0,0 +1,30 @@ +# +# Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. +# Copyright (C) 2000-2011 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. +# + +# Set root logger level to INFO and its only appender to A1. +log4j.rootLogger=INFO, A1 + +# A1 is set to be a ConsoleAppender. +log4j.appender.A1=org.apache.log4j.ConsoleAppender + +# A1 uses PatternLayout. +log4j.appender.A1.layout=org.apache.log4j.PatternLayout +log4j.appender.A1.layout.ConversionPattern=%-5p(%t) %-30c %x - %m%n + +log4j.logger.net.sf.gridarta.model.index.MapsIndexer=WARN Property changes on: trunk/src/gridarta/src/main/resources/log4j.properties ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:mergeinfo ## -0,0 +1 ## +/streams/cher-japi-update/crossfire/resource/log4j.properties:5966-5991 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +LF \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2013-05-30 17:10:44
|
Revision: 9243 http://sourceforge.net/p/gridarta/code/9243 Author: akirschbaum Date: 2013-05-30 17:10:37 +0000 (Thu, 30 May 2013) Log Message: ----------- Move checkstyle.xml to new directory. Modified Paths: -------------- trunk/build.xml Added Paths: ----------- trunk/config/ trunk/config/checkstyle/ trunk/config/checkstyle/checkstyle.xml Removed Paths: ------------- trunk/src/gridarta/src/checkstyle.xml Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2013-05-30 16:18:01 UTC (rev 9242) +++ trunk/build.xml 2013-05-30 17:10:37 UTC (rev 9243) @@ -907,7 +907,7 @@ <target name="checkstyle" description="Runs checkstyle to style-check the source code"> <taskdef resource="checkstyletask.properties" classpath="lib/checkstyle-all-5.0.jar"/> <mkdir dir="${build.dir}/doc"/> - <checkstyle config="src/gridarta/src/checkstyle.xml" failOnViolation="true"> + <checkstyle config="config/checkstyle/checkstyle.xml" failOnViolation="true"> <formatter type="plain" tofile="${build.dir}/doc/checkstyle_report.txt"/> <formatter type="plain"/> <fileset dir="src/gridarta/src/main/java" includes="**/*.java"/> Copied: trunk/config/checkstyle/checkstyle.xml (from rev 9240, trunk/src/gridarta/src/checkstyle.xml) =================================================================== --- trunk/config/checkstyle/checkstyle.xml (rev 0) +++ trunk/config/checkstyle/checkstyle.xml 2013-05-30 17:10:37 UTC (rev 9243) @@ -0,0 +1,112 @@ +<?xml version="1.0"?><!-- + ~ Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + ~ Copyright (C) 2000-2011 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. + --> + +<!DOCTYPE module PUBLIC + "-//Puppy Crawl//DTD Check Configuration 1.2//EN" + "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> + +<module name="Checker"> + <!-- Checks that a package-info.java file exists for each package. --><!-- <module name="JavadocPackage"/> --> + + <!-- Checks whether files end with a new line. --> + <module name="NewlineAtEndOfFile"/> + + <!-- Checks that property files contain the same keys. --> + <module name="Translation"/> + + <!-- Checks for Size Violations. --> + <module name="FileLength"/> + + <!-- Checks for whitespace --> + <module name="FileTabCharacter"/> + + <!-- Miscellaneous other checks. --> + <module name="RegexpSingleline"> + <property name="format" value="\s+$"/> + <property name="minimum" value="0"/> + <property name="maximum" value="0"/> + <property name="message" value="Line has trailing spaces."/> + </module> + + <module name="TreeWalker"> + + <!-- Checks for Javadoc comments. --><!-- <module name="JavadocMethod"/> --><!-- <module name="JavadocType"/> --><!-- <module name="JavadocVariable"/> --><!-- <module name="JavadocStyle"/> --> + + <!-- Checks for Naming Conventions. --><!-- <module name="ConstantName"/> --> + <module name="LocalFinalVariableName"/> + <module name="LocalVariableName"/> + <module name="MemberName"/> + <module name="MethodName"/> + <module name="PackageName"/> + <module name="ParameterName"/> + <module name="StaticVariableName"/> + <module name="TypeName"/> + + <!-- Checks for Headers --><!-- <module name="Header"> --><!-- </module> --> + + <!-- Checks for imports --> + <module name="AvoidStarImport"/> + <module name="IllegalImport"/> + <module name="RedundantImport"/> + <module name="UnusedImports"/> + + <!-- Checks for Size Violations. --><!-- <module name="LineLength"/> --><!-- <module name="MethodLength"/> --><!-- <module name="ParameterNumber"/> --> + + <!-- Checks for whitespace --> + <module name="EmptyForIteratorPad"/> + <module name="GenericWhitespace"/> + <module name="MethodParamPad"/> + <!-- <module name="NoWhitespaceAfter"/> --> + <module name="NoWhitespaceBefore"/> + <module name="OperatorWrap"/> + <module name="ParenPad"/> + <module name="TypecastParenPad"/> + <module name="WhitespaceAfter"/> + <module name="WhitespaceAround"/> + + <!-- Modifier Checks --> + <module name="ModifierOrder"/> + <module name="RedundantModifier"/> + + <!-- Checks for blocks. You know, those {}'s --><!-- <module name="AvoidNestedBlocks"/> --><!-- <module name="EmptyBlock"/> --> + <module name="LeftCurly"/> + <module name="NeedBraces"/> + <module name="RightCurly"/> + + <!-- Checks for common coding problems --><!-- <module name="AvoidInlineConditionals"/> --> + <module name="DoubleCheckedLocking"/> + <module name="EmptyStatement"/> + <module name="EqualsHashCode"/> + <!-- <module name="HiddenField"/> --> + <module name="IllegalInstantiation"/> + <!-- <module name="InnerAssignment"/> --><!-- <module name="MagicNumber"/> --><!-- <module name="MissingSwitchDefault"/> --><!-- <module name="RedundantThrows"/> --> + <module name="SimplifyBooleanExpression"/> + <module name="SimplifyBooleanReturn"/> + + <!-- Checks for class design --><!-- <module name="DesignForExtension"/> --><!-- <module name="FinalClass"/> --><!-- <module name="HideUtilityClassConstructor"/> --><!-- <module name="InterfaceIsType"/> --><!-- <module name="VisibilityModifier"/> --> + + <!-- Miscellaneous other checks. --> + <module name="ArrayTypeStyle"/> + <module name="FinalParameters"/> + <!-- <module name="TodoComment"/> --> + <module name="UpperEll"/> + + </module> + +</module> Deleted: trunk/src/gridarta/src/checkstyle.xml =================================================================== --- trunk/src/gridarta/src/checkstyle.xml 2013-05-30 16:18:01 UTC (rev 9242) +++ trunk/src/gridarta/src/checkstyle.xml 2013-05-30 17:10:37 UTC (rev 9243) @@ -1,112 +0,0 @@ -<?xml version="1.0"?><!-- - ~ Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. - ~ Copyright (C) 2000-2011 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. - --> - -<!DOCTYPE module PUBLIC - "-//Puppy Crawl//DTD Check Configuration 1.2//EN" - "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> - -<module name="Checker"> - <!-- Checks that a package-info.java file exists for each package. --><!-- <module name="JavadocPackage"/> --> - - <!-- Checks whether files end with a new line. --> - <module name="NewlineAtEndOfFile"/> - - <!-- Checks that property files contain the same keys. --> - <module name="Translation"/> - - <!-- Checks for Size Violations. --> - <module name="FileLength"/> - - <!-- Checks for whitespace --> - <module name="FileTabCharacter"/> - - <!-- Miscellaneous other checks. --> - <module name="RegexpSingleline"> - <property name="format" value="\s+$"/> - <property name="minimum" value="0"/> - <property name="maximum" value="0"/> - <property name="message" value="Line has trailing spaces."/> - </module> - - <module name="TreeWalker"> - - <!-- Checks for Javadoc comments. --><!-- <module name="JavadocMethod"/> --><!-- <module name="JavadocType"/> --><!-- <module name="JavadocVariable"/> --><!-- <module name="JavadocStyle"/> --> - - <!-- Checks for Naming Conventions. --><!-- <module name="ConstantName"/> --> - <module name="LocalFinalVariableName"/> - <module name="LocalVariableName"/> - <module name="MemberName"/> - <module name="MethodName"/> - <module name="PackageName"/> - <module name="ParameterName"/> - <module name="StaticVariableName"/> - <module name="TypeName"/> - - <!-- Checks for Headers --><!-- <module name="Header"> --><!-- </module> --> - - <!-- Checks for imports --> - <module name="AvoidStarImport"/> - <module name="IllegalImport"/> - <module name="RedundantImport"/> - <module name="UnusedImports"/> - - <!-- Checks for Size Violations. --><!-- <module name="LineLength"/> --><!-- <module name="MethodLength"/> --><!-- <module name="ParameterNumber"/> --> - - <!-- Checks for whitespace --> - <module name="EmptyForIteratorPad"/> - <module name="GenericWhitespace"/> - <module name="MethodParamPad"/> - <!-- <module name="NoWhitespaceAfter"/> --> - <module name="NoWhitespaceBefore"/> - <module name="OperatorWrap"/> - <module name="ParenPad"/> - <module name="TypecastParenPad"/> - <module name="WhitespaceAfter"/> - <module name="WhitespaceAround"/> - - <!-- Modifier Checks --> - <module name="ModifierOrder"/> - <module name="RedundantModifier"/> - - <!-- Checks for blocks. You know, those {}'s --><!-- <module name="AvoidNestedBlocks"/> --><!-- <module name="EmptyBlock"/> --> - <module name="LeftCurly"/> - <module name="NeedBraces"/> - <module name="RightCurly"/> - - <!-- Checks for common coding problems --><!-- <module name="AvoidInlineConditionals"/> --> - <module name="DoubleCheckedLocking"/> - <module name="EmptyStatement"/> - <module name="EqualsHashCode"/> - <!-- <module name="HiddenField"/> --> - <module name="IllegalInstantiation"/> - <!-- <module name="InnerAssignment"/> --><!-- <module name="MagicNumber"/> --><!-- <module name="MissingSwitchDefault"/> --><!-- <module name="RedundantThrows"/> --> - <module name="SimplifyBooleanExpression"/> - <module name="SimplifyBooleanReturn"/> - - <!-- Checks for class design --><!-- <module name="DesignForExtension"/> --><!-- <module name="FinalClass"/> --><!-- <module name="HideUtilityClassConstructor"/> --><!-- <module name="InterfaceIsType"/> --><!-- <module name="VisibilityModifier"/> --> - - <!-- Miscellaneous other checks. --> - <module name="ArrayTypeStyle"/> - <module name="FinalParameters"/> - <!-- <module name="TodoComment"/> --> - <module name="UpperEll"/> - - </module> - -</module> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2013-05-31 14:06:14
|
Revision: 9252 http://sourceforge.net/p/gridarta/code/9252 Author: akirschbaum Date: 2013-05-31 14:06:09 +0000 (Fri, 31 May 2013) Log Message: ----------- Extract ArchetypeTypeSetParserTest tests into resources. Modified Paths: -------------- trunk/gridarta.ipr trunk/src/model/src/test/java/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest.java Added Paths: ----------- trunk/src/model/src/test/resources/net/ trunk/src/model/src/test/resources/net/sf/ trunk/src/model/src/test/resources/net/sf/gridarta/ trunk/src/model/src/test/resources/net/sf/gridarta/model/ trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreDefaultAttribute1-result.txt trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreDefaultAttribute1-types.xml trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreDefinedAttribute1-result.txt trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreDefinedAttribute1-types.xml trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreImportAttribute1-result.txt trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreImportAttribute1-types.xml trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-import1-result.txt trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-import1-types.xml trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-import2-result.txt trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-import2-types.xml trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault1-result.txt trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault1-types.xml trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault2-result.txt trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault2-types.xml trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault3-result.txt trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault3-types.xml trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-test1-result.txt trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-test1-types.xml Modified: trunk/gridarta.ipr =================================================================== --- trunk/gridarta.ipr 2013-05-31 13:46:02 UTC (rev 9251) +++ trunk/gridarta.ipr 2013-05-31 14:06:09 UTC (rev 9252) @@ -228,6 +228,7 @@ <entry name="?*.png" /> <entry name="?*.jpeg" /> <entry name="?*.jpg" /> + <entry name="?*.txt" /> </wildcardResourcePatterns> <annotationProcessing enabled="false" useClasspath="true" /> </component> Modified: trunk/src/model/src/test/java/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest.java =================================================================== --- trunk/src/model/src/test/java/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest.java 2013-05-31 13:46:02 UTC (rev 9251) +++ trunk/src/model/src/test/java/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest.java 2013-05-31 14:06:09 UTC (rev 9252) @@ -19,8 +19,10 @@ package net.sf.gridarta.model.archetypetype; -import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; import java.io.File; +import java.io.IOException; +import java.io.InputStream; import java.io.UnsupportedEncodingException; import javax.xml.parsers.ParserConfigurationException; import net.sf.gridarta.model.errorview.ErrorView; @@ -53,419 +55,123 @@ /** * Read a simple types.xml file. * @throws ParserConfigurationException if the test fails - * @throws UnsupportedEncodingException if the test fails + * @throws IOException if the test fails */ @Test - public void test1() throws ParserConfigurationException, UnsupportedEncodingException { - final StringBuilder typesXml = new StringBuilder(); - typesXml.append("<bitmasks/>\n"); - typesXml.append("<lists/>\n"); - typesXml.append("<ignorelists/>\n"); - typesXml.append("<default_type>\n"); - typesXml.append("<attribute arch=\"name\" editor=\"name_editor\" type=\"string\">name description</attribute>\n"); - typesXml.append("</default_type>\n"); - typesXml.append("<type number=\"123\" name=\"name 123\">\n"); - typesXml.append("<description>description 123</description>\n"); - typesXml.append("<attribute arch=\"f\" value=\"v\" type=\"fixed\"/>\n"); - typesXml.append("</type>\n"); - final StringBuilder expectedResult = new StringBuilder(); - expectedResult.append("type:123,name 123\n"); - expectedResult.append(":\n"); - expectedResult.append(":\n"); - expectedResult.append("fixed/f[v] section=1/Special\n"); - expectedResult.append("string/name[name_editor] section=0/General\n"); - expectedResult.append("\n"); - check(typesXml.toString(), false, expectedResult.toString()); + public void test1() throws ParserConfigurationException, IOException { + check("test1"); } /** * Checks that imports do work. * @throws ParserConfigurationException if the test fails - * @throws UnsupportedEncodingException if the test fails + * @throws IOException if the test fails */ @Test - public void testImport1() throws ParserConfigurationException, UnsupportedEncodingException { - final StringBuilder typesXml = new StringBuilder(); - typesXml.append("<bitmasks/>\n"); - typesXml.append("<lists/>\n"); - typesXml.append("<ignorelists/>\n"); - typesXml.append("<default_type>\n"); - typesXml.append("<attribute arch=\"default_attr1\" editor=\"default\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"default_attr2\" editor=\"default\" type=\"string\">description</attribute>\n"); - typesXml.append("</default_type>\n"); - typesXml.append("<type number=\"1\" name=\"name1\">\n"); - typesXml.append("<description>description1</description>\n"); - typesXml.append("<attribute arch=\"name1_attr1\" editor=\"name1\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"name1_attr2\" editor=\"name1\" type=\"string\">description</attribute>\n"); - typesXml.append("</type>\n"); - typesXml.append("<type number=\"2\" name=\"name2\">\n"); - typesXml.append("<import_type name=\"name1\"/>\n"); - typesXml.append("<description>description2</description>\n"); - typesXml.append("<attribute arch=\"name2_attr1\" editor=\"name2\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"name1_attr2\" editor=\"name2\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"default_attr2\" editor=\"name2\" type=\"string\">description</attribute>\n"); - typesXml.append("</type>\n"); - final StringBuilder expectedResult = new StringBuilder(); - expectedResult.append("type:1,name1\n"); - expectedResult.append(":\n"); - expectedResult.append(":\n"); - expectedResult.append("string/name1_attr1[name1] section=1/Special\n"); - expectedResult.append("string/name1_attr2[name1] section=1/Special\n"); - expectedResult.append("string/default_attr1[default] section=0/General\n"); - expectedResult.append("string/default_attr2[default] section=0/General\n"); - expectedResult.append("\n"); - expectedResult.append("type:2,name2\n"); - expectedResult.append(":\n"); - expectedResult.append(":\n"); - /* attributes */ - expectedResult.append("string/name2_attr1[name2] section=1/Special\n"); - expectedResult.append("string/name1_attr2[name2] section=1/Special\n"); - expectedResult.append("string/default_attr2[name2] section=1/Special\n"); - /* imports */ - expectedResult.append("string/name1_attr1[name1] section=1/Special\n"); - /* defaults */ - expectedResult.append("string/default_attr1[default] section=0/General\n"); - expectedResult.append("\n"); - check(typesXml.toString(), false, expectedResult.toString()); + public void testImport1() throws ParserConfigurationException, IOException { + check("import1"); } /** * Checks that multi-imports do work. * @throws ParserConfigurationException if the test fails - * @throws UnsupportedEncodingException if the test fails + * @throws IOException if the test fails */ @Test - public void testImport2() throws ParserConfigurationException, UnsupportedEncodingException { - final StringBuilder typesXml = new StringBuilder(); - typesXml.append("<bitmasks/>\n"); - typesXml.append("<lists/>\n"); - typesXml.append("<ignorelists/>\n"); - typesXml.append("<default_type>\n"); - typesXml.append("<attribute arch=\"attr1\" editor=\"default\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"attr3\" editor=\"default\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"attr5\" editor=\"default\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"attr7\" editor=\"default\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"attr9\" editor=\"default\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"attrB\" editor=\"default\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"attrD\" editor=\"default\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"attrF\" editor=\"default\" type=\"string\">description</attribute>\n"); - typesXml.append("</default_type>\n"); - typesXml.append("<type number=\"1\" name=\"name1\">\n"); - typesXml.append("<description>description1</description>\n"); - typesXml.append("<attribute arch=\"attr2\" editor=\"name1\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"attr3\" editor=\"name1\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"attr6\" editor=\"name1\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"attr7\" editor=\"name1\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"attrA\" editor=\"name1\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"attrB\" editor=\"name1\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"attrE\" editor=\"name1\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"attrF\" editor=\"name1\" type=\"string\">description</attribute>\n"); - typesXml.append("</type>\n"); - typesXml.append("<type number=\"2\" name=\"name2\">\n"); - typesXml.append("<description>description2</description>\n"); - typesXml.append("<attribute arch=\"attr4\" editor=\"name2\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"attr5\" editor=\"name2\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"attr6\" editor=\"name2\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"attr7\" editor=\"name2\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"attrC\" editor=\"name2\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"attrD\" editor=\"name2\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"attrE\" editor=\"name2\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"attrF\" editor=\"name2\" type=\"string\">description</attribute>\n"); - typesXml.append("</type>\n"); - typesXml.append("<type number=\"3\" name=\"name3\">\n"); - typesXml.append("<import_type name=\"name1\"/>\n"); - typesXml.append("<import_type name=\"name2\"/>\n"); - typesXml.append("<description>description3</description>\n"); - typesXml.append("<attribute arch=\"attr8\" editor=\"name3\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"attr9\" editor=\"name3\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"attrA\" editor=\"name3\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"attrB\" editor=\"name3\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"attrC\" editor=\"name3\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"attrD\" editor=\"name3\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"attrE\" editor=\"name3\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"attrF\" editor=\"name3\" type=\"string\">description</attribute>\n"); - typesXml.append("</type>\n"); - final StringBuilder expectedResult = new StringBuilder(); - expectedResult.append("type:1,name1\n"); - expectedResult.append(":\n"); - expectedResult.append(":\n"); - /* attributes */ - expectedResult.append("string/attr2[name1] section=1/Special\n"); - expectedResult.append("string/attr3[name1] section=1/Special\n"); - expectedResult.append("string/attr6[name1] section=1/Special\n"); - expectedResult.append("string/attr7[name1] section=1/Special\n"); - expectedResult.append("string/attrA[name1] section=1/Special\n"); - expectedResult.append("string/attrB[name1] section=1/Special\n"); - expectedResult.append("string/attrE[name1] section=1/Special\n"); - expectedResult.append("string/attrF[name1] section=1/Special\n"); - /* defaults */ - expectedResult.append("string/attr1[default] section=0/General\n"); - expectedResult.append("string/attr5[default] section=0/General\n"); - expectedResult.append("string/attr9[default] section=0/General\n"); - expectedResult.append("string/attrD[default] section=0/General\n"); - /* imports */ - expectedResult.append("\n"); - expectedResult.append("type:2,name2\n"); - expectedResult.append(":\n"); - expectedResult.append(":\n"); - /* attributes */ - expectedResult.append("string/attr4[name2] section=1/Special\n"); - expectedResult.append("string/attr5[name2] section=1/Special\n"); - expectedResult.append("string/attr6[name2] section=1/Special\n"); - expectedResult.append("string/attr7[name2] section=1/Special\n"); - expectedResult.append("string/attrC[name2] section=1/Special\n"); - expectedResult.append("string/attrD[name2] section=1/Special\n"); - expectedResult.append("string/attrE[name2] section=1/Special\n"); - expectedResult.append("string/attrF[name2] section=1/Special\n"); - /* defaults */ - expectedResult.append("string/attr1[default] section=0/General\n"); - expectedResult.append("string/attr3[default] section=0/General\n"); - expectedResult.append("string/attr9[default] section=0/General\n"); - expectedResult.append("string/attrB[default] section=0/General\n"); - /* attributes */ - /* imports */ - expectedResult.append("\n"); - expectedResult.append("type:3,name3\n"); - expectedResult.append(":\n"); - expectedResult.append(":\n"); - expectedResult.append("string/attr8[name3] section=1/Special\n"); - expectedResult.append("string/attr9[name3] section=1/Special\n"); - expectedResult.append("string/attrA[name3] section=1/Special\n"); - expectedResult.append("string/attrB[name3] section=1/Special\n"); - expectedResult.append("string/attrC[name3] section=1/Special\n"); - expectedResult.append("string/attrD[name3] section=1/Special\n"); - expectedResult.append("string/attrE[name3] section=1/Special\n"); - expectedResult.append("string/attrF[name3] section=1/Special\n"); - /* imports */ - expectedResult.append("string/attr2[name1] section=1/Special\n"); - expectedResult.append("string/attr3[name1] section=1/Special\n"); - expectedResult.append("string/attr6[name1] section=1/Special\n"); - expectedResult.append("string/attr7[name1] section=1/Special\n"); - expectedResult.append("string/attr4[name2] section=1/Special\n"); - expectedResult.append("string/attr5[name2] section=1/Special\n"); - /* defaults */ - expectedResult.append("string/attr1[default] section=0/General\n"); - expectedResult.append("\n"); - check(typesXml.toString(), false, expectedResult.toString()); + public void testImport2() throws ParserConfigurationException, IOException { + check("import2"); } /** * Checks that ignoring default attributes do work. * @throws ParserConfigurationException if the test fails - * @throws UnsupportedEncodingException if the test fails + * @throws IOException if the test fails */ @Test - public void testIgnoreDefaultAttribute1() throws ParserConfigurationException, UnsupportedEncodingException { - final StringBuilder typesXml = new StringBuilder(); - typesXml.append("<bitmasks/>\n"); - typesXml.append("<lists/>\n"); - typesXml.append("<ignorelists/>\n"); - typesXml.append("<default_type>\n"); - typesXml.append("<attribute arch=\"default_attr1\" editor=\"default\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"default_attr2\" editor=\"default\" type=\"string\">description</attribute>\n"); - typesXml.append("</default_type>\n"); - typesXml.append("<type number=\"1\" name=\"name1\">\n"); - typesXml.append("<ignore>\n"); - typesXml.append("<attribute arch=\"default_attr1\"/>\n"); - typesXml.append("</ignore>\n"); - typesXml.append("<description>description1</description>\n"); - typesXml.append("</type>\n"); - final StringBuilder expectedResult = new StringBuilder(); - expectedResult.append("type:1,name1\n"); - expectedResult.append(":\n"); - expectedResult.append(":\n"); - /* attributes */ - /* imports */ - /* defaults */ - expectedResult.append("string/default_attr2[default] section=0/General\n"); - expectedResult.append("\n"); - check(typesXml.toString(), false, expectedResult.toString()); + public void testIgnoreDefaultAttribute1() throws ParserConfigurationException, IOException { + check("ignoreDefaultAttribute1"); } /** * Checks that ignoring import attributes do work. * @throws ParserConfigurationException if the test fails - * @throws UnsupportedEncodingException if the test fails + * @throws IOException if the test fails */ @Test - public void testIgnoreImportAttribute1() throws ParserConfigurationException, UnsupportedEncodingException { - final StringBuilder typesXml = new StringBuilder(); - typesXml.append("<bitmasks/>\n"); - typesXml.append("<lists/>\n"); - typesXml.append("<ignorelists/>\n"); - typesXml.append("<default_type>\n"); - typesXml.append("<attribute arch=\"default_attr1\" editor=\"default\" type=\"string\">description</attribute>\n"); - typesXml.append("</default_type>\n"); - typesXml.append("<type number=\"1\" name=\"name1\">\n"); - typesXml.append("<description>description1</description>\n"); - typesXml.append("<attribute arch=\"name1_attr1\" editor=\"name1\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"name1_attr2\" editor=\"name1\" type=\"string\">description</attribute>\n"); - typesXml.append("</type>\n"); - typesXml.append("<type number=\"2\" name=\"name2\">\n"); - typesXml.append("<import_type name=\"name1\"/>\n"); - typesXml.append("<ignore>\n"); - typesXml.append("<attribute arch=\"name1_attr1\"/>\n"); - typesXml.append("</ignore>\n"); - typesXml.append("<description>description2</description>\n"); - typesXml.append("</type>\n"); - final StringBuilder expectedResult = new StringBuilder(); - expectedResult.append("type:1,name1\n"); - expectedResult.append(":\n"); - expectedResult.append(":\n"); - expectedResult.append("string/name1_attr1[name1] section=1/Special\n"); - expectedResult.append("string/name1_attr2[name1] section=1/Special\n"); - expectedResult.append("string/default_attr1[default] section=0/General\n"); - expectedResult.append("\n"); - expectedResult.append("type:2,name2\n"); - expectedResult.append(":\n"); - expectedResult.append(":\n"); - /* attributes */ - /* imports */ - expectedResult.append("string/name1_attr1[name1] section=1/Special\n"); // imported attributes are not affected by ignores - expectedResult.append("string/name1_attr2[name1] section=1/Special\n"); - /* defaults */ - expectedResult.append("string/default_attr1[default] section=0/General\n"); - expectedResult.append("\n"); - check(typesXml.toString(), false, expectedResult.toString()); + public void testIgnoreImportAttribute1() throws ParserConfigurationException, IOException { + check("ignoreImportAttribute1"); } /** * Checks that ignoring defined attributes do work. * @throws ParserConfigurationException if the test fails - * @throws UnsupportedEncodingException if the test fails + * @throws IOException if the test fails */ @Test - public void testIgnoreDefinedAttribute1() throws ParserConfigurationException, UnsupportedEncodingException { - final StringBuilder typesXml = new StringBuilder(); - typesXml.append("<bitmasks/>\n"); - typesXml.append("<lists/>\n"); - typesXml.append("<ignorelists/>\n"); - typesXml.append("<default_type/>\n"); - typesXml.append("<type number=\"1\" name=\"name1\">\n"); - typesXml.append("<ignore>\n"); - typesXml.append("<attribute arch=\"name1_attr1\"/>\n"); - typesXml.append("</ignore>\n"); - typesXml.append("<description>description1</description>\n"); - typesXml.append("<attribute arch=\"name1_attr1\" editor=\"name1\" type=\"string\">description</attribute>\n"); - typesXml.append("<attribute arch=\"name1_attr2\" editor=\"name1\" type=\"string\">description</attribute>\n"); - typesXml.append("</type>\n"); - final StringBuilder expectedResult = new StringBuilder(); - expectedResult.append("type:1,name1\n"); - expectedResult.append(":\n"); - expectedResult.append(":\n"); - /* attributes */ - expectedResult.append("string/name1_attr1[name1] section=1/Special\n"); // defined attributes are not affected by ignores - expectedResult.append("string/name1_attr2[name1] section=1/Special\n"); - /* imports */ - /* defaults */ - expectedResult.append("\n"); - check(typesXml.toString(), false, expectedResult.toString()); + public void testIgnoreDefinedAttribute1() throws ParserConfigurationException, IOException { + check("ignoreDefinedAttribute1"); } /** * Checks that a "msg" field in default_type does work. * @throws ParserConfigurationException if the test fails - * @throws UnsupportedEncodingException if the test fails + * @throws IOException if the test fails */ @Test - public void testMsgDefault1() throws ParserConfigurationException, UnsupportedEncodingException { - final StringBuilder typesXml = new StringBuilder(); - typesXml.append("<bitmasks/>\n"); - typesXml.append("<lists/>\n"); - typesXml.append("<ignorelists/>\n"); - typesXml.append("<default_type>\n"); - typesXml.append("<attribute arch_begin=\"msg\" arch_end=\"endmsg\" editor=\"default\" type=\"text\">msg</attribute>\n"); - typesXml.append("</default_type>\n"); - typesXml.append("<type number=\"1\" name=\"name1\">\n"); - typesXml.append("<description>description</description>\n"); - typesXml.append("</type>\n"); - final StringBuilder expectedResult = new StringBuilder(); - expectedResult.append("type:1,name1\n"); - expectedResult.append(":\n"); - expectedResult.append(":\n"); - /* attributes */ - /* imports */ - /* defaults */ - expectedResult.append("text/msg[default] section=2/default\n"); - expectedResult.append("\n"); - check(typesXml.toString(), false, expectedResult.toString()); + public void testMsgDefault1() throws ParserConfigurationException, IOException { + check("msgDefault1"); } /** * Checks that a "msg" field in default_type does work. * @throws ParserConfigurationException if the test fails - * @throws UnsupportedEncodingException if the test fails + * @throws IOException if the test fails */ @Test - public void testMsgDefault2() throws ParserConfigurationException, UnsupportedEncodingException { - final StringBuilder typesXml = new StringBuilder(); - typesXml.append("<bitmasks/>\n"); - typesXml.append("<lists/>\n"); - typesXml.append("<ignorelists/>\n"); - typesXml.append("<default_type>\n"); - typesXml.append("<attribute arch_begin=\"msg\" arch_end=\"endmsg\" editor=\"default\" type=\"text\">msg1</attribute>\n"); - typesXml.append("</default_type>\n"); - typesXml.append("<type number=\"1\" name=\"name1\">\n"); - typesXml.append("<description>description</description>\n"); - typesXml.append("<attribute arch_begin=\"msg\" arch_end=\"endmsg\" editor=\"name1\" type=\"text\">msg2</attribute>\n"); - typesXml.append("</type>\n"); - final StringBuilder expectedResult = new StringBuilder(); - expectedResult.append("type:1,name1\n"); - expectedResult.append(":\n"); - expectedResult.append(":\n"); - /* attributes */ - expectedResult.append("text/msg[name1] section=2/name1\n"); - /* imports */ - /* defaults */ - expectedResult.append("\n"); - check(typesXml.toString(), false, expectedResult.toString()); + public void testMsgDefault2() throws ParserConfigurationException, IOException { + check("msgDefault2"); } /** * Checks that a "msg" field in default_type CAN BE "ignored". * @throws ParserConfigurationException if the test fails - * @throws UnsupportedEncodingException if the test fails + * @throws IOException if the test fails */ @Test - public void testMsgDefault3() throws ParserConfigurationException, UnsupportedEncodingException { - final StringBuilder typesXml = new StringBuilder(); - typesXml.append("<bitmasks/>\n"); - typesXml.append("<lists/>\n"); - typesXml.append("<ignorelists/>\n"); - typesXml.append("<default_type>\n"); - typesXml.append("<attribute arch_begin=\"msg\" arch_end=\"endmsg\" editor=\"default\" type=\"text\">msg1</attribute>\n"); - typesXml.append("</default_type>\n"); - typesXml.append("<type number=\"1\" name=\"name1\">\n"); - typesXml.append("<ignore>\n"); - typesXml.append("<attribute arch=\"msg\"/>\n"); - typesXml.append("</ignore>\n"); - typesXml.append("<description>description</description>\n"); - typesXml.append("</type>\n"); - final StringBuilder expectedResult = new StringBuilder(); - expectedResult.append("type:1,name1\n"); - expectedResult.append(":\n"); - expectedResult.append(":\n"); - /* attributes */ - /* imports */ - /* defaults */ - expectedResult.append("\n"); - check(typesXml.toString(), false, expectedResult.toString()); + public void testMsgDefault3() throws ParserConfigurationException, IOException { + check("msgDefault3"); } /** * Checks that a types.xml file can be read. - * @param typesXml the types.xml file contents - * @param expectedHasErrors whether errors are expected - * @param expectedResult the expected result + * @param name the base name of the resources to load * @throws ParserConfigurationException if the test fails * @throws UnsupportedEncodingException if the test fails */ - private void check(@NotNull final String typesXml, final boolean expectedHasErrors, @NotNull final String expectedResult) throws ParserConfigurationException, UnsupportedEncodingException { + private void check(@NotNull final String name) throws ParserConfigurationException, IOException { final ArchetypeTypeSet archetypeTypeSet = new ArchetypeTypeSet(); final ArchetypeTypeSetParser parser = createArchetypeTypeSetParser(archetypeTypeSet); - parser.loadTypesFromXML(errorViewCollector, createInputSource(typesXml)); - Assert.assertEquals(expectedHasErrors, errorView.hasErrors()); - Assert.assertEquals(expectedResult, archetypeTypeSet.toString()); + + final InputStream typesXml = getClass().getResourceAsStream("ArchetypeTypeSetParserTest-" + name + "-types.xml"); + Assert.assertNotNull(typesXml); + final InputSource inputSource = new InputSource(typesXml); + inputSource.setSystemId("types.dtd"); + + parser.loadTypesFromXML(errorViewCollector, inputSource); + + final InputStream is = getClass().getResourceAsStream("ArchetypeTypeSetParserTest-" + name + "-result.txt"); + Assert.assertNotNull(is); + final ByteArrayOutputStream baos = new ByteArrayOutputStream(); + final byte[] tmp = new byte[1024]; + while (true) { + final int len = is.read(tmp); + if (len == -1) { + break; + } + baos.write(tmp, 0, len); + } + final String expectedResult = baos.toString("UTF-8"); + Assert.assertEquals(expectedResult, "errors=" + errorView.hasErrors() + "\n" + archetypeTypeSet); } /** @@ -483,24 +189,4 @@ return new ArchetypeTypeSetParser(xmlHelper.getDocumentBuilder(), archetypeTypeSet, archetypeTypeParser); } - /** - * Creates an {@link InputSource} from a <code>String</code>. - * @param string the string to wrap - * @return the input stream - * @throws UnsupportedEncodingException if the input stream cannot be - * created - */ - @NotNull - private static InputSource createInputSource(@NotNull final String string) throws UnsupportedEncodingException { - final StringBuilder typesString = new StringBuilder(); - typesString.append("<?xml version=\"1.0\" standalone=\"no\" ?>\n"); - typesString.append("<!DOCTYPE types SYSTEM \"types.dtd\">\n"); - typesString.append("<types>\n"); - typesString.append(string); - typesString.append("</types>\n"); - final InputSource inputSource = new InputSource(new ByteArrayInputStream(typesString.toString().getBytes("UTF-8"))); - inputSource.setSystemId("types.dtd"); - return inputSource; - } - } Added: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreDefaultAttribute1-result.txt =================================================================== --- trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreDefaultAttribute1-result.txt (rev 0) +++ trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreDefaultAttribute1-result.txt 2013-05-31 14:06:09 UTC (rev 9252) @@ -0,0 +1,6 @@ +errors=false +type:1,name1 +: +: +string/default_attr2[default] section=0/General + Property changes on: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreDefaultAttribute1-result.txt ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +LF \ No newline at end of property Added: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreDefaultAttribute1-types.xml =================================================================== --- trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreDefaultAttribute1-types.xml (rev 0) +++ trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreDefaultAttribute1-types.xml 2013-05-31 14:06:09 UTC (rev 9252) @@ -0,0 +1,22 @@ +<?xml version="1.0" standalone="no" ?> + +<!DOCTYPE types SYSTEM "types.dtd"> +<types> + <bitmasks/> + <lists/> + <ignorelists/> + <default_type> + <attribute arch="default_attr1" editor="default" type="string"> + description + </attribute> + <attribute arch="default_attr2" editor="default" type="string"> + description + </attribute> + </default_type> + <type number="1" name="name1"> + <ignore> + <attribute arch="default_attr1"/> + </ignore> + <description>description1</description> + </type> +</types> Property changes on: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreDefaultAttribute1-types.xml ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/xml \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +LF \ No newline at end of property Added: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreDefinedAttribute1-result.txt =================================================================== --- trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreDefinedAttribute1-result.txt (rev 0) +++ trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreDefinedAttribute1-result.txt 2013-05-31 14:06:09 UTC (rev 9252) @@ -0,0 +1,7 @@ +errors=false +type:1,name1 +: +: +string/name1_attr1[name1] section=1/Special +string/name1_attr2[name1] section=1/Special + Property changes on: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreDefinedAttribute1-result.txt ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +LF \ No newline at end of property Added: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreDefinedAttribute1-types.xml =================================================================== --- trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreDefinedAttribute1-types.xml (rev 0) +++ trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreDefinedAttribute1-types.xml 2013-05-31 14:06:09 UTC (rev 9252) @@ -0,0 +1,20 @@ +<?xml version="1.0" standalone="no" ?> + +<!DOCTYPE types SYSTEM "types.dtd"> +<types> + <bitmasks/> + <lists/> + <ignorelists/> + <default_type/> + <type number="1" name="name1"> + <ignore> + <attribute arch="name1_attr1"/> + </ignore> + <description>description1</description> + <!-- defined attributes are not affected by ignores --> + <attribute arch="name1_attr1" editor="name1" type="string">description + </attribute> + <attribute arch="name1_attr2" editor="name1" type="string">description + </attribute> + </type> +</types> Property changes on: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreDefinedAttribute1-types.xml ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/xml \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +LF \ No newline at end of property Added: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreImportAttribute1-result.txt =================================================================== --- trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreImportAttribute1-result.txt (rev 0) +++ trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreImportAttribute1-result.txt 2013-05-31 14:06:09 UTC (rev 9252) @@ -0,0 +1,15 @@ +errors=false +type:1,name1 +: +: +string/name1_attr1[name1] section=1/Special +string/name1_attr2[name1] section=1/Special +string/default_attr1[default] section=0/General + +type:2,name2 +: +: +string/name1_attr1[name1] section=1/Special +string/name1_attr2[name1] section=1/Special +string/default_attr1[default] section=0/General + Property changes on: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreImportAttribute1-result.txt ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +LF \ No newline at end of property Added: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreImportAttribute1-types.xml =================================================================== --- trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreImportAttribute1-types.xml (rev 0) +++ trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreImportAttribute1-types.xml 2013-05-31 14:06:09 UTC (rev 9252) @@ -0,0 +1,28 @@ +<?xml version="1.0" standalone="no" ?> + +<!DOCTYPE types SYSTEM "types.dtd"> +<types> + <bitmasks/> + <lists/> + <ignorelists/> + <default_type> + <attribute arch="default_attr1" editor="default" type="string"> + description + </attribute> + </default_type> + <type number="1" name="name1"> + <description>description1</description> + <attribute arch="name1_attr1" editor="name1" type="string">description + </attribute> + <attribute arch="name1_attr2" editor="name1" type="string">description + </attribute> + </type> + <type number="2" name="name2"> + <import_type name="name1"/> + <ignore> + <!-- imported attributes are not affected by ignores --> + <attribute arch="name1_attr1"/> + </ignore> + <description>description2</description> + </type> +</types> Property changes on: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-ignoreImportAttribute1-types.xml ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/xml \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +LF \ No newline at end of property Added: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-import1-result.txt =================================================================== --- trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-import1-result.txt (rev 0) +++ trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-import1-result.txt 2013-05-31 14:06:09 UTC (rev 9252) @@ -0,0 +1,18 @@ +errors=false +type:1,name1 +: +: +string/name1_attr1[name1] section=1/Special +string/name1_attr2[name1] section=1/Special +string/default_attr1[default] section=0/General +string/default_attr2[default] section=0/General + +type:2,name2 +: +: +string/name2_attr1[name2] section=1/Special +string/name1_attr2[name2] section=1/Special +string/default_attr2[name2] section=1/Special +string/name1_attr1[name1] section=1/Special +string/default_attr1[default] section=0/General + Property changes on: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-import1-result.txt ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +LF \ No newline at end of property Added: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-import1-types.xml =================================================================== --- trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-import1-types.xml (rev 0) +++ trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-import1-types.xml 2013-05-31 14:06:09 UTC (rev 9252) @@ -0,0 +1,33 @@ +<?xml version="1.0" standalone="no" ?> + +<!DOCTYPE types SYSTEM "types.dtd"> +<types> + <bitmasks/> + <lists/> + <ignorelists/> + <default_type> + <attribute arch="default_attr1" editor="default" type="string"> + description + </attribute> + <attribute arch="default_attr2" editor="default" type="string"> + description + </attribute> + </default_type> + <type number="1" name="name1"> + <description>description1</description> + <attribute arch="name1_attr1" editor="name1" type="string">description + </attribute> + <attribute arch="name1_attr2" editor="name1" type="string">description + </attribute> + </type> + <type number="2" name="name2"> + <import_type name="name1"/> + <description>description2</description> + <attribute arch="name2_attr1" editor="name2" type="string">description + </attribute> + <attribute arch="name1_attr2" editor="name2" type="string">description + </attribute> + <attribute arch="default_attr2" editor="name2" type="string">description + </attribute> + </type> +</types> Property changes on: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-import1-types.xml ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/xml \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +LF \ No newline at end of property Added: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-import2-result.txt =================================================================== --- trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-import2-result.txt (rev 0) +++ trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-import2-result.txt 2013-05-31 14:06:09 UTC (rev 9252) @@ -0,0 +1,52 @@ +errors=false +type:1,name1 +: +: +string/attr2[name1] section=1/Special +string/attr3[name1] section=1/Special +string/attr6[name1] section=1/Special +string/attr7[name1] section=1/Special +string/attrA[name1] section=1/Special +string/attrB[name1] section=1/Special +string/attrE[name1] section=1/Special +string/attrF[name1] section=1/Special +string/attr1[default] section=0/General +string/attr5[default] section=0/General +string/attr9[default] section=0/General +string/attrD[default] section=0/General + +type:2,name2 +: +: +string/attr4[name2] section=1/Special +string/attr5[name2] section=1/Special +string/attr6[name2] section=1/Special +string/attr7[name2] section=1/Special +string/attrC[name2] section=1/Special +string/attrD[name2] section=1/Special +string/attrE[name2] section=1/Special +string/attrF[name2] section=1/Special +string/attr1[default] section=0/General +string/attr3[default] section=0/General +string/attr9[default] section=0/General +string/attrB[default] section=0/General + +type:3,name3 +: +: +string/attr8[name3] section=1/Special +string/attr9[name3] section=1/Special +string/attrA[name3] section=1/Special +string/attrB[name3] section=1/Special +string/attrC[name3] section=1/Special +string/attrD[name3] section=1/Special +string/attrE[name3] section=1/Special +string/attrF[name3] section=1/Special +string/attr2[name1] section=1/Special +string/attr3[name1] section=1/Special +string/attr6[name1] section=1/Special +string/attr7[name1] section=1/Special +string/attr4[name2] section=1/Special +string/attr5[name2] section=1/Special +string/attr1[default] section=0/General + Property changes on: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-import2-result.txt ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +LF \ No newline at end of property Added: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-import2-types.xml =================================================================== --- trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-import2-types.xml (rev 0) +++ trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-import2-types.xml 2013-05-31 14:06:09 UTC (rev 9252) @@ -0,0 +1,85 @@ +<?xml version="1.0" standalone="no" ?> + +<!DOCTYPE types SYSTEM "types.dtd"> +<types> + <bitmasks/> + <lists/> + <ignorelists/> + <default_type> + <attribute arch="attr1" editor="default" type="string">description + </attribute> + <attribute arch="attr3" editor="default" type="string">description + </attribute> + <attribute arch="attr5" editor="default" type="string">description + </attribute> + <attribute arch="attr7" editor="default" type="string">description + </attribute> + <attribute arch="attr9" editor="default" type="string">description + </attribute> + <attribute arch="attrB" editor="default" type="string">description + </attribute> + <attribute arch="attrD" editor="default" type="string">description + </attribute> + <attribute arch="attrF" editor="default" type="string">description + </attribute> + </default_type> + <type number="1" name="name1"> + <description>description1</description> + <attribute arch="attr2" editor="name1" type="string">description + </attribute> + <attribute arch="attr3" editor="name1" type="string">description + </attribute> + <attribute arch="attr6" editor="name1" type="string">description + </attribute> + <attribute arch="attr7" editor="name1" type="string">description + </attribute> + <attribute arch="attrA" editor="name1" type="string">description + </attribute> + <attribute arch="attrB" editor="name1" type="string">description + </attribute> + <attribute arch="attrE" editor="name1" type="string">description + </attribute> + <attribute arch="attrF" editor="name1" type="string">description + </attribute> + </type> + <type number="2" name="name2"> + <description>description2</description> + <attribute arch="attr4" editor="name2" type="string">description + </attribute> + <attribute arch="attr5" editor="name2" type="string">description + </attribute> + <attribute arch="attr6" editor="name2" type="string">description + </attribute> + <attribute arch="attr7" editor="name2" type="string">description + </attribute> + <attribute arch="attrC" editor="name2" type="string">description + </attribute> + <attribute arch="attrD" editor="name2" type="string">description + </attribute> + <attribute arch="attrE" editor="name2" type="string">description + </attribute> + <attribute arch="attrF" editor="name2" type="string">description + </attribute> + </type> + <type number="3" name="name3"> + <import_type name="name1"/> + <import_type name="name2"/> + <description>description3</description> + <attribute arch="attr8" editor="name3" type="string">description + </attribute> + <attribute arch="attr9" editor="name3" type="string">description + </attribute> + <attribute arch="attrA" editor="name3" type="string">description + </attribute> + <attribute arch="attrB" editor="name3" type="string">description + </attribute> + <attribute arch="attrC" editor="name3" type="string">description + </attribute> + <attribute arch="attrD" editor="name3" type="string">description + </attribute> + <attribute arch="attrE" editor="name3" type="string">description + </attribute> + <attribute arch="attrF" editor="name3" type="string">description + </attribute> + </type> +</types> Property changes on: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-import2-types.xml ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/xml \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +LF \ No newline at end of property Added: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault1-result.txt =================================================================== --- trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault1-result.txt (rev 0) +++ trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault1-result.txt 2013-05-31 14:06:09 UTC (rev 9252) @@ -0,0 +1,6 @@ +errors=false +type:1,name1 +: +: +text/msg[default] section=2/default + Property changes on: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault1-result.txt ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +LF \ No newline at end of property Added: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault1-types.xml =================================================================== --- trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault1-types.xml (rev 0) +++ trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault1-types.xml 2013-05-31 14:06:09 UTC (rev 9252) @@ -0,0 +1,16 @@ +<?xml version="1.0" standalone="no" ?> + +<!DOCTYPE types SYSTEM "types.dtd"> +<types> + <bitmasks/> + <lists/> + <ignorelists/> + <default_type> + <attribute arch_begin="msg" arch_end="endmsg" editor="default" type="text"> + msg + </attribute> + </default_type> + <type number="1" name="name1"> + <description>description</description> + </type> +</types> Property changes on: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault1-types.xml ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/xml \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +LF \ No newline at end of property Added: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault2-result.txt =================================================================== --- trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault2-result.txt (rev 0) +++ trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault2-result.txt 2013-05-31 14:06:09 UTC (rev 9252) @@ -0,0 +1,6 @@ +errors=false +type:1,name1 +: +: +text/msg[name1] section=2/name1 + Property changes on: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault2-result.txt ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +LF \ No newline at end of property Added: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault2-types.xml =================================================================== --- trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault2-types.xml (rev 0) +++ trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault2-types.xml 2013-05-31 14:06:09 UTC (rev 9252) @@ -0,0 +1,19 @@ +<?xml version="1.0" standalone="no" ?> + +<!DOCTYPE types SYSTEM "types.dtd"> +<types> + <bitmasks/> + <lists/> + <ignorelists/> + <default_type> + <attribute arch_begin="msg" arch_end="endmsg" editor="default" type="text"> + msg1 + </attribute> + </default_type> + <type number="1" name="name1"> + <description>description</description> + <attribute arch_begin="msg" arch_end="endmsg" editor="name1" type="text"> + msg2 + </attribute> + </type> +</types> Property changes on: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault2-types.xml ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/xml \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +LF \ No newline at end of property Added: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault3-result.txt =================================================================== --- trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault3-result.txt (rev 0) +++ trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault3-result.txt 2013-05-31 14:06:09 UTC (rev 9252) @@ -0,0 +1,5 @@ +errors=false +type:1,name1 +: +: + Property changes on: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault3-result.txt ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +LF \ No newline at end of property Added: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault3-types.xml =================================================================== --- trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault3-types.xml (rev 0) +++ trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault3-types.xml 2013-05-31 14:06:09 UTC (rev 9252) @@ -0,0 +1,19 @@ +<?xml version="1.0" standalone="no" ?> + +<!DOCTYPE types SYSTEM "types.dtd"> +<types> + <bitmasks/> + <lists/> + <ignorelists/> + <default_type> + <attribute arch_begin="msg" arch_end="endmsg" editor="default" type="text"> + msg1 + </attribute> + </default_type> + <type number="1" name="name1"> + <ignore> + <attribute arch="msg"/> + </ignore> + <description>description</description> + </type> +</types> Property changes on: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-msgDefault3-types.xml ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/xml \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +LF \ No newline at end of property Added: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-test1-result.txt =================================================================== --- trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-test1-result.txt (rev 0) +++ trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-test1-result.txt 2013-05-31 14:06:09 UTC (rev 9252) @@ -0,0 +1,7 @@ +errors=false +type:123,name 123 +: +: +fixed/f[v] section=1/Special +string/name[name_editor] section=0/General + Property changes on: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-test1-result.txt ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +LF \ No newline at end of property Added: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-test1-types.xml =================================================================== --- trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-test1-types.xml (rev 0) +++ trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-test1-types.xml 2013-05-31 14:06:09 UTC (rev 9252) @@ -0,0 +1,17 @@ +<?xml version="1.0" standalone="no" ?> + +<!DOCTYPE types SYSTEM "types.dtd"> +<types> + <bitmasks/> + <lists/> + <ignorelists/> + <default_type> + <attribute arch="name" editor="name_editor" type="string">name + description + </attribute> + </default_type> + <type number="123" name="name 123"> + <description>description 123</description> + <attribute arch="f" value="v" type="fixed"/> + </type> +</types> Property changes on: trunk/src/model/src/test/resources/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest-test1-types.xml ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/xml \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +LF \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2013-06-02 19:28:27
|
Revision: 9261 http://sourceforge.net/p/gridarta/code/9261 Author: akirschbaum Date: 2013-06-02 19:28:21 +0000 (Sun, 02 Jun 2013) Log Message: ----------- Disable warning about constructor calls from clone(). Modified Paths: -------------- trunk/gridarta.ipr trunk/src/crossfire/src/main/java/net/sf/gridarta/var/crossfire/model/maparchobject/MapArchObject.java trunk/src/model/src/main/java/net/sf/gridarta/model/baseobject/AbstractBaseObject.java trunk/src/model/src/main/java/net/sf/gridarta/model/baseobject/GameObjectText.java trunk/src/model/src/main/java/net/sf/gridarta/model/maparchobject/AbstractMapArchObject.java Modified: trunk/gridarta.ipr =================================================================== --- trunk/gridarta.ipr 2013-06-02 18:00:10 UTC (rev 9260) +++ trunk/gridarta.ipr 2013-06-02 19:28:21 UTC (rev 9261) @@ -363,7 +363,6 @@ <option name="m_maxLength" value="64" /> </inspection_tool> <inspection_tool class="ClassReferencesSubclass" enabled="true" level="WARNING" enabled_by_default="true" /> - <inspection_tool class="CloneCallsConstructors" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="CloneDeclaresCloneNotSupported" enabled="false" level="WARNING" enabled_by_default="false" /> <inspection_tool class="CloneInNonCloneableClass" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="CloneableImplementsClone" enabled="true" level="WARNING" enabled_by_default="true"> Modified: trunk/src/crossfire/src/main/java/net/sf/gridarta/var/crossfire/model/maparchobject/MapArchObject.java =================================================================== --- trunk/src/crossfire/src/main/java/net/sf/gridarta/var/crossfire/model/maparchobject/MapArchObject.java 2013-06-02 18:00:10 UTC (rev 9260) +++ trunk/src/crossfire/src/main/java/net/sf/gridarta/var/crossfire/model/maparchobject/MapArchObject.java 2013-06-02 19:28:21 UTC (rev 9261) @@ -595,7 +595,6 @@ @Override public MapArchObject clone() { final MapArchObject clone = super.clone(); - //noinspection CloneCallsConstructors clone.loreText = new StringBuilder(loreText.toString()); return clone; } Modified: trunk/src/model/src/main/java/net/sf/gridarta/model/baseobject/AbstractBaseObject.java =================================================================== --- trunk/src/model/src/main/java/net/sf/gridarta/model/baseobject/AbstractBaseObject.java 2013-06-02 18:00:10 UTC (rev 9260) +++ trunk/src/model/src/main/java/net/sf/gridarta/model/baseobject/AbstractBaseObject.java 2013-06-02 19:28:21 UTC (rev 9261) @@ -710,7 +710,6 @@ // clone.archetype = archetype; // will NOT be cloned: archetypes are unique clone.gameObjectText = gameObjectText.clone(); if (msgText != null) { - //noinspection CloneCallsConstructors clone.msgText = new StringBuilder(msgText); } clone.multi = null; Modified: trunk/src/model/src/main/java/net/sf/gridarta/model/baseobject/GameObjectText.java =================================================================== --- trunk/src/model/src/main/java/net/sf/gridarta/model/baseobject/GameObjectText.java 2013-06-02 18:00:10 UTC (rev 9260) +++ trunk/src/model/src/main/java/net/sf/gridarta/model/baseobject/GameObjectText.java 2013-06-02 19:28:21 UTC (rev 9261) @@ -107,7 +107,6 @@ } catch (final CloneNotSupportedException ex) { throw new AssertionError(ex); } - //noinspection CloneCallsConstructors clone.objectText = new StringBuilder(objectText); clone.attributeCache = new HashMap<String, String>(attributeCache); return clone; Modified: trunk/src/model/src/main/java/net/sf/gridarta/model/maparchobject/AbstractMapArchObject.java =================================================================== --- trunk/src/model/src/main/java/net/sf/gridarta/model/maparchobject/AbstractMapArchObject.java 2013-06-02 18:00:10 UTC (rev 9260) +++ trunk/src/model/src/main/java/net/sf/gridarta/model/maparchobject/AbstractMapArchObject.java 2013-06-02 19:28:21 UTC (rev 9261) @@ -633,7 +633,6 @@ } catch (final CloneNotSupportedException ex) { throw new AssertionError(ex); } - //noinspection CloneCallsConstructors clone.msgText = new StringBuilder(msgText.toString()); clone.tilePaths = tilePaths.clone(); return clone.getThis(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |