You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(103) |
Jun
(121) |
Jul
(16) |
Aug
(67) |
Sep
(126) |
Oct
(161) |
Nov
(164) |
Dec
(588) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(394) |
Feb
(181) |
Mar
(131) |
Apr
(180) |
May
(255) |
Jun
(11) |
Jul
(79) |
Aug
(70) |
Sep
(274) |
Oct
(138) |
Nov
(195) |
Dec
(8) |
2008 |
Jan
(3) |
Feb
(142) |
Mar
(162) |
Apr
(124) |
May
(148) |
Jun
(157) |
Jul
(425) |
Aug
(373) |
Sep
(264) |
Oct
(315) |
Nov
(225) |
Dec
(6) |
2009 |
Jan
(67) |
Feb
(78) |
Mar
(279) |
Apr
(294) |
May
(92) |
Jun
(65) |
Jul
(134) |
Aug
(41) |
Sep
(138) |
Oct
(125) |
Nov
(126) |
Dec
(122) |
2010 |
Jan
(15) |
Feb
(48) |
Mar
(9) |
Apr
(195) |
May
(373) |
Jun
(507) |
Jul
(42) |
Aug
(16) |
Sep
(38) |
Oct
(81) |
Nov
(64) |
Dec
(18) |
2011 |
Jan
(13) |
Feb
(12) |
Mar
(39) |
Apr
(1) |
May
(2) |
Jun
(27) |
Jul
(27) |
Aug
(31) |
Sep
(14) |
Oct
(102) |
Nov
(20) |
Dec
(37) |
2012 |
Jan
(22) |
Feb
(1) |
Mar
(1) |
Apr
(2) |
May
(2) |
Jun
(18) |
Jul
(6) |
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
(47) |
Jun
(7) |
Jul
(107) |
Aug
|
Sep
|
Oct
(112) |
Nov
(31) |
Dec
(17) |
2014 |
Jan
(29) |
Feb
(111) |
Mar
(34) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(18) |
Dec
(10) |
From: <aki...@us...> - 2006-12-12 03:39:18
|
Revision: 1052 http://svn.sourceforge.net/gridarta/?rev=1052&view=rev Author: akirschbaum Date: 2006-12-11 12:21:20 -0800 (Mon, 11 Dec 2006) Log Message: ----------- Rename variable name. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainControl.java trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-11 20:06:48 UTC (rev 1051) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-11 20:21:20 UTC (rev 1052) @@ -172,7 +172,7 @@ private CFArchTypeList typeList = null; /** Pickmaps cannot be edited while lockedPickmaps is true. */ - private boolean pickmapsLocked = false; + private boolean lockAllPickmaps = false; private FaceObjects faceObjects; @@ -410,7 +410,7 @@ */ void setGlobalSettings(final String arch, String map, final String script, final boolean baseImageSet, final boolean load, final boolean mapTileBottom) { CSettings.getInstance(IGUIConstants.APP_NAME).setProperty(USE_IMAGESET, baseImageSet ? "base" : "none"); - CSettings.getInstance(IGUIConstants.APP_NAME).setProperty(PICKMAPS_LOCKED, pickmapsLocked ? "true" : "false"); + CSettings.getInstance(IGUIConstants.APP_NAME).setProperty(PICKMAPS_LOCKED, isLockAllPickmaps() ? "true" : "false"); readGlobalSettings(); refreshMenusAndToolbars(); @@ -447,7 +447,7 @@ } public boolean isLockAllPickmaps() { - return pickmapsLocked; + return lockAllPickmaps; } /** Refresh the active map view, if there is one. */ @@ -1134,8 +1134,8 @@ showPreferencesDialog(mainView, prefsGroup, false); } - void setLockAllPickmaps(final boolean state) { - pickmapsLocked = state; + void setLockAllPickmaps(final boolean lockAllPickmaps) { + this.lockAllPickmaps = lockAllPickmaps; } /** Invoked when user wants to exit from the program. */ Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2006-12-11 20:06:48 UTC (rev 1051) +++ trunk/daimonin/src/daieditor/CMainControl.java 2006-12-11 20:21:20 UTC (rev 1052) @@ -257,7 +257,7 @@ private CFArchTypeList typeList = null; /** Pickmaps cannot be edited while lockedPickmaps is true. */ - private boolean pickmapsLocked = false; + private boolean lockAllPickmaps = false; /** Client Control Component. */ private ProcessRunner controlClient; @@ -678,7 +678,7 @@ mainView.setMapTileListBottom(prefs.getBoolean(MAP_TILE_LIST_BOTTOM_KEY, MAP_TILE_LIST_BOTTOM_DEFAULT)); - pickmapsLocked = prefs.getBoolean(PICKMAPS_LOCKED, false); + lockAllPickmaps = prefs.getBoolean(PICKMAPS_LOCKED, false); // docu version if (IGUIConstants.DOCU_VERSION > prefs.getInt(DOCU_VERSION_KEY, 0)) { @@ -751,7 +751,7 @@ } public boolean isLockAllPickmaps() { - return pickmapsLocked; + return lockAllPickmaps; } /** Refresh the active map view, if there is one. */ @@ -1494,8 +1494,8 @@ showPreferencesDialog(mainView, prefsGroup, false); } - void setLockAllPickmaps(final boolean state) { - pickmapsLocked = state; + void setLockAllPickmaps(final boolean lockAllPickmaps) { + this.lockAllPickmaps = lockAllPickmaps; } /** Invoked to show the next tip of the day or bring the tip of the day to front. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-12 03:39:17
|
Revision: 1051 http://svn.sourceforge.net/gridarta/?rev=1051&view=rev Author: akirschbaum Date: 2006-12-11 12:06:48 -0800 (Mon, 11 Dec 2006) Log Message: ----------- Fix typo. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainControl.java Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-10 23:18:18 UTC (rev 1050) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-11 20:06:48 UTC (rev 1051) @@ -1126,7 +1126,7 @@ public void options() { if (prefsGroup == null) { prefsGroup = new PreferencesGroup( - "Gridarta for Daimonin", + "Gridarta for Crossfire", new ResPrefs(this), new GUIPrefs(this) ); // prefsGroup This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-12 03:39:17
|
Revision: 1026 http://svn.sourceforge.net/gridarta/?rev=1026&view=rev Author: akirschbaum Date: 2006-12-10 10:05:24 -0800 (Sun, 10 Dec 2006) Log Message: ----------- Whitespace change. Modified Paths: -------------- trunk/daimonin/src/daieditor/CAttribDialog.java Modified: trunk/daimonin/src/daieditor/CAttribDialog.java =================================================================== --- trunk/daimonin/src/daieditor/CAttribDialog.java 2006-12-10 17:47:57 UTC (rev 1025) +++ trunk/daimonin/src/daieditor/CAttribDialog.java 2006-12-10 18:05:24 UTC (rev 1026) @@ -1217,7 +1217,6 @@ } break; case DBLLIST: { - final int val1 = (Integer) typelist.getListTable().get(attr.ref.getMisc()[0]).get(2 * ((JComboBox[]) attr.input)[0].getSelectedIndex()); final int val2 = (Integer) typelist.getListTable().get(attr.ref.getMisc()[1]).get(2 * ((JComboBox[]) attr.input)[1].getSelectedIndex()); final int combinedVal = val1 + val2; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-12 03:38:15
|
Revision: 1011 http://svn.sourceforge.net/gridarta/?rev=1011&view=rev Author: akirschbaum Date: 2006-12-10 06:23:47 -0800 (Sun, 10 Dec 2006) Log Message: ----------- Rename variable name. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainControl.java trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-10 14:16:46 UTC (rev 1010) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-10 14:23:47 UTC (rev 1011) @@ -1075,11 +1075,11 @@ * In this method, the filename is already given, so the image * is created directly (if possible). * @param filename Name of the png image file to create. - * @param mapc The controller of map to save. + * @param mapControl The controller of map to save. */ - public void createImageWanted(final MapControl mapc, String filename) { + public void createImageWanted(final MapControl mapControl, String filename) { - if (mapc == null) { + if (mapControl == null) { // there is no map open (should not happen due to disabled menus) ACTION_FACTORY.showMessageDialog(mainView, "createImgNoMap"); } else { @@ -1087,9 +1087,9 @@ if (!filename.endsWith(".png")) { filename += ".png"; } - mapc.getMapViewFrame().printFullImage(filename); + mapControl.getMapViewFrame().printFullImage(filename); if (log.isInfoEnabled()) { - log.info(ACTION_FACTORY.format("imageCreated", filename, mapc.getMapFileName())); + log.info(ACTION_FACTORY.format("imageCreated", filename, mapControl.getMapFileName())); } } catch (final IOException e) { ACTION_FACTORY.showMessageDialog(mainView, "createImgIOException", filename); Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2006-12-10 14:16:46 UTC (rev 1010) +++ trunk/daimonin/src/daieditor/CMainControl.java 2006-12-10 14:23:47 UTC (rev 1011) @@ -1424,9 +1424,9 @@ * @param filename Name of the png image file to create. */ public void createImageWanted(String filename) { - final MapControl mapc = currentMap; // control of current map + final MapControl mapControl = currentMap; // control of current map - if (mapc == null) { + if (mapControl == null) { // there is no map open (should not happen due to disabled menus) ACTION_FACTORY.showMessageDialog(mainView, "createImgNoMap"); } else { @@ -1434,9 +1434,9 @@ if (!filename.endsWith(".png")) { filename += ".png"; } - mapc.getMapViewFrame().printFullImage(filename); + mapControl.getMapViewFrame().printFullImage(filename); if (log.isInfoEnabled()) { - log.info(ACTION_FACTORY.format("imageCreated", filename, mapc.getMapFileName())); + log.info(ACTION_FACTORY.format("imageCreated", filename, mapControl.getMapFileName())); } } catch (final IOException e) { ACTION_FACTORY.showMessageDialog(mainView, "createImgIOException", filename); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-12 03:37:38
|
Revision: 1027 http://svn.sourceforge.net/gridarta/?rev=1027&view=rev Author: akirschbaum Date: 2006-12-10 10:10:58 -0800 (Sun, 10 Dec 2006) Log Message: ----------- Add attribute types DBLLIST, FACENAME and ANIMNAME to cfeditor. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CAttribDialog.java trunk/crossfire/src/cfeditor/CFArchAttrib.java trunk/crossfire/src/cfeditor/gameobject/ArchAttribType.java Modified: trunk/crossfire/src/cfeditor/CAttribDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-12-10 18:05:24 UTC (rev 1026) +++ trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-12-10 18:10:58 UTC (rev 1027) @@ -27,6 +27,7 @@ import cfeditor.gameobject.ArchAttribType; import cfeditor.gameobject.ArchetypeSet; import cfeditor.gameobject.GameObject; +import java.awt.BorderLayout; import java.awt.CardLayout; import java.awt.Color; import java.awt.Component; @@ -85,6 +86,8 @@ import javax.swing.text.StyleConstants; import javax.swing.text.StyleContext; import net.sf.gridarta.gameobject.Archetype; +import net.sf.gridarta.gameobject.NamedObject; +import net.sf.gridarta.gameobject.NamedObjects; import net.sf.gridarta.help.Help; import net.sf.japi.swing.ActionFactory; import org.apache.log4j.Logger; @@ -670,7 +673,9 @@ ((DialogAttrib<JFormattedTextField>) newAttr).input = input; } break; - case STRING: { + case STRING: + case FACENAME: + case ANIMNAME: { final String dtxt; if (type.getAttr()[i].getNameOld().equalsIgnoreCase("name")) { if (gameObject.getObjName() != null && gameObject.getObjName().length() > 0) { @@ -695,6 +700,22 @@ cLabel = new JLabel(type.getAttr()[i].getNameNew() + ": "); newAttr = new DialogAttrib<JTextField>(type.getAttr()[i]); break; + case FACENAME: + case ANIMNAME: + newAttr = new DialogAttrib<JTextField>(attrib); + switch (dType) { + case FACENAME: + cLabel = new JButton(new TreeChooseAction(attrib.getNameNew() + ": ", input, mainControl.getFaceObjects())); + break; + case ANIMNAME: + cLabel = new JButton(new TreeChooseAction(attrib.getNameNew() + ": ", input, mainControl.getAnimationObjects())); + break; + default: + assert false; + cLabel = null; + break; + } + break; default: assert false; newAttr = null; @@ -738,6 +759,38 @@ ((DialogAttrib<JComboBox>) newAttr).input = input; } break; + case DBLLIST: { + final JPanel compo = new JPanel(new BorderLayout()); + cLabel = new JLabel(attrib.getNameNew() + ": "); + cLabel.setForeground(IGUIConstants.INT_COLOR); + newAttr = new DialogAttrib<JComboBox[]>(attrib); + // create ComboBox with parsed selection + final JComboBox[] inputs = new JComboBox[2]; + if (attrib.getMisc() != null && typelist.getListTable().containsKey(attrib.getMisc()[0]) && typelist.getListTable().containsKey(attrib.getMisc()[1])) { + // Hack to set preselected if available + final int active = gameObject.getAttributeInt(nameOld); + final int[] activepart = {active & 0x0F, active & 0xF0}; + // build the lists from vector data + for (int j = 0; j < 2; j++) { + final List<?> listData = typelist.getListTable().get(attrib.getMisc()[j]); + inputs[j] = buildArrayBox(attrib, listData); + for (int k = 0; (double) k < listData.size() / 2.0; k++) { + if ((Integer) listData.get(k << 1) == activepart[j]) { + inputs[j].setSelectedIndex(k); // set active selection + break; + } + } + } + compo.add(inputs[0], BorderLayout.NORTH); + compo.add(inputs[1], BorderLayout.SOUTH); + cComp = compo; + } else { + // error: list data is missing or corrupt + cComp = new JLabel("Error: Undefined List"); + } + ((DialogAttrib<JComboBox[]>) newAttr).input = inputs; + } + break; case BITMASK: { newAttr = new BitmaskAttrib(type.getAttr()[i]); if (type.getAttr()[i].getMisc() != null && typelist.getBitmaskTable().containsKey(type.getAttr()[i].getMisc()[0])) { @@ -920,7 +973,9 @@ } } break; - case STRING: { + case STRING: + case FACENAME: + case ANIMNAME: { final String value = ((DialogAttrib<JTextField>) attr).input.getText(); // the attrib value if (value != null && value.length() > 0) { doc.insertString(doc.getLength(), attr.ref.getNameNew() + " = " + value + '\n', docStyle); @@ -936,10 +991,29 @@ } } break; + case DBLLIST: { + final String value1 = ((DialogAttrib<JComboBox[]>) attr).input[0].getSelectedItem().toString().trim(); + final String value2 = ((DialogAttrib<JComboBox[]>) attr).input[1].getSelectedItem().toString().trim(); + String out = null; + if (value1 != null && value1.length() > 0 && !value1.startsWith("<")) { + out = value1; + } + if (value2 != null && value2.length() > 0 && !value2.startsWith("<")) { + if (out == null) { + out = value2; + } else { + out += " / " + value2; + } + } + if (out != null) { + doc.insertString(doc.getLength(), attr.ref.getNameNew() + " = " + out + "\n", docStyle); + } + } + break; case BITMASK: { final String value = ((BitmaskAttrib) attr).input.getText().trim(); if (value != null && value.length() > 0 && !value.startsWith("<")) { - doc.insertString(doc.getLength(), attr.ref.getNameNew() + " = " + value + '\n', docStyle); + doc.insertString(doc.getLength(), attr.ref.getNameNew() + " = " + value + "\n", docStyle); } } break; @@ -1075,7 +1149,9 @@ } } break; - case STRING: { + case STRING: + case FACENAME: + case ANIMNAME: { // a String attribute final String inline = ((DialogAttrib<JTextField>) attr).input.getText().trim(); @@ -1148,6 +1224,16 @@ } } break; + case DBLLIST: { + final int val1 = (Integer) typelist.getListTable().get(attr.ref.getMisc()[0]).get(2 * ((JComboBox[]) attr.input)[0].getSelectedIndex()); + final int val2 = (Integer) typelist.getListTable().get(attr.ref.getMisc()[1]).get(2 * ((JComboBox[]) attr.input)[1].getSelectedIndex()); + final int combinedVal = val1 + val2; + + if (archetype.getAttributeInt(attr.ref.getNameOld()) != combinedVal) { + newArchText = newArchText + attr.ref.getNameOld() + " " + combinedVal + "\n"; + } + } + break; case BITMASK: { // a bitmask attribute (similar to integer, but easier because no parsing needed) final int value = ((BitmaskAttrib) attr).getValue(); // get bitmask value @@ -1689,4 +1775,45 @@ } // class StringKeyManager + /** Action for choosing a face or animation. */ + private static final class TreeChooseAction extends AbstractAction { + + /** JTextField to update upon tree selection. */ + private JTextField textField; + + /** Objects providing the tree. */ + private NamedObjects<? extends NamedObject> objects; + + /** + * Create a TreeChooseAction. + * @param text text for label / button + * @param textField JTextField to update upon tree selection + * @param objects NamedObjects that provide the tree + */ + private TreeChooseAction(final String text, final JTextField textField, final NamedObjects<? extends NamedObject> objects) { + super(text); + this.textField = textField; + this.objects = objects; + } + + /** {@inheritDoc} */ + public void actionPerformed(final ActionEvent e) { + String initial = textField.getText(); + final NamedObject selected = objects.get(initial); + if (selected != null) { + initial = selected.getPath(); + } + final String newValue = objects.showNodeChooserDialog(textField, initial); + if (newValue != null) { + textField.setText(newValue); + } + } + + /** {@inheritDoc} */ + @Override protected Object clone() throws CloneNotSupportedException { + return super.clone(); + } + + } // class TreeChooseAction + } // class CAttribDialog Modified: trunk/crossfire/src/cfeditor/CFArchAttrib.java =================================================================== --- trunk/crossfire/src/cfeditor/CFArchAttrib.java 2006-12-10 18:05:24 UTC (rev 1026) +++ trunk/crossfire/src/cfeditor/CFArchAttrib.java 2006-12-10 18:10:58 UTC (rev 1027) @@ -159,6 +159,10 @@ } else if (atype.equalsIgnoreCase("string")) { dataType = ArchAttribType.STRING; } else if (atype.equalsIgnoreCase("text")) { + dataType = ArchAttribType.FACENAME; + } else if (atype.equalsIgnoreCase("animname")) { + dataType = ArchAttribType.ANIMNAME; + } else if (atype.equalsIgnoreCase("text")) { dataType = ArchAttribType.TEXT; // for text data, the terminating string has to be read too if ((a1 = root.getAttribute(XML_KEY_ARCH_BEGIN)) != null) { @@ -219,6 +223,29 @@ } else { log.warn("In '" + IGUIConstants.TYPEDEF_FILE + "', type " + typeName + ": List \"" + listName + "\" is undefined."); } + } else if ("doublelist".startsWith(atype)) { + // got a doublelist attribute + final String listNames = atype.substring(11).trim(); + final int seppos = listNames.indexOf(','); + + if (seppos == -1 || seppos == listNames.length() - 1) { + log.error("In '" + IGUIConstants.TYPEDEF_FILE + "': Type " + typeName + ", double list: '" + atype + "' does not contain two comma-separated lists."); + return false; + } + + + final String listName1 = listNames.substring(0, seppos); + final String listName2 = listNames.substring(seppos + 1); + + if (tlist.getListTable().containsKey(listName1) && tlist.getListTable().containsKey(listName2)) { + // the lists are well defined + dataType = ArchAttribType.DBLLIST; + misc = new String[2]; + misc[0] = listName1; // store list name in misc[0] + misc[1] = listName2; // store list name in misc[1] + } else { + log.error("In '" + IGUIConstants.TYPEDEF_FILE + "', type " + typeName + ": List \"" + listName1 + "\" or \"" + listName2 + "\" is undefined."); + } } else if ("treasurelist".equalsIgnoreCase(atype)) { dataType = ArchAttribType.TREASURE; } else { Modified: trunk/crossfire/src/cfeditor/gameobject/ArchAttribType.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/ArchAttribType.java 2006-12-10 18:05:24 UTC (rev 1026) +++ trunk/crossfire/src/cfeditor/gameobject/ArchAttribType.java 2006-12-10 18:10:58 UTC (rev 1027) @@ -66,4 +66,13 @@ /** Treasure -> treasurelist (Textfield and Tree). */ TREASURE, + /** Double List -> 2 × Combobox. */ + DBLLIST, + + /** Face name -> Textfield and Tree. */ + FACENAME, + + /** Animation name -> Textfield and Tree. */ + ANIMNAME + } // enum ArchAttribType This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-12 03:37:38
|
Revision: 1015 http://svn.sourceforge.net/gridarta/?rev=1015&view=rev Author: akirschbaum Date: 2006-12-10 07:41:34 -0800 (Sun, 10 Dec 2006) Log Message: ----------- Do not automatically add .png to image file names. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainControl.java trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-10 15:28:08 UTC (rev 1014) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-10 15:41:34 UTC (rev 1015) @@ -1077,16 +1077,13 @@ * @param filename Name of the png image file to create. * @param mapControl The controller of map to save. */ - public void createImageWanted(final MapControl mapControl, String filename) { + public void createImageWanted(final MapControl mapControl, final String filename) { if (mapControl == null) { // there is no map open (should not happen due to disabled menus) ACTION_FACTORY.showMessageDialog(mainView, "createImgNoMap"); } else { try { - if (!filename.endsWith(".png")) { - filename += ".png"; - } mapControl.getMapViewFrame().printFullImage(filename); if (log.isInfoEnabled()) { log.info(ACTION_FACTORY.format("imageCreated", filename, mapControl.getMapFileName())); Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2006-12-10 15:28:08 UTC (rev 1014) +++ trunk/daimonin/src/daieditor/CMainControl.java 2006-12-10 15:41:34 UTC (rev 1015) @@ -1423,7 +1423,7 @@ * is created directly (if possible). * @param filename Name of the png image file to create. */ - public void createImageWanted(String filename) { + public void createImageWanted(final String filename) { final MapControl mapControl = currentMap; // control of current map if (mapControl == null) { @@ -1431,9 +1431,6 @@ ACTION_FACTORY.showMessageDialog(mainView, "createImgNoMap"); } else { try { - if (!filename.endsWith(".png")) { - filename += ".png"; - } mapControl.getMapViewFrame().printFullImage(filename); if (log.isInfoEnabled()) { log.info(ACTION_FACTORY.format("imageCreated", filename, mapControl.getMapFileName())); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-12 03:37:38
|
Revision: 1029 http://svn.sourceforge.net/gridarta/?rev=1029&view=rev Author: akirschbaum Date: 2006-12-10 10:40:10 -0800 (Sun, 10 Dec 2006) Log Message: ----------- Simplify expressions. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CAttribDialog.java Modified: trunk/crossfire/src/cfeditor/CAttribDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-12-10 18:29:56 UTC (rev 1028) +++ trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-12-10 18:40:10 UTC (rev 1029) @@ -577,7 +577,7 @@ switch (dType) { case TEXT: { isText = true; // text section (need special embedding without additional scrollbars) - newAttr = new DialogAttrib<JTextArea>(type.getAttr()[i]); + newAttr = new DialogAttrib<JTextArea>(attrib); String text = ""; if (nameOld.equalsIgnoreCase("msg")) { if (archetype.getMsgText() != null && archetype.getMsgText().length() > 0 && (gameObject.getMsgText() == null || gameObject.getMsgText().trim().length() == 0)) { @@ -598,21 +598,21 @@ break; case BOOL: case BOOL_SPEC: { - newAttr = new DialogAttrib<JCheckBox>(type.getAttr()[i]); + newAttr = new DialogAttrib<JCheckBox>(attrib); final JCheckBox input; switch (dType) { case BOOL: // normal bool - input = new JCheckBox(type.getAttr()[i].getNameNew(), (gameObject.getAttributeInt(type.getAttr()[i].getNameOld()) == 1)); + input = new JCheckBox(attrib.getNameNew(), gameObject.getAttributeInt(nameOld) == 1); break; case BOOL_SPEC: { // parse values for customized bool - final String trueVal = type.getAttr()[i].getMisc()[0]; + final String trueVal = attrib.getMisc()[0]; if (trueVal.equals("0")) { - final String attrString = gameObject.getAttributeString(type.getAttr()[i].getNameOld()); - input = new JCheckBox(type.getAttr()[i].getNameNew(), (attrString.length() == 0 || attrString.equals("0"))); + final String attrString = gameObject.getAttributeString(nameOld); + input = new JCheckBox(attrib.getNameNew(), attrString.length() == 0 || attrString.equals("0")); } else { - input = new JCheckBox(type.getAttr()[i].getNameNew(), (gameObject.getAttributeString(type.getAttr()[i].getNameOld()).equals(trueVal))); + input = new JCheckBox(attrib.getNameNew(), gameObject.getAttributeString(nameOld).equals(trueVal)); } } break; @@ -628,10 +628,10 @@ case INT: case LONG: case FLOAT: { - cLabel = new JLabel(type.getAttr()[i].getNameNew() + ": "); + cLabel = new JLabel(attrib.getNameNew() + ": "); cLabel.setForeground(dType == ArchAttribType.FLOAT ? IGUIConstants.FLOAT_COLOR : IGUIConstants.INT_COLOR); - newAttr = new DialogAttrib<JFormattedTextField>(type.getAttr()[i]); - final int fieldLength = type.getAttr()[i].getInputLength() == 0 ? TEXTFIELD_COLUMNS : type.getAttr()[i].getInputLength(); + newAttr = new DialogAttrib<JFormattedTextField>(attrib); + final int fieldLength = attrib.getInputLength() == 0 ? TEXTFIELD_COLUMNS : attrib.getInputLength(); final NumberFormat format; switch (dType) { case INT: @@ -677,7 +677,7 @@ case FACENAME: case ANIMNAME: { final String dtxt; - if (type.getAttr()[i].getNameOld().equalsIgnoreCase("name")) { + if (nameOld.equalsIgnoreCase("name")) { if (gameObject.getObjName() != null && gameObject.getObjName().length() > 0) { dtxt = gameObject.getObjName(); } else if (archetype.getObjName() != null && archetype.getObjName().length() > 0) { @@ -685,20 +685,20 @@ } else { dtxt = archetype.getArchetypeName(); } - } else if (type.getAttr()[i].getNameOld().equalsIgnoreCase("face")) { + } else if (nameOld.equalsIgnoreCase("face")) { if (gameObject.getFaceName() != null && gameObject.getFaceName().length() > 0) { dtxt = gameObject.getFaceName(); } else { dtxt = archetype.getFaceName(); } } else { - dtxt = gameObject.getAttributeString(type.getAttr()[i].getNameOld()); + dtxt = gameObject.getAttributeString(nameOld); } final JTextField input = new JTextField(dtxt, TEXTFIELD_COLUMNS); switch (dType) { case STRING: - cLabel = new JLabel(type.getAttr()[i].getNameNew() + ": "); - newAttr = new DialogAttrib<JTextField>(type.getAttr()[i]); + cLabel = new JLabel(attrib.getNameNew() + ": "); + newAttr = new DialogAttrib<JTextField>(attrib); break; case FACENAME: case ANIMNAME: @@ -728,20 +728,20 @@ case SPELL: case ZSPELL: case LIST: { - cLabel = new JLabel(type.getAttr()[i].getNameNew() + ": "); + cLabel = new JLabel(attrib.getNameNew() + ": "); cLabel.setForeground(IGUIConstants.INT_COLOR); - newAttr = new DialogAttrib<JComboBox>(type.getAttr()[i]); + newAttr = new DialogAttrib<JComboBox>(attrib); // create ComboBox with parsed selection final JComboBox input; switch (dType) { case SPELL: case ZSPELL: - input = buildSpellBox(type.getAttr()[i]); + input = buildSpellBox(attrib); break; case LIST: - if (type.getAttr()[i].getMisc() != null && typelist.getListTable().containsKey(type.getAttr()[i].getMisc()[0])) { + if (attrib.getMisc() != null && typelist.getListTable().containsKey(attrib.getMisc()[0])) { // build the list from vector data - input = buildArrayBox(type.getAttr()[i], typelist.getListTable().get(type.getAttr()[i].getMisc()[0])); + input = buildArrayBox(attrib, typelist.getListTable().get(attrib.getMisc()[0])); } else { // error: list data is missing or corrupt cComp = new JLabel("Error: Undefined List"); @@ -792,12 +792,12 @@ } break; case BITMASK: { - newAttr = new BitmaskAttrib(type.getAttr()[i]); - if (type.getAttr()[i].getMisc() != null && typelist.getBitmaskTable().containsKey(type.getAttr()[i].getMisc()[0])) { + newAttr = new BitmaskAttrib(attrib); + if (attrib.getMisc() != null && typelist.getBitmaskTable().containsKey(attrib.getMisc()[0])) { // fetch the bitmask data, then build the attribute panel - final CAttribBitmask bitmask = typelist.getBitmaskTable().get((String) (type.getAttr()[i].getMisc()[0])); + final CAttribBitmask bitmask = typelist.getBitmaskTable().get((String) (attrib.getMisc()[0])); ((BitmaskAttrib) (DialogAttrib<JTextComponent>) newAttr).bitmask = bitmask; - cLabel = new JButton(new MaskChangeAL(type.getAttr()[i].getNameNew() + ':', (BitmaskAttrib) (DialogAttrib<JTextComponent>) newAttr)); + cLabel = new JButton(new MaskChangeAL(attrib.getNameNew() + ':', (BitmaskAttrib) (DialogAttrib<JTextComponent>) newAttr)); final JTextArea input = new JTextArea(); input.setBackground(getBackground()); input.setEditable(false); @@ -812,9 +812,9 @@ } break; case TREASURE: { - newAttr = new DialogAttrib<JTextField>(type.getAttr()[i]); + newAttr = new DialogAttrib<JTextField>(attrib); // textfield (no direct input, text is set by the treasurelist dialog) - String treasureName = gameObject.getAttributeString(type.getAttr()[i].getNameOld()); + String treasureName = gameObject.getAttributeString(nameOld); if (treasureName.trim().length() == 0 || treasureName.trim().equalsIgnoreCase("none")) { treasureName = CFTreasureListTree.NONE_SYM; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-12 03:37:38
|
Revision: 1020 http://svn.sourceforge.net/gridarta/?rev=1020&view=rev Author: akirschbaum Date: 2006-12-10 08:33:43 -0800 (Sun, 10 Dec 2006) Log Message: ----------- Rename variable name. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2006-12-10 16:23:38 UTC (rev 1019) +++ trunk/daimonin/src/daieditor/CMainControl.java 2006-12-10 16:33:43 UTC (rev 1020) @@ -1426,16 +1426,16 @@ * @param file the png image file to create */ public void createImageWanted(final File file) { - final MapControl mapc = currentMap; // control of current map + final MapControl mapControl = currentMap; // control of current map - if (mapc == null) { + if (mapControl == null) { // there is no map open (should not happen due to disabled menus) ACTION_FACTORY.showMessageDialog(mainView, "createImgNoMap"); } else { try { - mapc.getMapViewFrame().printFullImage(file); + mapControl.getMapViewFrame().printFullImage(file); if (log.isInfoEnabled()) { - log.info(ACTION_FACTORY.format("imageCreated", file, mapc.getMapFileName())); + log.info(ACTION_FACTORY.format("imageCreated", file, mapControl.getMapFileName())); } } catch (final IOException e) { ACTION_FACTORY.showMessageDialog(mainView, "createImgIOException", file); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-12 03:37:37
|
Revision: 1032 http://svn.sourceforge.net/gridarta/?rev=1032&view=rev Author: akirschbaum Date: 2006-12-10 11:14:38 -0800 (Sun, 10 Dec 2006) Log Message: ----------- Unify (remove) functions in MapModel. Modified Paths: -------------- trunk/crossfire/src/cfeditor/map/DefaultMapModel.java trunk/crossfire/src/cfeditor/map/MapControl.java trunk/crossfire/src/cfeditor/map/MapModel.java Modified: trunk/crossfire/src/cfeditor/map/DefaultMapModel.java =================================================================== --- trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-12-10 19:10:17 UTC (rev 1031) +++ trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-12-10 19:14:38 UTC (rev 1032) @@ -92,15 +92,6 @@ return pos; } - /** {@inheritDoc} */ - public String getMapText() { - return getMapArchObject().getText(); - } - - /** {@inheritDoc} */ - public void levelCloseNotify() { - } - /** * Reset the level changed flag to false. */ Modified: trunk/crossfire/src/cfeditor/map/MapControl.java =================================================================== --- trunk/crossfire/src/cfeditor/map/MapControl.java 2006-12-10 19:10:17 UTC (rev 1031) +++ trunk/crossfire/src/cfeditor/map/MapControl.java 2006-12-10 19:14:38 UTC (rev 1032) @@ -181,7 +181,6 @@ public void levelCloseNotify() { levelClosing = true; - mapModel.levelCloseNotify(); } /** Modified: trunk/crossfire/src/cfeditor/map/MapModel.java =================================================================== --- trunk/crossfire/src/cfeditor/map/MapModel.java 2006-12-10 19:10:17 UTC (rev 1031) +++ trunk/crossfire/src/cfeditor/map/MapModel.java 2006-12-10 19:14:38 UTC (rev 1032) @@ -101,17 +101,6 @@ @Nullable GameObject getExit(@Nullable Point hspot); /** - * Return the map description text. - * @return the map description text - */ - String getMapText(); - - /** - * Notify that the level is about to be closed. - */ - void levelCloseNotify(); - - /** * Returns whether a given location contains at least one GameObject. * @param pos Position of the MapSquare (location) to check. * @return <code>true</code> if <var>pos</var> has at least one GameObject, otherwise <code>false</code>. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-12 03:37:16
|
Revision: 1035 http://svn.sourceforge.net/gridarta/?rev=1035&view=rev Author: akirschbaum Date: 2006-12-10 11:54:24 -0800 (Sun, 10 Dec 2006) Log Message: ----------- Unify comments. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainView.java trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java trunk/crossfire/src/cfeditor/map/DefaultMapModel.java Modified: trunk/crossfire/src/cfeditor/CMainView.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainView.java 2006-12-10 19:47:45 UTC (rev 1034) +++ trunk/crossfire/src/cfeditor/CMainView.java 2006-12-10 19:54:24 UTC (rev 1035) @@ -685,58 +685,37 @@ //statusBar.setLevelInfo(level); } - /** - * Invoked when the internal frame view is opened. - * @param event the occurred <code>InternalFrameEvent</code> - */ + /** {@inheritDoc} */ public void internalFrameOpened(final InternalFrameEvent event) { } - /** - * Invoked when the internal frame view is closing. - * @param event the occurred <code>InternalFrameEvent</code> - */ + /** {@inheritDoc} */ public void internalFrameClosing(final InternalFrameEvent event) { final MapViewIFrame view = (MapViewIFrame) event.getSource(); removeLevelView(view); } - /** - * Invoked when the internal frame view is closed. - * @param event the occurred <code>InternalFrameEvent</code> - */ + /** {@inheritDoc} */ public void internalFrameClosed(final InternalFrameEvent event) { } - /** - * Invoked when the internal frame view is iconified. - * @param event the occurred <code>InternalFrameEvent</code> - */ + /** {@inheritDoc} */ public void internalFrameIconified(final InternalFrameEvent event) { final MapViewIFrame view = (MapViewIFrame) event.getSource(); levelViewFocusLostNotify(view); } - /** - * Invoked when the internal frame view is deiconified. - * @param event the occurred <code>InternalFrameEvent</code> - */ + /** {@inheritDoc} */ public void internalFrameDeiconified(final InternalFrameEvent event) { } - /** - * Invoked when the internal frame view is activated. - * @param event the occurred <code>InternalFrameEvent</code> - */ + /** {@inheritDoc} */ public void internalFrameActivated(final InternalFrameEvent event) { final MapViewIFrame view = (MapViewIFrame) event.getSource(); levelViewFocusGainedNotify(view); } - /** - * Invoked when the internal frame view is deactivated. - * @param event the occurred <code>InternalFrameEvent</code> - */ + /** {@inheritDoc} */ public void internalFrameDeactivated(final InternalFrameEvent event) { } Modified: trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java 2006-12-10 19:47:45 UTC (rev 1034) +++ trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java 2006-12-10 19:54:24 UTC (rev 1035) @@ -120,7 +120,7 @@ log.warn("addArchToList: duplicate archetype '" + archetype.getArchetypeName() + "'"); } - /** Loads the Archetypes. */ + /** {@inheritDoc} */ public void loadArchetypes() { final long timeStart = System.currentTimeMillis(); setLoadStatus(LoadStatus.LOADING); // status: loading Modified: trunk/crossfire/src/cfeditor/map/DefaultMapModel.java =================================================================== --- trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-12-10 19:47:45 UTC (rev 1034) +++ trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-12-10 19:54:24 UTC (rev 1035) @@ -246,7 +246,9 @@ return true; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ public boolean insertArchToMap(GameObject newObject, String archName, final GameObject next, final Point pos, final boolean join) { // map coords must be valid if (!isPointValid(pos)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-12 03:37:16
|
Revision: 1055 http://svn.sourceforge.net/gridarta/?rev=1055&view=rev Author: akirschbaum Date: 2006-12-11 13:21:07 -0800 (Mon, 11 Dec 2006) Log Message: ----------- Rename variable and method names. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/CMainMenu.java trunk/crossfire/src/cfeditor/CMapViewBasic.java trunk/crossfire/src/cfeditor/map/DefaultMapModel.java Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-11 20:54:53 UTC (rev 1054) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-11 21:21:07 UTC (rev 1055) @@ -151,7 +151,7 @@ private boolean hasChangedDir = false; /** Indicates whether autojoining is on/off. */ - private boolean autojoin = false; + private boolean autoJoin = false; /** Name of used Image Set (null = none). */ private String imageSet; @@ -333,12 +333,12 @@ setTileEdit(newType); // activate the new type for all views } - public void setAutojoin(final boolean state) { - autojoin = state; + public void setAutoJoin(final boolean autoJoin) { + this.autoJoin = autoJoin; } - public boolean getAutojoin() { - return autojoin; + public boolean isAutoJoin() { + return autoJoin; } public void openHelpWindow() { Modified: trunk/crossfire/src/cfeditor/CMainMenu.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainMenu.java 2006-12-11 20:54:53 UTC (rev 1054) +++ trunk/crossfire/src/cfeditor/CMainMenu.java 2006-12-11 21:21:07 UTC (rev 1055) @@ -634,12 +634,12 @@ autojoin = new CheckBoxMenuEntry("Auto-Joining"); autojoin.setMnemonic('A'); autojoin.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_J, Event.CTRL_MASK)); - autojoin.setChecked(mainControl.getAutojoin()); + autojoin.setChecked(mainControl.isAutoJoin()); autojoin.addActionListener( new ActionListener() { public void actionPerformed(final ActionEvent event) { // toggle autojoining state on/off - mainControl.setAutojoin(autojoin.isChecked()); + mainControl.setAutoJoin(autojoin.isChecked()); } }); menuManager.addMenuEntry("main.map", autojoin); Modified: trunk/crossfire/src/cfeditor/CMapViewBasic.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapViewBasic.java 2006-12-11 20:54:53 UTC (rev 1054) +++ trunk/crossfire/src/cfeditor/CMapViewBasic.java 2006-12-11 21:21:07 UTC (rev 1055) @@ -357,7 +357,7 @@ final Point[] redraw; // return value (coords needing redraw) - if (mainControl.getAutojoin() && gameObject.getArchetype().getJoinList() != null) { + if (mainControl.isAutoJoin() && gameObject.getArchetype().getJoinList() != null) { // this gameObject does autojoining: // first look how many we need Modified: trunk/crossfire/src/cfeditor/map/DefaultMapModel.java =================================================================== --- trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-12-11 20:54:53 UTC (rev 1054) +++ trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-12-11 21:21:07 UTC (rev 1055) @@ -204,7 +204,7 @@ return false; } - if (mainControl.getAutojoin() && join == JOIN_ENABLE && mainControl.getJoinlist() != null && archetype.getJoinList() != null && !archetype.isMulti()) { + if (mainControl.isAutoJoin() && join == JOIN_ENABLE && mainControl.getJoinlist() != null && archetype.getJoinList() != null && !archetype.isMulti()) { // do autojoining if enabled archName = archetype.getJoinList().joinInsert(this, pos); if (archName == null) { @@ -404,7 +404,7 @@ // do autojoining final GameObject temp = getArchetype(node.getArchetypeName()); // get defarch - if (mainControl.getAutojoin() && join == JOIN_ENABLE && mainControl.getJoinlist() != null && temp.getJoinList() != null && !temp.isMulti()) { + if (mainControl.isAutoJoin() && join == JOIN_ENABLE && mainControl.getJoinlist() != null && temp.getJoinList() != null && !temp.isMulti()) { // remove connections to the deleted arch temp.getJoinList().joinDelete(this, pos); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-12-10 23:18:18
|
Revision: 1050 http://svn.sourceforge.net/gridarta/?rev=1050&view=rev Author: christianhujer Date: 2006-12-10 15:18:18 -0800 (Sun, 10 Dec 2006) Log Message: ----------- Improved I/O handling. Modified Paths: -------------- trunk/daimonin/src/daieditor/gameobject/face/FaceObjects.java Modified: trunk/daimonin/src/daieditor/gameobject/face/FaceObjects.java =================================================================== --- trunk/daimonin/src/daieditor/gameobject/face/FaceObjects.java 2006-12-10 23:04:40 UTC (rev 1049) +++ trunk/daimonin/src/daieditor/gameobject/face/FaceObjects.java 2006-12-10 23:18:18 UTC (rev 1050) @@ -38,6 +38,7 @@ import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; +import java.io.InputStream; import net.sf.gridarta.gameobject.face.AbstractFaceObjects; import net.sf.japi.swing.ActionFactory; import net.sf.japi.swing.Progress; @@ -222,24 +223,21 @@ int numBytes = 0; final String path = dir + "/dev/editor/bug.101.png"; - FileInputStream fin = null; // XXX: This code limits image support to an image size of 1024 * 50 bytes = 50k final byte[] imgBuffer = new byte[IMAGE_BUFFER_SIZE]; try { - fin = new FileInputStream(path); - numBytes = fin.read(imgBuffer, 0, IMAGE_BUFFER_SIZE); + final InputStream fin = new FileInputStream(path); + try { + numBytes = fin.read(imgBuffer, 0, IMAGE_BUFFER_SIZE); + } finally { + fin.close(); + } } catch (final FileNotFoundException e) { ACTION_FACTORY.showMessageDialog(progress.getParentComponent(), "archCollectErrorFileNotFound", path); return; } catch (final IOException e) { ACTION_FACTORY.showMessageDialog(progress.getParentComponent(), "archCollectErrorIOException", path, e); return; - } finally { - try { - fin.close(); - } catch (final Exception e) { /* ignore */ } finally { - fin = null; - } } if (numBytes == -1) { @@ -264,13 +262,12 @@ try { // try to open the png image file - fin = new FileInputStream(path2); + final InputStream fin = new FileInputStream(path2); // 50000 isn't a nice constant. But there won't be pngs larger than this. try { numBytes = fin.read(imgBuffer, 0, IMAGE_BUFFER_SIZE); } finally { fin.close(); - fin = null; } } catch (final FileNotFoundException e) { ACTION_FACTORY.showMessageDialog(progress.getParentComponent(), "archCollectErrorFileNotFound", path2); @@ -304,19 +301,13 @@ } finally { try { binFile.close(); - } catch (final Exception e) { /* ignore */ } finally { - binFile = null; - } + } catch (final Exception e) { /* ignore */ } try { textFile.close(); - } catch (final Exception e) { /* ignore */ } finally { - textFile = null; - } + } catch (final Exception e) { /* ignore */ } try { treeFile.close(); - } catch (final Exception e) { /* ignore */ } finally { - treeFile = null; - } + } catch (final Exception e) { /* ignore */ } } } } // class FaceObjects This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-12-10 23:04:40
|
Revision: 1049 http://svn.sourceforge.net/gridarta/?rev=1049&view=rev Author: christianhujer Date: 2006-12-10 15:04:40 -0800 (Sun, 10 Dec 2006) Log Message: ----------- Minor code quality improvements. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gameobject/GameObject.java trunk/src/app/net/sf/gridarta/gameobject/GameObjectContainer.java trunk/src/app/net/sf/gridarta/gameobject/MultiArchData.java trunk/src/app/net/sf/gridarta/map/AbstractMapModel.java Modified: trunk/src/app/net/sf/gridarta/gameobject/GameObject.java =================================================================== --- trunk/src/app/net/sf/gridarta/gameobject/GameObject.java 2006-12-10 22:34:09 UTC (rev 1048) +++ trunk/src/app/net/sf/gridarta/gameobject/GameObject.java 2006-12-10 23:04:40 UTC (rev 1049) @@ -357,7 +357,7 @@ } /** {@inheritDoc} */ - @Override public MapSquare<G> getMapSquare() { + @Nullable @Override public MapSquare<G> getMapSquare() { return container != null ? container.getMapSquare() : null; } @@ -463,6 +463,8 @@ * @see #isArtifact() */ public boolean isArchetype() { + // == is okay because that's the definition of Archetypes. + //noinspection ObjectEquality return archetype == this; } @@ -500,6 +502,9 @@ * as the other GameObject, otherwise <code>false</code> */ public boolean hasSameArchetype(final G other) { + // == is okay because only one instance of an equal Archetype exists. + // TODO will this change in the course of serialization? + //noinspection ObjectEquality return archetype == other.archetype; } @@ -684,6 +689,8 @@ * @return <code>true</code> if single-part or head of multi-part, otherwise <code>false</code>. */ public boolean isHead() { + // == is okay because that's the definition of being head. + //noinspection ObjectEquality return getHead() == this; } Modified: trunk/src/app/net/sf/gridarta/gameobject/GameObjectContainer.java =================================================================== --- trunk/src/app/net/sf/gridarta/gameobject/GameObjectContainer.java 2006-12-10 22:34:09 UTC (rev 1048) +++ trunk/src/app/net/sf/gridarta/gameobject/GameObjectContainer.java 2006-12-10 23:04:40 UTC (rev 1049) @@ -177,7 +177,7 @@ public final void remove(@NotNull final G gameObject) { // keep this in sync with iterator() if (!contents.remove(gameObject)) { - throw new IllegalArgumentException(gameObject + " wasn't inside container " + this); + throw new NotInsideContainerException(this, gameObject); } gameObject.setContainer(null); squareChanged(); @@ -208,7 +208,7 @@ final int oldIndex = contents.indexOf(gameObject); if (oldIndex != contents.size() - 1) { if (!contents.remove(gameObject)) { - throw new IllegalArgumentException(gameObject + " wasn't inside container " + this); + throw new NotInsideContainerException(this, gameObject); } contents.add(gameObject); squareChanged(); @@ -224,7 +224,7 @@ final int oldIndex = contents.indexOf(gameObject); if (oldIndex < contents.size() - 1) { if (!contents.remove(gameObject)) { - throw new IllegalArgumentException(gameObject + " wasn't inside container " + this); + throw new NotInsideContainerException(this, gameObject); } contents.add(oldIndex + 1, gameObject); squareChanged(); @@ -240,7 +240,7 @@ final int oldIndex = contents.indexOf(gameObject); if (oldIndex > 0) { if (!contents.remove(gameObject)) { - throw new IllegalArgumentException(gameObject + " wasn't inside container " + this); + throw new NotInsideContainerException(this, gameObject); } contents.add(oldIndex - 1, gameObject); squareChanged(); @@ -256,7 +256,7 @@ final int oldIndex = contents.indexOf(gameObject); if (oldIndex != 0) { if (!contents.remove(gameObject)) { - throw new IllegalArgumentException(gameObject + " wasn't inside container " + this); + throw new NotInsideContainerException(this, gameObject); } contents.add(0, gameObject); squareChanged(); Modified: trunk/src/app/net/sf/gridarta/gameobject/MultiArchData.java =================================================================== --- trunk/src/app/net/sf/gridarta/gameobject/MultiArchData.java 2006-12-10 22:34:09 UTC (rev 1048) +++ trunk/src/app/net/sf/gridarta/gameobject/MultiArchData.java 2006-12-10 23:04:40 UTC (rev 1049) @@ -25,6 +25,7 @@ package net.sf.gridarta.gameobject; import java.util.ArrayList; +import org.jetbrains.annotations.Nullable; /** * Class related to {@link GameObject} to store multipart information. This @@ -179,9 +180,9 @@ * * @param ob the current part * - * @return the part following the current part + * @return the part following the current part or <code>null</code> if this part was the last. */ - public G getNext(final G ob) { + @Nullable public G getNext(final G ob) { assert ob != null; final int index = parts.indexOf(ob); assert index != -1; Modified: trunk/src/app/net/sf/gridarta/map/AbstractMapModel.java =================================================================== --- trunk/src/app/net/sf/gridarta/map/AbstractMapModel.java 2006-12-10 22:34:09 UTC (rev 1048) +++ trunk/src/app/net/sf/gridarta/map/AbstractMapModel.java 2006-12-10 23:04:40 UTC (rev 1049) @@ -274,6 +274,8 @@ final MapModelEvent<G> e = new MapModelEvent<G>(this, MapModelEvent.Type.SQUARES_CHANGED, squares); final Object[] listeners = listenerList.getListenerList(); for (int i = listeners.length - 2; i >= 0; i -= 2) { + // Using == is okay for listener classes. + //noinspection ObjectEquality if (listeners[i] == MapModelListener.class) { ((MapModelListener<G>) listeners[i + 1]).mapSquaresChanged(e); } @@ -285,6 +287,8 @@ final MapModelEvent<G> e = new MapModelEvent<G>(this, MapModelEvent.Type.SIZE_CHANGED); final Object[] listeners = listenerList.getListenerList(); for (int i = listeners.length - 2; i >= 0; i -= 2) { + // Using == is okay for listener classes. + //noinspection ObjectEquality if (listeners[i] == MapModelListener.class) { ((MapModelListener<G>) listeners[i + 1]).mapSizeChanged(e); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-12-10 22:34:10
|
Revision: 1048 http://svn.sourceforge.net/gridarta/?rev=1048&view=rev Author: christianhujer Date: 2006-12-10 14:34:09 -0800 (Sun, 10 Dec 2006) Log Message: ----------- Improved usage of NotInsideContainerException. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gameobject/GameObject.java trunk/src/app/net/sf/gridarta/gameobject/GameObjectContainer.java trunk/src/app/net/sf/gridarta/gameobject/NotInsideContainerException.java Modified: trunk/src/app/net/sf/gridarta/gameobject/GameObject.java =================================================================== --- trunk/src/app/net/sf/gridarta/gameobject/GameObject.java 2006-12-10 22:09:57 UTC (rev 1047) +++ trunk/src/app/net/sf/gridarta/gameobject/GameObject.java 2006-12-10 22:34:09 UTC (rev 1048) @@ -370,7 +370,7 @@ throw new IsArchetypeException(this); } if (container == null) { - throw new NotInsideContainerException(this); + throw new NotInsideContainerException(null, this); } container.moveTop((G) this); } @@ -384,7 +384,7 @@ throw new IsArchetypeException(this); } if (container == null) { - throw new NotInsideContainerException(this); + throw new NotInsideContainerException(null, this); } container.moveUp((G) this); } @@ -398,7 +398,7 @@ throw new IsArchetypeException(this); } if (container == null) { - throw new NotInsideContainerException(this); + throw new NotInsideContainerException(null, this); } container.moveDown((G) this); } @@ -412,7 +412,7 @@ throw new IsArchetypeException(this); } if (container == null) { - throw new NotInsideContainerException(this); + throw new NotInsideContainerException(null, this); } container.moveBottom((G) this); } @@ -429,12 +429,12 @@ final G head = getHead(); for (G tail = head.getMultiNext(); tail != null; tail = tail.getMultiNext()) { if (tail.container == null) { - throw new NotInsideContainerException(this); + throw new NotInsideContainerException(null, this); } tail.container.remove(tail); } if (head.container == null) { - throw new NotInsideContainerException(this); + throw new NotInsideContainerException(null, this); } head.container.remove(head); } Modified: trunk/src/app/net/sf/gridarta/gameobject/GameObjectContainer.java =================================================================== --- trunk/src/app/net/sf/gridarta/gameobject/GameObjectContainer.java 2006-12-10 22:09:57 UTC (rev 1047) +++ trunk/src/app/net/sf/gridarta/gameobject/GameObjectContainer.java 2006-12-10 22:34:09 UTC (rev 1048) @@ -350,7 +350,7 @@ public void replace(@NotNull final G oldGameObject, @NotNull final G newGameObject) { final int insertIndex = contents.indexOf(oldGameObject); if (insertIndex == -1) { - throw new IllegalArgumentException(oldGameObject + " wasn't inside container " + this); + throw new NotInsideContainerException(this, oldGameObject); } contents.remove(oldGameObject); oldGameObject.setContainer(null); Modified: trunk/src/app/net/sf/gridarta/gameobject/NotInsideContainerException.java =================================================================== --- trunk/src/app/net/sf/gridarta/gameobject/NotInsideContainerException.java 2006-12-10 22:09:57 UTC (rev 1047) +++ trunk/src/app/net/sf/gridarta/gameobject/NotInsideContainerException.java 2006-12-10 22:34:09 UTC (rev 1048) @@ -1,33 +1,51 @@ package net.sf.gridarta.gameobject; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** - * This exception is thrown in case a method of a {@link GameObject} without a container was invoked when a GameObject requires a container. + * This exception is thrown in case a method of a {@link GameObject} without a container or the wrong container was invoked when a GameObject requires a container. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class NotInsideContainerException extends IllegalStateException { /** - * The GameObject that was not inside a container but should have been. + * The expected container if != null or null if expected to be in any container. */ - @NotNull private final GameObject gameObject; + @Nullable private GameObjectContainer container; /** + * The GameObject that was not inside a / the Container but should have been. + */ + @NotNull private final GameObject item; + + /** * Create a NotInsideContainerException. - * @param gameObject GameObject that was not inside a container but should have been. + * @param container Container that was queried or <code>null</code> if a container was expected but not found. + * @param item GameObject that was not inside a container but should have been. */ - public NotInsideContainerException(@NotNull final GameObject gameObject) { - super(gameObject.toString()); - this.gameObject = gameObject; + public NotInsideContainerException(@Nullable final GameObjectContainer container, @NotNull final GameObject item) { + super(container == null ? + item.toString() + " was expected to be inside a container but wasn't." : + item.toString() + " was expected to be inside " + container + " but was in " + item.getContainer()); + this.container = container; + this.item = item; } /** * Returns the GameObject that was not inside a container but should have been. * @return The GameObject that was not inside a container but should have been. */ - @NotNull public GameObject getGameObject() { - return gameObject; + @NotNull public GameObject getItem() { + return item; } + /** + * Returns the Container that the GameObject was expected in. + * @return The Container the GameObject was expected in or <code>null</code> if it was expected to have any container but had not. + */ + @Nullable public GameObjectContainer getContainer() { + return container; + } + } // class NotInsideContainerException This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-12-10 22:09:57
|
Revision: 1047 http://svn.sourceforge.net/gridarta/?rev=1047&view=rev Author: christianhujer Date: 2006-12-10 14:09:57 -0800 (Sun, 10 Dec 2006) Log Message: ----------- Minor improvements. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gameobject/GameObject.java Modified: trunk/src/app/net/sf/gridarta/gameobject/GameObject.java =================================================================== --- trunk/src/app/net/sf/gridarta/gameobject/GameObject.java 2006-12-10 21:54:22 UTC (rev 1046) +++ trunk/src/app/net/sf/gridarta/gameobject/GameObject.java 2006-12-10 22:09:57 UTC (rev 1047) @@ -680,10 +680,8 @@ public abstract G getHead(); /** - * Determine if this part is the head part. For single-part objects this is - * always true. - * - * @return <code>true</code> iff this part if a head part + * Returns whether this object is a single-part object or the head of the multi-part object. + * @return <code>true</code> if single-part or head of multi-part, otherwise <code>false</code>. */ public boolean isHead() { return getHead() == this; @@ -740,10 +738,11 @@ */ public String getBestName() { final Archetype<G> archetype = getArchetype(); + final String archObjName = archetype.getObjName(); if (objName != null && objName.length() > 0) { return objName; - } else if (archetype.getObjName() != null && archetype.getObjName().length() > 0) { - return archetype.getObjName(); + } else if (archObjName != null && archObjName.length() > 0) { + return archObjName; } else if (archetypeName != null && archetypeName.length() > 0) { return archetypeName; } else if (archetype.getArchetypeName() != null) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-12-10 21:54:21
|
Revision: 1046 http://svn.sourceforge.net/gridarta/?rev=1046&view=rev Author: christianhujer Date: 2006-12-10 13:54:22 -0800 (Sun, 10 Dec 2006) Log Message: ----------- Removed constant conditions. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gameobject/AbstractArchetypeParser.java trunk/src/app/net/sf/gridarta/gameobject/GameObject.java Modified: trunk/src/app/net/sf/gridarta/gameobject/AbstractArchetypeParser.java =================================================================== --- trunk/src/app/net/sf/gridarta/gameobject/AbstractArchetypeParser.java 2006-12-10 21:53:10 UTC (rev 1045) +++ trunk/src/app/net/sf/gridarta/gameobject/AbstractArchetypeParser.java 2006-12-10 21:54:22 UTC (rev 1046) @@ -75,7 +75,7 @@ final G archetype = gameObject.getArchetype(); // is it a multi head (without any tail parts)? - if (archetype == null || !archetype.isMulti() || gameObject.getMultiRefCount() > 1) { + if (!archetype.isMulti() || gameObject.getMultiRefCount() > 1) { return; } Modified: trunk/src/app/net/sf/gridarta/gameobject/GameObject.java =================================================================== --- trunk/src/app/net/sf/gridarta/gameobject/GameObject.java 2006-12-10 21:53:10 UTC (rev 1045) +++ trunk/src/app/net/sf/gridarta/gameobject/GameObject.java 2006-12-10 21:54:22 UTC (rev 1046) @@ -318,7 +318,14 @@ * @see #getContainer() */ @NotNull public G getTopContainer() { - return (G) (isInContainer() ? ((G) container).getTopContainer() : this); + G topContainer; + if (isInContainer()) { + assert ((G) container) != null; + topContainer = ((G) container).getTopContainer(); + } else { + topContainer = (G) this; + } + return topContainer; } /** @@ -576,10 +583,10 @@ /** Delete message text by emptying. */ public void resetMsgText() { - if (msgText == null) { - return; + if (msgText != null) { + //noinspection ConstantConditions + msgText.delete(0, msgText.length()); } - msgText.delete(0, msgText.length()); } /** @@ -735,11 +742,11 @@ final Archetype<G> archetype = getArchetype(); if (objName != null && objName.length() > 0) { return objName; - } else if (archetype != null && archetype.getObjName() != null && archetype.getObjName().length() > 0) { + } else if (archetype.getObjName() != null && archetype.getObjName().length() > 0) { return archetype.getObjName(); } else if (archetypeName != null && archetypeName.length() > 0) { return archetypeName; - } else if (archetype != null && archetype.getArchetypeName() != null) { + } else if (archetype.getArchetypeName() != null) { return archetype.getArchetypeName(); } return "???"; // this case should actually never happen This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-12-10 21:53:10
|
Revision: 1045 http://svn.sourceforge.net/gridarta/?rev=1045&view=rev Author: christianhujer Date: 2006-12-10 13:53:10 -0800 (Sun, 10 Dec 2006) Log Message: ----------- Added documentation about still unused variable. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gameobject/anim/AnimationObjects.java Modified: trunk/crossfire/src/cfeditor/gameobject/anim/AnimationObjects.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/anim/AnimationObjects.java 2006-12-10 21:52:55 UTC (rev 1044) +++ trunk/crossfire/src/cfeditor/gameobject/anim/AnimationObjects.java 2006-12-10 21:53:10 UTC (rev 1045) @@ -42,6 +42,8 @@ public class AnimationObjects extends AbstractAnimationObjects<AnimationObject> { /** The animation objects. */ + // The collection is here for future use, that's why it's updated but never queried. + @SuppressWarnings({"MismatchedQueryAndUpdateOfCollection"}) private final List<AnimationObject> animObjects = new ArrayList<AnimationObject>(); /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-12-10 21:52:55
|
Revision: 1044 http://svn.sourceforge.net/gridarta/?rev=1044&view=rev Author: christianhujer Date: 2006-12-10 13:52:55 -0800 (Sun, 10 Dec 2006) Log Message: ----------- Removed unused variable. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gui/ArchComboBox.java Modified: trunk/crossfire/src/cfeditor/gui/ArchComboBox.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/ArchComboBox.java 2006-12-10 21:16:07 UTC (rev 1043) +++ trunk/crossfire/src/cfeditor/gui/ArchComboBox.java 2006-12-10 21:52:55 UTC (rev 1044) @@ -281,8 +281,6 @@ private String currentFilter = ""; - private ArrayList<GameObject[]> subFilters = new ArrayList<GameObject[]>(); - private static final long serialVersionUID = 1L; public ArchComboBoxModel() { @@ -292,7 +290,6 @@ return o1.getArchetypeName().toLowerCase().compareTo(o2.getArchetypeName().toLowerCase()); } }); - subFilters.add(archList); } public Object getSelectedItem() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-12-10 21:16:07
|
Revision: 1043 http://svn.sourceforge.net/gridarta/?rev=1043&view=rev Author: christianhujer Date: 2006-12-10 13:16:07 -0800 (Sun, 10 Dec 2006) Log Message: ----------- Hardened policy. Mainly rationalized static field access. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainToolbar.java trunk/crossfire/src/cfeditor/CMainView.java trunk/crossfire/src/cfeditor/CMapTileList.java trunk/crossfire/src/cfeditor/CMapViewBasic.java trunk/crossfire/src/cfeditor/CopyBuffer.java trunk/crossfire/src/cfeditor/ScriptArchData.java trunk/crossfire/src/cfeditor/gameobject/ArchetypeParser.java trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java trunk/crossfire/src/cfeditor/gui/ScriptEditor.java trunk/crossfire/src/cfeditor/gui/ScriptManager.java trunk/daimonin/src/daieditor/ReplaceDialog.java trunk/daimonin/src/daieditor/gameobject/ArchetypeParser.java trunk/daimonin/src/daieditor/gameobject/ArchetypeSet.java trunk/daimonin/src/daieditor/gui/AboutDialog.java trunk/daimonin/src/daieditor/gui/map/MapUserListener.java trunk/daimonin/src/daieditor/gui/map/tools/ToolSelectorPane.java trunk/src/app/net/sf/gridarta/gameobject/NamedObjects.java Modified: trunk/crossfire/src/cfeditor/CMainToolbar.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainToolbar.java 2006-12-10 21:13:16 UTC (rev 1042) +++ trunk/crossfire/src/cfeditor/CMainToolbar.java 2006-12-10 21:16:07 UTC (rev 1043) @@ -30,6 +30,7 @@ import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; +import java.awt.event.InputEvent; import java.util.Enumeration; import java.util.Vector; import javax.swing.ButtonGroup; @@ -37,6 +38,7 @@ import javax.swing.JPopupMenu; import javax.swing.JRadioButtonMenuItem; import javax.swing.JToolBar; +import javax.swing.SwingConstants; import org.jetbrains.annotations.Nullable; /** @@ -78,7 +80,7 @@ * @param mainControl The controller of this toolbar. */ CMainToolbar(final CMainControl mainControl) { - super(JToolBar.VERTICAL); // construct with vertical alignment + super(SwingConstants.VERTICAL); // construct with vertical alignment this.mainControl = mainControl; eIconAndLabelVisibility = Integer.parseInt(CSettings.getInstance(IGUIConstants.APP_NAME).getProperty(SHOW_ICONS_AND_LABELS_KEY, "" + SHOW_ICONS_ONLY)); @@ -86,7 +88,7 @@ addMouseListener( new MouseAdapter() { @Override public void mousePressed(final MouseEvent event) { - if ((event.getModifiers() & MouseEvent.META_MASK) != 0) { + if ((event.getModifiers() & InputEvent.META_MASK) != 0) { popupMenu.show(CMainToolbar.this, event.getX(), event.getY()); } } @@ -132,8 +134,8 @@ mainControl.createNew(); } }); - newButton.setVerticalTextPosition(JButton.BOTTOM); - newButton.setHorizontalTextPosition(JButton.CENTER); + newButton.setVerticalTextPosition(SwingConstants.BOTTOM); + newButton.setHorizontalTextPosition(SwingConstants.CENTER); buttons.addElement(newButton); add(newButton); @@ -146,8 +148,8 @@ mainControl.open(); } }); - open.setVerticalTextPosition(JButton.BOTTOM); - open.setHorizontalTextPosition(JButton.CENTER); + open.setVerticalTextPosition(SwingConstants.BOTTOM); + open.setHorizontalTextPosition(SwingConstants.CENTER); buttons.addElement(open); add(open); @@ -160,8 +162,8 @@ mainControl.save(); } }); - save.setVerticalTextPosition(JButton.BOTTOM); - save.setHorizontalTextPosition(JButton.CENTER); + save.setVerticalTextPosition(SwingConstants.BOTTOM); + save.setHorizontalTextPosition(SwingConstants.CENTER); buttons.addElement(save); add(save); @@ -174,8 +176,8 @@ mainControl.saveAs(); } }); - saveAs.setVerticalTextPosition(JButton.BOTTOM); - saveAs.setHorizontalTextPosition(JButton.CENTER); + saveAs.setVerticalTextPosition(SwingConstants.BOTTOM); + saveAs.setHorizontalTextPosition(SwingConstants.CENTER); buttons.addElement(saveAs); add(saveAs); @@ -190,8 +192,8 @@ mainControl.prevWindow(); } }); - prevWindow.setVerticalTextPosition(JButton.BOTTOM); - prevWindow.setHorizontalTextPosition(JButton.CENTER); + prevWindow.setVerticalTextPosition(SwingConstants.BOTTOM); + prevWindow.setHorizontalTextPosition(SwingConstants.CENTER); buttons.addElement(prevWindow); add(prevWindow); @@ -204,8 +206,8 @@ mainControl.nextWindow(); } }); - nextWindow.setVerticalTextPosition(JButton.BOTTOM); - nextWindow.setHorizontalTextPosition(JButton.CENTER); + nextWindow.setVerticalTextPosition(SwingConstants.BOTTOM); + nextWindow.setHorizontalTextPosition(SwingConstants.CENTER); buttons.addElement(nextWindow); add(nextWindow); Modified: trunk/crossfire/src/cfeditor/CMainView.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainView.java 2006-12-10 21:13:16 UTC (rev 1042) +++ trunk/crossfire/src/cfeditor/CMainView.java 2006-12-10 21:16:07 UTC (rev 1043) @@ -43,6 +43,8 @@ import javax.swing.JOptionPane; import javax.swing.JTabbedPane; import javax.swing.UIManager; +import javax.swing.SwingConstants; +import javax.swing.JSplitPane; import javax.swing.event.InternalFrameEvent; import javax.swing.event.InternalFrameListener; import net.sf.gridarta.gui.GSplitPane; @@ -203,7 +205,7 @@ setJMenuBar(menu); // initialize pickmap panel - pickmapPanel = new JTabbedPane(JTabbedPane.TOP); + pickmapPanel = new JTabbedPane(SwingConstants.TOP); pickmapPanel.setBorder(BorderFactory.createEmptyBorder(IGUIConstants.SPACE_PICKARCH_TOP, 0, 0, 0)); CPickmapPanel.getInstance().addPickmapSelectionListener(pickmapPanel); @@ -217,7 +219,7 @@ if (!mapTileListBottom) { // the map tile list is on the right side - splitRightPane = new GSplitPane(GSplitPane.HORIZONTAL_SPLIT, mapDesktop, mapTileList); + splitRightPane = new GSplitPane(JSplitPane.HORIZONTAL_SPLIT, mapDesktop, mapTileList); splitRightPane.setDividerLocation(divLocationRight); splitRightPane.setDividerSize(BORDER_SIZE); @@ -225,14 +227,14 @@ getContentPane().add(splitRightPane, BorderLayout.CENTER); mapArchPanel = new CMapArchPanel(mainControl, this); - splitDownPane = new GSplitPane(GSplitPane.VERTICAL_SPLIT, splitRightPane, mapArchPanel); + splitDownPane = new GSplitPane(JSplitPane.VERTICAL_SPLIT, splitRightPane, mapArchPanel); splitDownPane.setDividerLocation(divLocationDown); splitDownPane.setDividerSize(BORDER_SIZE); getContentPane().add(splitDownPane, BorderLayout.CENTER); - splitPane = new GSplitPane(GSplitPane.HORIZONTAL_SPLIT, archPanel, splitDownPane); + splitPane = new GSplitPane(JSplitPane.HORIZONTAL_SPLIT, archPanel, splitDownPane); splitPane.setDividerLocation(divLocation); splitPane.setDividerSize(BORDER_SIZE); @@ -240,20 +242,20 @@ } else { // the map tile list is merged into the bottom panel mapArchPanel = new CMapArchPanel(mainControl, this); - splitRightPane = new GSplitPane(GSplitPane.HORIZONTAL_SPLIT, mapArchPanel, mapTileList); + splitRightPane = new GSplitPane(JSplitPane.HORIZONTAL_SPLIT, mapArchPanel, mapTileList); splitRightPane.setDividerLocation(divLocationRight); splitRightPane.setDividerSize(BORDER_SIZE); // split off the bottom panel - splitDownPane = new GSplitPane(GSplitPane.VERTICAL_SPLIT, mapDesktop, splitRightPane); + splitDownPane = new GSplitPane(JSplitPane.VERTICAL_SPLIT, mapDesktop, splitRightPane); splitDownPane.setDividerLocation(divLocationDown); splitDownPane.setDividerSize(BORDER_SIZE); getContentPane().add(splitDownPane, BorderLayout.CENTER); // split off the left arch panel - splitPane = new GSplitPane(GSplitPane.HORIZONTAL_SPLIT, archPanel, splitDownPane); + splitPane = new GSplitPane(JSplitPane.HORIZONTAL_SPLIT, archPanel, splitDownPane); splitPane.setDividerLocation(divLocation); splitPane.setDividerSize(BORDER_SIZE); Modified: trunk/crossfire/src/cfeditor/CMapTileList.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapTileList.java 2006-12-10 21:13:16 UTC (rev 1042) +++ trunk/crossfire/src/cfeditor/CMapTileList.java 2006-12-10 21:16:07 UTC (rev 1043) @@ -37,6 +37,7 @@ import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; +import java.awt.event.InputEvent; import java.util.Date; import javax.swing.BorderFactory; import javax.swing.DefaultListCellRenderer; @@ -45,6 +46,8 @@ import javax.swing.JList; import javax.swing.JPanel; import javax.swing.JScrollPane; +import javax.swing.SwingConstants; +import javax.swing.ScrollPaneConstants; import static javax.swing.JViewport.SIMPLE_SCROLL_MODE; import static javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER; import static javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER; @@ -102,7 +105,7 @@ list.setCellRenderer(new MyCellRenderer()); list.setBackground(Color.lightGray); final JScrollPane scrollPane = new JScrollPane(list); - scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); + scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); scrollPane.getViewport().setScrollMode(SIMPLE_SCROLL_MODE); add(scrollPane, BorderLayout.CENTER); @@ -132,8 +135,8 @@ } } }); - buttonDown.setVerticalTextPosition(JButton.BOTTOM); - buttonDown.setHorizontalTextPosition(JButton.CENTER); + buttonDown.setVerticalTextPosition(SwingConstants.BOTTOM); + buttonDown.setHorizontalTextPosition(SwingConstants.CENTER); if (!mainView.isMapTileListBottom()) { dummy.add(buttonDown, BorderLayout.EAST); } @@ -149,8 +152,8 @@ } } }); - buttonUp.setVerticalTextPosition(JButton.BOTTOM); - buttonUp.setHorizontalTextPosition(JButton.CENTER); + buttonUp.setVerticalTextPosition(SwingConstants.BOTTOM); + buttonUp.setHorizontalTextPosition(SwingConstants.CENTER); if (!mainView.isMapTileListBottom()) { dummy.add(buttonUp, BorderLayout.WEST); } else { @@ -169,7 +172,7 @@ */ list.addMouseListener(new MouseAdapter() { @Override public void mousePressed(final MouseEvent e) { - if (e.getModifiers() == MouseEvent.BUTTON1_MASK && !e.isShiftDown() && !e.isControlDown()) { + if (e.getModifiers() == InputEvent.BUTTON1_MASK && !e.isShiftDown() && !e.isControlDown()) { // --- left mouse button: select arch --- // first, check if this is a doubleclick final long thisClick = (new Date()).getTime(); @@ -184,7 +187,7 @@ // save values for next click lastClick = thisClick; lastClickGameObject = getMapTileSelection(); - } else if ((e.getModifiers() & MouseEvent.BUTTON3_MASK) != 0 || ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 && e.isShiftDown())) { + } else if ((e.getModifiers() & InputEvent.BUTTON3_MASK) != 0 || ((e.getModifiers() & InputEvent.BUTTON1_MASK) != 0 && e.isShiftDown())) { // --- right mouse button: insert arch --- if (currentSquare != null && mainControl.getArchPanelHighlight() != null) { Modified: trunk/crossfire/src/cfeditor/CMapViewBasic.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapViewBasic.java 2006-12-10 21:13:16 UTC (rev 1042) +++ trunk/crossfire/src/cfeditor/CMapViewBasic.java 2006-12-10 21:16:07 UTC (rev 1043) @@ -36,12 +36,14 @@ import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseMotionListener; +import java.awt.event.InputEvent; import java.io.File; import java.io.IOException; import java.util.Iterator; import javax.imageio.ImageIO; import javax.swing.JScrollPane; import javax.swing.JViewport; +import javax.swing.ScrollPaneConstants; import net.sf.gridarta.EditOperation; import net.sf.gridarta.Size2D; import org.apache.log4j.Logger; @@ -114,7 +116,7 @@ */ CMapViewBasic(final CMainControl mainControl, final MapControl mapControl, final MapView fi, final Point initial) { //super("Map ["+control.getMapFileName()+"]", true, true, true, true); - super(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); + super(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); this.mapControl = mapControl; this.mainControl = mainControl; frame = fi; @@ -519,7 +521,7 @@ if (mapLoc != null) { // in "locked pickmaps" mode, pickmaps react only to leftclicks - if (mapControl.isPickmap() && mainControl.isLockAllPickmaps() && !(e.getModifiers() == MouseEvent.BUTTON1_MASK && !e.isShiftDown() && !e.isControlDown())) { + if (mapControl.isPickmap() && mainControl.isLockAllPickmaps() && !(e.getModifiers() == InputEvent.BUTTON1_MASK && !e.isShiftDown() && !e.isControlDown())) { return; } @@ -539,9 +541,9 @@ } // right mouse button: insert arch - if ((e.getModifiers() & MouseEvent.BUTTON3_MASK) != 0) { + if ((e.getModifiers() & InputEvent.BUTTON3_MASK) != 0) { insertObject(mapLoc); - } else if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0) { + } else if ((e.getModifiers() & InputEvent.BUTTON1_MASK) != 0) { if (e.isShiftDown()) { insertObject(mapLoc); } else if (e.isControlDown()) { @@ -577,9 +579,9 @@ @Override public void mouseReleased(final MouseEvent event) { final int buttonNr; // Number of released mouse button - if (event.getModifiers() == MouseEvent.BUTTON1_MASK) { + if (event.getModifiers() == InputEvent.BUTTON1_MASK) { buttonNr = 0; // left button - } else if (event.getModifiers() == MouseEvent.BUTTON3_MASK) { + } else if (event.getModifiers() == InputEvent.BUTTON3_MASK) { buttonNr = 2; // right button } else { buttonNr = 1; // middle @@ -615,7 +617,7 @@ temp = new Point(-1, -1); } - if (event.getModifiers() == MouseEvent.BUTTON1_MASK) { + if (event.getModifiers() == InputEvent.BUTTON1_MASK) { // Left Mouse Button: Selected area gets highlighted // Update offset (from starting-dragpoint) only when mouse moved @@ -627,7 +629,7 @@ renderer.modelChanged(); } - } else if (event.getModifiers() == MouseEvent.BUTTON3_MASK) { + } else if (event.getModifiers() == InputEvent.BUTTON3_MASK) { // Right Mouse Button: Arches get inserted all the way if (temp.x != mapMouseRightPos.x || mapMouseRightPos.y != temp.y) { mapMouseRightPos.x = temp.x; Modified: trunk/crossfire/src/cfeditor/CopyBuffer.java =================================================================== --- trunk/crossfire/src/cfeditor/CopyBuffer.java 2006-12-10 21:13:16 UTC (rev 1042) +++ trunk/crossfire/src/cfeditor/CopyBuffer.java 2006-12-10 21:16:07 UTC (rev 1043) @@ -33,6 +33,7 @@ import java.awt.Rectangle; import java.util.HashSet; import net.sf.gridarta.Size2D; +import net.sf.gridarta.MainControl; import org.apache.log4j.Logger; import org.jetbrains.annotations.Nullable; @@ -320,7 +321,7 @@ // cycle through all tile coordinates which are highlighted: for (pos.x = startp.x; pos.x - startp.x <= offset.x; pos.x++) { for (pos.y = startp.y; pos.y - startp.y <= offset.y; pos.y++) { - if (density != -1 && density != 100 && density < CMainControl.rnd.nextInt(100) + 1) { + if (density != -1 && density != 100 && density < MainControl.rnd.nextInt(100) + 1) { continue; } // Insert the new arch into the map Modified: trunk/crossfire/src/cfeditor/ScriptArchData.java =================================================================== --- trunk/crossfire/src/cfeditor/ScriptArchData.java 2006-12-10 21:13:16 UTC (rev 1042) +++ trunk/crossfire/src/cfeditor/ScriptArchData.java 2006-12-10 21:16:07 UTC (rev 1043) @@ -46,6 +46,7 @@ import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JTextField; +import javax.swing.WindowConstants; import static javax.swing.WindowConstants.HIDE_ON_CLOSE; import net.sf.gridarta.textedit.scripteditor.ScriptEditControl; import net.sf.japi.util.Arrays2; @@ -724,7 +725,7 @@ if (pathFrame == null) { // initialize popup frame pathFrame = new JDialog(CMainControl.getInstance().getMainView(), "Edit Parameters", true); - pathFrame.setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE); + pathFrame.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); final JPanel mainPanel = new JPanel(); mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS)); Modified: trunk/crossfire/src/cfeditor/gameobject/ArchetypeParser.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/ArchetypeParser.java 2006-12-10 21:13:16 UTC (rev 1042) +++ trunk/crossfire/src/cfeditor/gameobject/ArchetypeParser.java 2006-12-10 21:16:07 UTC (rev 1043) @@ -438,7 +438,7 @@ } // if the type is still unset, then we take the default one - if (gameObject.getArchTypNr() == GameObject.TYPE_UNSET) { + if (gameObject.getArchTypNr() == net.sf.gridarta.gameobject.GameObject.TYPE_UNSET) { gameObject.setArchTypNr(archetype.getArchTypNr()); } Modified: trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java 2006-12-10 21:13:16 UTC (rev 1042) +++ trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java 2006-12-10 21:16:07 UTC (rev 1043) @@ -700,7 +700,7 @@ } // finally we need to get the "map"-arch, which is not in the panels - final Archetype<GameObject> maparch = getArchetype(ArchetypeParser.STARTARCH_NAME); + final Archetype<GameObject> maparch = getArchetype(net.sf.gridarta.gameobject.ArchetypeParser.STARTARCH_NAME); if (maparch != null) { count++; @@ -709,7 +709,7 @@ // map object hack: x/y is normally a reference for multi // part arches - i include this hack until we rework the // arch objects with more useful script names - if (maparch.getArchetypeName().compareTo(ArchetypeParser.STARTARCH_NAME) == 0) { + if (maparch.getArchetypeName().compareTo(net.sf.gridarta.gameobject.ArchetypeParser.STARTARCH_NAME) == 0) { out.writeBytes("x " + maparch.getMultiX() + "\n"); out.writeBytes("y " + maparch.getMultiY() + "\n"); } Modified: trunk/crossfire/src/cfeditor/gui/ScriptEditor.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/ScriptEditor.java 2006-12-10 21:13:16 UTC (rev 1042) +++ trunk/crossfire/src/cfeditor/gui/ScriptEditor.java 2006-12-10 21:16:07 UTC (rev 1043) @@ -37,6 +37,7 @@ import javax.swing.JScrollPane; import javax.swing.JTabbedPane; import javax.swing.JTextArea; +import javax.swing.SwingConstants; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.event.DocumentEvent; @@ -122,7 +123,7 @@ gbc.fill = GridBagConstraints.HORIZONTAL; gbc.weightx = 1.0; gbc.gridwidth = 2; - optionsTab.add(new JLabel("Plugin run mode", JLabel.LEFT), gbc); + optionsTab.add(new JLabel("Plugin run mode", SwingConstants.LEFT), gbc); gbc.gridwidth = 1; gbc.gridy = 1; gbc.weightx = 0.1; Modified: trunk/crossfire/src/cfeditor/gui/ScriptManager.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/ScriptManager.java 2006-12-10 21:13:16 UTC (rev 1042) +++ trunk/crossfire/src/cfeditor/gui/ScriptManager.java 2006-12-10 21:16:07 UTC (rev 1043) @@ -24,6 +24,7 @@ import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.ListModel; +import javax.swing.ListSelectionModel; import javax.swing.border.LineBorder; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; @@ -94,7 +95,7 @@ } } }); - scripts.setSelectionMode(DefaultListSelectionModel.SINGLE_SELECTION); + scripts.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); scripts.setBorder(new LineBorder(Color.black, 1)); left.add(scripts, BorderLayout.CENTER); final JButton addScriptBtn = new JButton("New..."); Modified: trunk/daimonin/src/daieditor/ReplaceDialog.java =================================================================== --- trunk/daimonin/src/daieditor/ReplaceDialog.java 2006-12-10 21:13:16 UTC (rev 1042) +++ trunk/daimonin/src/daieditor/ReplaceDialog.java 2006-12-10 21:16:07 UTC (rev 1043) @@ -45,6 +45,7 @@ import javax.swing.JTextField; import javax.swing.WindowConstants; import net.sf.gridarta.map.MapSquare; +import net.sf.gridarta.MainControl; import net.sf.japi.swing.ActionFactory; /** @@ -325,7 +326,7 @@ if (replaceListSize == 1) { randomArch = replaceList.get(0); } else { - randomArch = replaceList.get(CMainControl.rnd.nextInt(replaceList.size())); + randomArch = replaceList.get(MainControl.rnd.nextInt(replaceList.size())); } if (randomArch.isMulti()) { // multi's cannot be inserted properly, so we just put them ontop Modified: trunk/daimonin/src/daieditor/gameobject/ArchetypeParser.java =================================================================== --- trunk/daimonin/src/daieditor/gameobject/ArchetypeParser.java 2006-12-10 21:13:16 UTC (rev 1042) +++ trunk/daimonin/src/daieditor/gameobject/ArchetypeParser.java 2006-12-10 21:16:07 UTC (rev 1043) @@ -425,7 +425,7 @@ } gameObject.setRealFace(gameObject.getFaceRealName()); // if the type is still unset, then we take the default one - if (gameObject.getArchTypNr() == GameObject.TYPE_UNSET) { + if (gameObject.getArchTypNr() == net.sf.gridarta.gameobject.GameObject.TYPE_UNSET) { gameObject.setArchTypNr(archetype.getArchTypNr()); } Modified: trunk/daimonin/src/daieditor/gameobject/ArchetypeSet.java =================================================================== --- trunk/daimonin/src/daieditor/gameobject/ArchetypeSet.java 2006-12-10 21:13:16 UTC (rev 1042) +++ trunk/daimonin/src/daieditor/gameobject/ArchetypeSet.java 2006-12-10 21:16:07 UTC (rev 1043) @@ -470,7 +470,7 @@ artifactCount++; continue; } - if (arch.getArchetypeName().compareTo(ArchetypeParser.STARTARCH_NAME) == 0) { + if (arch.getArchetypeName().compareTo(net.sf.gridarta.gameobject.ArchetypeParser.STARTARCH_NAME) == 0) { // process map arch out.append("Object ").append(arch.getArchetypeName()).append('\n'); @@ -478,7 +478,7 @@ // map object hack: x/y is normally a reference for multi // part arches - i include this hack until we rework the // arch objects with more useful script names - if (arch.getArchetypeName().equals(ArchetypeParser.STARTARCH_NAME)) { + if (arch.getArchetypeName().equals(net.sf.gridarta.gameobject.ArchetypeParser.STARTARCH_NAME)) { out.append("x ").append(Integer.toString(arch.getMultiX())).append('\n'); out.append("y ").append(Integer.toString(arch.getMultiY())).append('\n'); } Modified: trunk/daimonin/src/daieditor/gui/AboutDialog.java =================================================================== --- trunk/daimonin/src/daieditor/gui/AboutDialog.java 2006-12-10 21:13:16 UTC (rev 1042) +++ trunk/daimonin/src/daieditor/gui/AboutDialog.java 2006-12-10 21:16:07 UTC (rev 1043) @@ -20,6 +20,7 @@ import javax.swing.JScrollPane; import javax.swing.JTabbedPane; import javax.swing.JTextArea; +import javax.swing.SwingConstants; import net.sf.japi.swing.ActionFactory; /** @@ -70,7 +71,7 @@ } catch (final Exception e) { /* ignore */ } - final JLabel aboutTab = new JLabel(ACTION_FACTORY.format("about", System.getProperty("java.version"), buildNumber, buildDeveloper, buildTstamp), JLabel.CENTER); + final JLabel aboutTab = new JLabel(ACTION_FACTORY.format("about", System.getProperty("java.version"), buildNumber, buildDeveloper, buildTstamp), SwingConstants.CENTER); aboutTab.setName(ACTION_FACTORY.getString("aboutTab.title")); return aboutTab; } Modified: trunk/daimonin/src/daieditor/gui/map/MapUserListener.java =================================================================== --- trunk/daimonin/src/daieditor/gui/map/MapUserListener.java 2006-12-10 21:13:16 UTC (rev 1042) +++ trunk/daimonin/src/daieditor/gui/map/MapUserListener.java 2006-12-10 21:16:07 UTC (rev 1043) @@ -31,6 +31,7 @@ import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; +import java.awt.event.InputEvent; import net.sf.gridarta.gui.map.MapCursor; import org.jetbrains.annotations.Nullable; @@ -111,7 +112,7 @@ public void mousePressed(final MouseEvent e) { // in "locked pickmaps" mode, pickmaps react only to leftclicks assert mapControl != null; - if (mapControl.isPickmap() && mainControl.isLockAllPickmaps() && !(e.getModifiers() == MouseEvent.BUTTON1_MASK && !e.isShiftDown() && !e.isControlDown())) { + if (mapControl.isPickmap() && mainControl.isLockAllPickmaps() && !(e.getModifiers() == InputEvent.BUTTON1_MASK && !e.isShiftDown() && !e.isControlDown())) { return; } final MouseOpListener mouseOpListener = getMouseOperation(e); Modified: trunk/daimonin/src/daieditor/gui/map/tools/ToolSelectorPane.java =================================================================== --- trunk/daimonin/src/daieditor/gui/map/tools/ToolSelectorPane.java 2006-12-10 21:13:16 UTC (rev 1042) +++ trunk/daimonin/src/daieditor/gui/map/tools/ToolSelectorPane.java 2006-12-10 21:16:07 UTC (rev 1043) @@ -3,6 +3,7 @@ import daieditor.gui.map.event.MouseOpEvent; import java.awt.BorderLayout; import java.awt.event.MouseEvent; +import java.awt.event.InputEvent; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTabbedPane; @@ -62,11 +63,11 @@ break; default: final int mask = event.getModifiers(); - if ((mask & MouseEvent.BUTTON1_DOWN_MASK) == MouseEvent.BUTTON1_DOWN_MASK) { + if ((mask & InputEvent.BUTTON1_DOWN_MASK) == InputEvent.BUTTON1_DOWN_MASK) { toolSelector = lmbSelector; - } else if ((mask & MouseEvent.BUTTON2_DOWN_MASK) == MouseEvent.BUTTON2_DOWN_MASK) { + } else if ((mask & InputEvent.BUTTON2_DOWN_MASK) == InputEvent.BUTTON2_DOWN_MASK) { toolSelector = mmbSelector; - } else if ((mask & MouseEvent.BUTTON3_DOWN_MASK) == MouseEvent.BUTTON3_DOWN_MASK) { + } else if ((mask & InputEvent.BUTTON3_DOWN_MASK) == InputEvent.BUTTON3_DOWN_MASK) { toolSelector = rmbSelector; } else { return null; Modified: trunk/src/app/net/sf/gridarta/gameobject/NamedObjects.java =================================================================== --- trunk/src/app/net/sf/gridarta/gameobject/NamedObjects.java 2006-12-10 21:13:16 UTC (rev 1042) +++ trunk/src/app/net/sf/gridarta/gameobject/NamedObjects.java 2006-12-10 21:16:07 UTC (rev 1043) @@ -154,6 +154,8 @@ }); dialog.setVisible(true); dialog.dispose(); + // This only looks inconvertible. getValue() returns an Integer here. + //noinspection EqualsBetweenInconvertibleTypes if (pane.getValue() == null || !pane.getValue().equals(0)) { return null; } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-12-10 21:13:16
|
Revision: 1042 http://svn.sourceforge.net/gridarta/?rev=1042&view=rev Author: christianhujer Date: 2006-12-10 13:13:16 -0800 (Sun, 10 Dec 2006) Log Message: ----------- Fixed bug: equals() between objects of inconvertible types. Modified Paths: -------------- trunk/crossfire/src/cfeditor/menu/AggregateMenuLocation.java Modified: trunk/crossfire/src/cfeditor/menu/AggregateMenuLocation.java =================================================================== --- trunk/crossfire/src/cfeditor/menu/AggregateMenuLocation.java 2006-12-10 20:35:11 UTC (rev 1041) +++ trunk/crossfire/src/cfeditor/menu/AggregateMenuLocation.java 2006-12-10 21:13:16 UTC (rev 1042) @@ -57,8 +57,8 @@ @Override public boolean equals(final Object obj) { if (obj instanceof WrappedMenuLocation) { final WrappedMenuLocation loc = (WrappedMenuLocation) obj; - return ((loc.name == null ? name == null : loc.equals(name)) && - (loc.location == null ? location == null : loc.equals(location))); + return ((loc.name == null ? name == null : loc.name.equals(name)) && + (loc.location == null ? location == null : loc.location.equals(location))); } return false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-12-10 20:35:14
|
Revision: 1041 http://svn.sourceforge.net/gridarta/?rev=1041&view=rev Author: christianhujer Date: 2006-12-10 12:35:11 -0800 (Sun, 10 Dec 2006) Log Message: ----------- Fixed bug with possible NPE. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CFTreasureListTree.java Modified: trunk/crossfire/src/cfeditor/CFTreasureListTree.java =================================================================== --- trunk/crossfire/src/cfeditor/CFTreasureListTree.java 2006-12-10 20:34:24 UTC (rev 1040) +++ trunk/crossfire/src/cfeditor/CFTreasureListTree.java 2006-12-10 20:35:11 UTC (rev 1041) @@ -265,7 +265,7 @@ // set accurate type of treausrelist (one/multi) node.getTreasureObj().setType(realNode.getTreasureObj().getType()); - for (Enumeration clist = realNode.children(); clist != null & clist.hasMoreElements();) { + for (Enumeration clist = realNode.children(); clist != null && clist.hasMoreElements();) { node.add(((TreasureTreeNode) clist.nextElement()).getClone()); } } @@ -280,7 +280,7 @@ // set accurate type of treausrelist (one/multi) node.getTreasureObj().setType(realNode.getTreasureObj().getType()); - for (Enumeration clist = realNode.children(); clist != null & clist.hasMoreElements();) { + for (Enumeration clist = realNode.children(); clist != null && clist.hasMoreElements();) { node.add(((TreasureTreeNode) clist.nextElement()).getClone()); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-12-10 20:34:27
|
Revision: 1040 http://svn.sourceforge.net/gridarta/?rev=1040&view=rev Author: christianhujer Date: 2006-12-10 12:34:24 -0800 (Sun, 10 Dec 2006) Log Message: ----------- Documented suspicious collection remove() call. Modified Paths: -------------- trunk/crossfire/src/cfeditor/menu/BasicMenuEntry.java Modified: trunk/crossfire/src/cfeditor/menu/BasicMenuEntry.java =================================================================== --- trunk/crossfire/src/cfeditor/menu/BasicMenuEntry.java 2006-12-10 20:10:55 UTC (rev 1039) +++ trunk/crossfire/src/cfeditor/menu/BasicMenuEntry.java 2006-12-10 20:34:24 UTC (rev 1040) @@ -144,6 +144,10 @@ Reference r; synchronized (refs) { while ((r = queue.poll()) != null) { + // This suspicious remove call is okay. + // The reference queue in context will return a Reference. + // Refs is a collection of WeakReferences. + //noinspection SuspiciousMethodCalls refs.remove(r); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-12-10 20:10:56
|
Revision: 1039 http://svn.sourceforge.net/gridarta/?rev=1039&view=rev Author: christianhujer Date: 2006-12-10 12:10:55 -0800 (Sun, 10 Dec 2006) Log Message: ----------- Added suppression for new check. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gameobject/GameObjectContainer.java Modified: trunk/src/app/net/sf/gridarta/gameobject/GameObjectContainer.java =================================================================== --- trunk/src/app/net/sf/gridarta/gameobject/GameObjectContainer.java 2006-12-10 20:01:45 UTC (rev 1038) +++ trunk/src/app/net/sf/gridarta/gameobject/GameObjectContainer.java 2006-12-10 20:10:55 UTC (rev 1039) @@ -419,6 +419,8 @@ } /** {@inheritDoc} */ + // previous can throw NoSuchElementException but InspectionGadgets doesn't know about that. + @SuppressWarnings({"IteratorNextCanNotThrowNoSuchElementException"}) @NotNull public T next() { return delegate.previous(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-12-10 20:01:46
|
Revision: 1038 http://svn.sourceforge.net/gridarta/?rev=1038&view=rev Author: christianhujer Date: 2006-12-10 12:01:45 -0800 (Sun, 10 Dec 2006) Log Message: ----------- Next round of hardening the policy. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CAttribDialog.java trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/CMainView.java trunk/crossfire/src/cfeditor/CopyBuffer.java trunk/crossfire/src/cfeditor/gameobject/anim/AnimationObject.java trunk/crossfire/src/cfeditor/gui/map/DefaultLevelRenderer.java trunk/crossfire/src/cfeditor/map/MapArchObject.java trunk/daimonin/src/daieditor/CAttribDialog.java trunk/daimonin/src/daieditor/gameobject/face/FaceFacade.java trunk/gridarta.ipr Modified: trunk/crossfire/src/cfeditor/CAttribDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-12-10 19:59:50 UTC (rev 1037) +++ trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-12-10 20:01:45 UTC (rev 1038) @@ -1131,6 +1131,8 @@ } else { defValue = 0; } + // The following floating point equality comparison is okay and known not to cause problems. + //noinspection FloatingPointEquality if (value != defValue) { newArchText = newArchText + attr.ref.getNameOld() + " " + value + "\n"; } Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-10 19:59:50 UTC (rev 1037) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-10 20:01:45 UTC (rev 1038) @@ -1371,7 +1371,6 @@ } /** "Cut" was selected from the Edit menu. */ - @SuppressWarnings({"InstanceMethodNamingConvention"}) public void cut() { if (currentMap == null || currentMap.getMapViewFrame() == null) { return; // this should never be possible, but I just wanna make sure... Modified: trunk/crossfire/src/cfeditor/CMainView.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainView.java 2006-12-10 19:59:50 UTC (rev 1037) +++ trunk/crossfire/src/cfeditor/CMainView.java 2006-12-10 20:01:45 UTC (rev 1038) @@ -187,8 +187,8 @@ final int divLocation = Integer.parseInt(settings.getProperty(DIVIDER_LOCATION_KEY, "" + (int) (defwidth * 0.17))); // get the old location and size - final int x = Integer.parseInt(settings.getProperty(WINDOW_X, "" + (int) ((screen.getWidth() - defwidth) / 2.))); - final int y = Integer.parseInt(settings.getProperty(WINDOW_Y, "" + (int) ((screen.getHeight() - defheight) / 2.))); + final int x = Integer.parseInt(settings.getProperty(WINDOW_X, "" + (int) ((screen.getWidth() - defwidth) / 2.0))); + final int y = Integer.parseInt(settings.getProperty(WINDOW_Y, "" + (int) ((screen.getHeight() - defheight) / 2.0))); final int width = Integer.parseInt(settings.getProperty(WINDOW_WIDTH, "" + defwidth)); final int height = Integer.parseInt(settings.getProperty(WINDOW_HEIGHT, "" + defheight)); Modified: trunk/crossfire/src/cfeditor/CopyBuffer.java =================================================================== --- trunk/crossfire/src/cfeditor/CopyBuffer.java 2006-12-10 19:59:50 UTC (rev 1037) +++ trunk/crossfire/src/cfeditor/CopyBuffer.java 2006-12-10 20:01:45 UTC (rev 1038) @@ -120,7 +120,6 @@ * Excecuting the Cut command. * @param mapControl MapControl of the active map where we copy from */ - @SuppressWarnings({"InstanceMethodNamingConvention"}) public void cut(final MapControl mapControl) { copyNCut(mapControl, Mode.DO_CUT); } Modified: trunk/crossfire/src/cfeditor/gameobject/anim/AnimationObject.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/anim/AnimationObject.java 2006-12-10 19:59:50 UTC (rev 1037) +++ trunk/crossfire/src/cfeditor/gameobject/anim/AnimationObject.java 2006-12-10 20:01:45 UTC (rev 1038) @@ -28,6 +28,7 @@ import java.io.Serializable; import javax.swing.ImageIcon; import net.sf.gridarta.gameobject.anim.AbstractAnimationObject; +import net.sf.gridarta.gameobject.NamedObject; /** * A single animation object. @@ -127,8 +128,8 @@ } /** {@inheritDoc} */ - public int compareTo(final AnimationObject o) { - return animName.compareTo(o.animName); + @Override public int compareTo(final NamedObject o) { + return animName.compareTo(((AnimationObject) o).animName); } } // class AnimationObject Modified: trunk/crossfire/src/cfeditor/gui/map/DefaultLevelRenderer.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/map/DefaultLevelRenderer.java 2006-12-10 19:59:50 UTC (rev 1037) +++ trunk/crossfire/src/cfeditor/gui/map/DefaultLevelRenderer.java 2006-12-10 20:01:45 UTC (rev 1038) @@ -124,7 +124,7 @@ tmpIcon = new ImageIcon(); borderOffset = !pickmap ? 32 : 0; - renderTransform = new AffineTransform(1f, 0f, 0f, 1f, (float) borderOffset, (float) borderOffset); + renderTransform = new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, (float) borderOffset, (float) borderOffset); highLightMask = new Color[]{ new Color(1.0f, 0.0f, 0.0f, 0.33f), new Color(0.0f, 1.0f, 0.0f, 0.33f), Modified: trunk/crossfire/src/cfeditor/map/MapArchObject.java =================================================================== --- trunk/crossfire/src/cfeditor/map/MapArchObject.java 2006-12-10 19:59:50 UTC (rev 1037) +++ trunk/crossfire/src/cfeditor/map/MapArchObject.java 2006-12-10 20:01:45 UTC (rev 1038) @@ -529,6 +529,8 @@ if (shopitems.length() > 0) { appendable.append("shopitems ").append(shopitems).append("\n"); } + // The following floating point equality comparison is assumed to be okay + //noinspection FloatingPointEquality if (shopgreed != 0) { appendable.append("shopgreed ").append(String.valueOf(shopgreed)).append("\n"); } Modified: trunk/daimonin/src/daieditor/CAttribDialog.java =================================================================== --- trunk/daimonin/src/daieditor/CAttribDialog.java 2006-12-10 19:59:50 UTC (rev 1037) +++ trunk/daimonin/src/daieditor/CAttribDialog.java 2006-12-10 20:01:45 UTC (rev 1038) @@ -1088,6 +1088,8 @@ case FLOAT: { // an int attribute if ("0".equals(((DialogAttrib<JFormattedTextField>) attr).input.getText())) { + // The following floating point equality comparison is okay and known not to cause problems. + //noinspection FloatingPointEquality if (archetype.getAttributeDouble(attr.ref.getNameOld()) != 0) { newArchText = newArchText + attr.ref.getNameOld() + " " + (dType == ArchAttribType.FLOAT ? "0.0" : "0") + "\n"; } @@ -1110,6 +1112,8 @@ break; case FLOAT: { final double value = ((Number) ((DialogAttrib<JFormattedTextField>) attr).input.getValue()).doubleValue(); + // The following floating point equality comparison is okay and known not to cause problems. + //noinspection FloatingPointEquality if (archetype.getAttributeDouble(attr.ref.getNameOld()) != value) { newArchText = newArchText + attr.ref.getNameOld() + ' ' + value + '\n'; } Modified: trunk/daimonin/src/daieditor/gameobject/face/FaceFacade.java =================================================================== --- trunk/daimonin/src/daieditor/gameobject/face/FaceFacade.java 2006-12-10 19:59:50 UTC (rev 1037) +++ trunk/daimonin/src/daieditor/gameobject/face/FaceFacade.java 2006-12-10 20:01:45 UTC (rev 1038) @@ -69,7 +69,7 @@ * {@inheritDoc} */ @Override public int filterRGB(final int x, final int y, final int rgb) { - return (x + y) % 2 == 1 ? rgb : rgb & 0x00FFFFFF; + return (x + y) % 2 != 0 ? rgb : rgb & 0x00FFFFFF; } }; // GRID_FILTER Modified: trunk/gridarta.ipr =================================================================== --- trunk/gridarta.ipr 2006-12-10 19:59:50 UTC (rev 1037) +++ trunk/gridarta.ipr 2006-12-10 20:01:45 UTC (rev 1038) @@ -102,8 +102,8 @@ <component name="GUI Designer component loader factory" /> <component name="IdProvider" IDEtalkID="2C998304C446463F0F811673874877B6" /> <component name="InspectionProjectProfileManager"> - <option name="PROJECT_PROFILE" value="Project Default" /> - <option name="USE_PROJECT_LEVEL_SETTINGS" value="false" /> + <option name="PROJECT_PROFILE" value="No errors allowed here" /> + <option name="USE_PROJECT_LEVEL_SETTINGS" value="true" /> <scopes /> <profiles> <profile version="1.0" is_locked="false"> @@ -453,7 +453,7 @@ <option name="myAdditionalJavadocTags" value="todo,note,todo,xxx,note,todo,fixme,fixme,warning,invariant,retval,pre" /> </inspection_tool> </profile> - <profile version="1.0" is_locked="false"> + <profile version="1.0" is_locked="true"> <option name="myName" value="No errors allowed here" /> <option name="myLocal" value="false" /> <used_levels> @@ -493,11 +493,11 @@ </inspection_tool> <inspection_tool class="GwtInconsistentI18nInterface" level="ERROR" enabled="false" /> <inspection_tool class="StringToString" level="WARNING" enabled="false" /> - <inspection_tool class="AnalyzingStaticVariables" level="ERROR" enabled="false"> + <inspection_tool class="AnalyzingStaticVariables" level="ERROR" enabled="true"> <option name="CHECKED_TYPES" value="javax.servlet.http.HttpSession;com.ulcjava.base.application.ULCProxy" /> </inspection_tool> <inspection_tool class="BoundFieldAssignment" level="WARNING" enabled="false" /> - <inspection_tool class="NullArgumentToVariableArgMethod" level="WARNING" enabled="false" /> + <inspection_tool class="NullArgumentToVariableArgMethod" level="WARNING" enabled="true" /> <inspection_tool class="JSUndeclaredVariable" level="INFO" enabled="false" /> <inspection_tool class="PersistenceModelErrorInspection" level="ERROR" enabled="false" /> <inspection_tool class="LoopStatementsThatDontLoop" level="WARNING" enabled="false" /> @@ -514,7 +514,7 @@ <inspection_tool class="EjbWarningInspection" level="WARNING" enabled="false" /> <inspection_tool class="EjbQlInspection" level="ERROR" enabled="false" /> <inspection_tool class="Glassfish" level="ERROR" enabled="false" /> - <inspection_tool class="ConstantConditions" level="WARNING" enabled="false"> + <inspection_tool class="ConstantConditions" level="WARNING" enabled="true"> <option name="SUGGEST_NULLABLE_ANNOTATIONS" value="false" /> </inspection_tool> <inspection_tool class="GwtServiceNotRegistered" level="ERROR" enabled="false" /> @@ -529,7 +529,7 @@ <inspection_tool class="JSUnresolvedFunction" level="INFO" enabled="false" /> <inspection_tool class="InstantiatingObjectToGetClassObject" level="WARNING" enabled="false" /> <inspection_tool class="ReturnFromFinallyBlockJS" level="WARNING" enabled="false" /> - <inspection_tool class="UnusedAssignment" level="WARNING" enabled="false"> + <inspection_tool class="UnusedAssignment" level="WARNING" enabled="true"> <option name="REPORT_PREFIX_EXPRESSIONS" value="false" /> <option name="REPORT_POSTFIX_EXPRESSIONS" value="true" /> <option name="REPORT_REDUNDANT_INITIALIZER" value="true" /> @@ -590,7 +590,7 @@ <inspection_tool class="Weblogic" level="ERROR" enabled="false" /> <inspection_tool class="PersistenceDataSourceORMDomInspection" level="ERROR" enabled="false" /> <inspection_tool class="FallthroughInSwitchStatementJS" level="WARNING" enabled="false" /> - <inspection_tool class="IgnoreResultOfCall" level="WARNING" enabled="false"> + <inspection_tool class="IgnoreResultOfCall" level="WARNING" enabled="true"> <option name="m_reportAllNonLibraryCalls" value="false" /> <option name="callCheckString" value="java.io.InputStream,read,java.io.InputStream,skip,java.lang.StringBuffer,toString,java.lang.StringBuilder,toString,java.lang.String,.*,java.math.BigInteger,.*,java.math.BigDecimal,.*,java.net.InetAddress,.*" /> </inspection_tool> @@ -598,7 +598,7 @@ <inspection_tool class="RedundantCast" level="WARNING" enabled="false" /> <inspection_tool class="UnnecessaryReturn" level="WARNING" enabled="false" /> <inspection_tool class="FinalStaticMethod" level="WARNING" enabled="false" /> - <inspection_tool class="SuspiciousMethodCalls" level="WARNING" enabled="false" /> + <inspection_tool class="SuspiciousMethodCalls" level="WARNING" enabled="true" /> <inspection_tool class="HTML" level="WARNING" enabled="false"> <option name="myAdditionalHtmlTags" value="embed,nobr,noembed,comment,script" /> <option name="myAdditionalHtmlAttributes" value="type,wmode,src,width,height" /> @@ -623,7 +623,7 @@ <option name="IGNORE_SIMPLE_STATEMENTS" value="true" /> </inspection_tool> <inspection_tool class="AntDuplicateTargetsInspection" level="ERROR" enabled="false" /> - <inspection_tool class="NullableProblems" level="WARNING" enabled="false"> + <inspection_tool class="NullableProblems" level="WARNING" enabled="true"> <option name="REPORT_NULLABLE_METHOD_OVERRIDES_NOTNULL" value="true" /> <option name="REPORT_NOT_ANNOTATED_METHOD_OVERRIDES_NOTNULL" value="true" /> <option name="REPORT_NOTNULL_PARAMETER_OVERRIDES_NULLABLE" value="true" /> @@ -632,21 +632,21 @@ <inspection_tool class="ReferencesToClassesFromDefaultPackagesInJSPFile" level="ERROR" enabled="false" /> <inspection_tool class="TrivialIf" level="WARNING" enabled="false" /> <inspection_tool class="AntMissingPropertiesFileInspection" level="ERROR" enabled="false" /> - <inspection_tool class="ObjectEqualsNull" level="WARNING" enabled="false" /> + <inspection_tool class="ObjectEqualsNull" level="WARNING" enabled="true" /> <inspection_tool class="GwtToHtmlReferences" level="ERROR" enabled="false" /> <inspection_tool class="EmptyFinallyBlock" level="WARNING" enabled="false" /> - <inspection_tool class="MismatchedCollectionQueryUpdate" level="WARNING" enabled="false" /> - <inspection_tool class="EmptyStatementBody" level="WARNING" enabled="false"> + <inspection_tool class="MismatchedCollectionQueryUpdate" level="WARNING" enabled="true" /> + <inspection_tool class="EmptyStatementBody" level="WARNING" enabled="true"> <option name="m_reportEmptyBlocks" value="false" /> </inspection_tool> - <inspection_tool class="StringEquality" level="WARNING" enabled="false" /> + <inspection_tool class="StringEquality" level="WARNING" enabled="true" /> <inspection_tool class="RequiredAttributes" level="WARNING" enabled="false"> <option name="myAdditionalRequiredHtmlAttributes" value="" /> </inspection_tool> <inspection_tool class="TrivialConditionalJS" level="WARNING" enabled="false" /> <inspection_tool class="OneButtonGroup" level="WARNING" enabled="false" /> <inspection_tool class="StrutsTilesInspection" level="ERROR" enabled="false" /> - <inspection_tool class="ReflectionForUnavailableAnnotation" level="WARNING" enabled="false" /> + <inspection_tool class="ReflectionForUnavailableAnnotation" level="WARNING" enabled="true" /> <inspection_tool class="IncompatibleMaskJS" level="WARNING" enabled="false" /> <inspection_tool class="NonJREEmulationClassesInClientCode" level="ERROR" enabled="false" /> <inspection_tool class="OctalLiteral" level="WARNING" enabled="false" /> @@ -655,7 +655,7 @@ <option name="CHECK_PUBLIC_INTERFACE_METHODS" value="true" /> <option name="CHECK_TRANSIENT_STATIC_FIELDS" value="true" /> </inspection_tool> - <inspection_tool class="InfiniteRecursion" level="WARNING" enabled="false" /> + <inspection_tool class="InfiniteRecursion" level="WARNING" enabled="true" /> <inspection_tool class="Geronimo" level="ERROR" enabled="false" /> <inspection_tool class="InfiniteLoopJS" level="WARNING" enabled="false" /> <inspection_tool class="SelfIncludingJspFiles" level="ERROR" enabled="false" /> @@ -680,11 +680,11 @@ <inspection_tool class="FieldCanBeLocal" level="WARNING" enabled="false" /> <inspection_tool class="UNCHECKED_WARNING" level="WARNING" enabled="false" /> <inspection_tool class="LoopStatementThatDoesntLoopJS" level="WARNING" enabled="false" /> - <inspection_tool class="SuspiciousNameCombination" level="WARNING" enabled="false"> + <inspection_tool class="SuspiciousNameCombination" level="WARNING" enabled="true"> <group names="x,width,left,right" /> <group names="y,height,top,bottom" /> </inspection_tool> - <inspection_tool class="MalformedRegex" level="WARNING" enabled="false" /> + <inspection_tool class="MalformedRegex" level="WARNING" enabled="true" /> <inspection_tool class="TrivialIfJS" level="WARNING" enabled="false" /> <inspection_tool class="SimplifiableConditionalExpression" level="WARNING" enabled="false" /> <inspection_tool class="UNUSED_IMPORT" level="WARNING" enabled="false" /> @@ -709,7 +709,7 @@ </inspection_tool> <inspection_tool class="PersistenceDomInspection" level="ERROR" enabled="false" /> <inspection_tool class="EmptyTryBlock" level="WARNING" enabled="false" /> - <inspection_tool class="MalformedFormatString" level="WARNING" enabled="false" /> + <inspection_tool class="MalformedFormatString" level="WARNING" enabled="true" /> <inspection_tool class="ComponentRegistrationProblems" level="ERROR" enabled="false"> <option name="CHECK_PLUGIN_XML" value="true" /> <option name="CHECK_JAVA_CODE" value="true" /> @@ -721,7 +721,7 @@ <inspection_tool class="ConstantConditionalExpression" level="WARNING" enabled="false" /> <inspection_tool class="MissingMnemonic" level="WARNING" enabled="false" /> <inspection_tool class="CloneDeclaresCloneNotSupported" level="WARNING" enabled="false" /> - <inspection_tool class="MalformedXPath" level="WARNING" enabled="false" /> + <inspection_tool class="MalformedXPath" level="WARNING" enabled="true" /> <inspection_tool class="AccessStaticViaInstance" level="WARNING" enabled="false" /> <inspection_tool class="UnusedParameters" level="WARNING" enabled="false" /> <inspection_tool class="DuplicateMnemonic" level="WARNING" enabled="false" /> @@ -730,12 +730,12 @@ </inspection_tool> <inspection_tool class="GWTRemoteServiceAsyncCheck" level="ERROR" enabled="false" /> <inspection_tool class="ContinueOrBreakFromFinallyBlockJS" level="WARNING" enabled="false" /> - <inspection_tool class="MismatchedArrayReadWrite" level="WARNING" enabled="false" /> + <inspection_tool class="MismatchedArrayReadWrite" level="WARNING" enabled="true" /> <inspection_tool class="UnusedReturnValue" level="WARNING" enabled="false" /> <inspection_tool class="UnnecessaryContinueJS" level="WARNING" enabled="false" /> <inspection_tool class="FinallyBlockCannotCompleteNormally" level="WARNING" enabled="false" /> <inspection_tool class="BadExpressionStatementJS" level="WARNING" enabled="false" /> - <inspection_tool class="PrimitiveArrayArgumentToVariableArgMethod" level="WARNING" enabled="false" /> + <inspection_tool class="PrimitiveArrayArgumentToVariableArgMethod" level="WARNING" enabled="true" /> <inspection_tool class="InfiniteRecursionJS" level="WARNING" enabled="false" /> <inspection_tool class="StrutsValidatorInspection" level="ERROR" enabled="false" /> <inspection_tool class="ContinueOrBreakFromFinallyBlock" level="WARNING" enabled="false" /> @@ -915,6 +915,797 @@ <option name="m_minLength" value="1" /> <option name="m_maxLength" value="1" /> </inspection_tool> + <inspection_tool class="ComparisonToNaN" level="ERROR" enabled="true" /> + <inspection_tool class="ConfusingFloatingPointLiteral" level="ERROR" enabled="true" /> + <inspection_tool class="ComparisonOfShortAndChar" level="ERROR" enabled="true" /> + <inspection_tool class="ConstantMathCall" level="ERROR" enabled="true" /> + <inspection_tool class="DivideByZero" level="ERROR" enabled="true" /> + <inspection_tool class="BigDecimalEquals" level="ERROR" enabled="true" /> + <inspection_tool class="FloatingPointEquality" level="ERROR" enabled="true" /> + <inspection_tool class="LongLiteralsEndingWithLowercaseL" level="ERROR" enabled="true" /> + <inspection_tool class="BadOddness" level="ERROR" enabled="true" /> + <inspection_tool class="UnnecessaryQualifierForThis" level="WARNING" enabled="false" /> + <inspection_tool class="MultipleDeclaration" level="WARNING" enabled="false" /> + <inspection_tool class="ParameterOfConcreteClass" level="WARNING" enabled="false" /> + <inspection_tool class="ThreadPriority" level="WARNING" enabled="false" /> + <inspection_tool class="ExtendsUtilityClass" level="WARNING" enabled="false" /> + <inspection_tool class="TooBroadScope" level="WARNING" enabled="false"> + <option name="m_allowConstructorAsInitializer" value="false" /> + <option name="m_onlyLookAtBlocks" value="false" /> + </inspection_tool> + <inspection_tool class="AssignmentUsedAsCondition" level="WARNING" enabled="false" /> + <inspection_tool class="StringConcatenation" level="WARNING" enabled="false"> + <option name="ignoreAsserts" value="false" /> + <option name="ignoreSystemOuts" value="false" /> + <option name="ignoreSystemErrs" value="false" /> + </inspection_tool> + <inspection_tool class="AssertsWithoutMessages" level="WARNING" enabled="false" /> + <inspection_tool class="RandomDoubleForRandomInteger" level="WARNING" enabled="false" /> + <inspection_tool class="TestMethodWithoutAssertion" level="WARNING" enabled="false" /> + <inspection_tool class="SerialPersistentFieldsWithWrongSignature" level="WARNING" enabled="false" /> + <inspection_tool class="StringBufferReplaceableByStringBuilder" level="WARNING" enabled="false" /> + <inspection_tool class="UnterminatedStatementJS" level="WARNING" enabled="false" /> + <inspection_tool class="CastToConcreteClass" level="WARNING" enabled="false" /> + <inspection_tool class="EmptyFinallyBlockJS" level="WARNING" enabled="false" /> + <inspection_tool class="UnnecessaryFullyQualifiedName" level="WARNING" enabled="false"> + <option name="m_ignoreJavadoc" value="false" /> + </inspection_tool> + <inspection_tool class="ReturnOfCollectionField" level="WARNING" enabled="false"> + <option name="ignorePrivateMethods" value="true" /> + </inspection_tool> + <inspection_tool class="VarargParameter" level="WARNING" enabled="false" /> + <inspection_tool class="CachedNumberConstructorCall" level="WARNING" enabled="false" /> + <inspection_tool class="ProtectedField" level="WARNING" enabled="false" /> + <inspection_tool class="BadExceptionDeclared" level="WARNING" enabled="false"> + <option name="exceptionCheckString" value="java.lang.Throwable,java.lang.Exception,java.lang.Error,java.lang.RuntimeException,java.lang.NullPointerException,java.lang.ClassCastException,java.lang.ArrayIndexOutOfBoundsException" /> + <option name="ignoreTestCases" value="false" /> + </inspection_tool> + <inspection_tool class="NotifyWithoutCorrespondingWait" level="WARNING" enabled="false" /> + <inspection_tool class="AnonymousClassVariableHidesContainingMethodVariable" level="WARNING" enabled="false" /> + <inspection_tool class="DeserializableClassInSecureContext" level="WARNING" enabled="false" /> + <inspection_tool class="SystemGetenv" level="WARNING" enabled="false" /> + <inspection_tool class="StaticCallOnSubclass" level="WARNING" enabled="true" /> + <inspection_tool class="SystemExit" level="WARNING" enabled="false" /> + <inspection_tool class="ClassWithoutConstructor" level="WARNING" enabled="false" /> + <inspection_tool class="BreakStatement" level="WARNING" enabled="false" /> + <inspection_tool class="UnconditionalWait" level="WARNING" enabled="false" /> + <inspection_tool class="CyclomaticComplexity" level="WARNING" enabled="false"> + <option name="m_limit" value="10" /> + </inspection_tool> + <inspection_tool class="UnusedImport" level="WARNING" enabled="false" /> + <inspection_tool class="ConstantOnLHSOfComparison" level="WARNING" enabled="false" /> + <inspection_tool class="StaticVariableUninitializedUse" level="WARNING" enabled="false"> + <option name="m_ignorePrimitives" value="false" /> + </inspection_tool> + <inspection_tool class="ReturnOfDateField" level="WARNING" enabled="false" /> + <inspection_tool class="StringTokenizer" level="WARNING" enabled="false" /> + <inspection_tool class="NestedSwitchStatementJS" level="WARNING" enabled="false" /> + <inspection_tool class="FinalClass" level="WARNING" enabled="false" /> + <inspection_tool class="LabeledStatement" level="WARNING" enabled="false" /> + <inspection_tool class="NotifyCalledOnCondition" level="WARNING" enabled="false" /> + <inspection_tool class="MisspelledEquals" level="WARNING" enabled="true" /> + <inspection_tool class="ConditionalExpressionJS" level="WARNING" enabled="false" /> + <inspection_tool class="ThreadRun" level="WARNING" enabled="false" /> + <inspection_tool class="HardcodedLineSeparators" level="WARNING" enabled="false" /> + <inspection_tool class="SwitchStatementWithNoDefaultBranchJS" level="WARNING" enabled="false" /> + <inspection_tool class="NegatedIfStatementJS" level="WARNING" enabled="false" /> + <inspection_tool class="DivideByZeroJS" level="WARNING" enabled="false" /> + <inspection_tool class="XHTMLIncompatabilitiesJS" level="WARNING" enabled="false" /> + <inspection_tool class="AutoUnboxing" level="WARNING" enabled="false" /> + <inspection_tool class="NonSynchronizedMethodOverridesSynchronizedMethod" level="WARNING" enabled="false" /> + <inspection_tool class="CharacterComparison" level="WARNING" enabled="false" /> + <inspection_tool class="MethodReturnOfConcreteClass" level="WARNING" enabled="false" /> + <inspection_tool class="ResultSetIndexZero" level="WARNING" enabled="true" /> + <inspection_tool class="ConstantOnRHSOfComparison" level="WARNING" enabled="false" /> + <inspection_tool class="AnonymousFunctionJS" level="WARNING" enabled="false" /> + <inspection_tool class="MagicNumber" level="WARNING" enabled="false"> + <option name="m_ignoreInHashCode" value="true" /> + </inspection_tool> + <inspection_tool class="ParameterHidingMemberVariable" level="WARNING" enabled="false"> + <option name="m_ignoreInvisibleFields" value="true" /> + <option name="m_ignoreStaticMethodParametersHidingInstanceFields" value="false" /> + <option name="m_ignoreForConstructors" value="false" /> + <option name="m_ignoreForPropertySetters" value="false" /> + <option name="m_ignoreForAbstractMethods" value="false" /> + </inspection_tool> + <inspection_tool class="SynchronizeOnThis" level="WARNING" enabled="false" /> + <inspection_tool class="HibernateResource" level="WARNING" enabled="false" /> + <inspection_tool class="DefaultNotLastCaseInSwitchJS" level="WARNING" enabled="false" /> + <inspection_tool class="SingleCharacterStartsWith" level="WARNING" enabled="false" /> + <inspection_tool class="InstanceVariableInitialization" level="WARNING" enabled="false"> + <option name="m_ignorePrimitives" value="false" /> + </inspection_tool> + <inspection_tool class="SwitchStatementWithTooManyBranches" level="WARNING" enabled="false"> + <option name="m_limit" value="10" /> + </inspection_tool> + <inspection_tool class="UtilityClassWithoutPrivateConstructor" level="WARNING" enabled="false"> + <option name="ignoreClassesWithOnlyMain" value="false" /> + </inspection_tool> + <inspection_tool class="ThrowCaughtLocally" level="WARNING" enabled="false"> + <option name="ignoreRethrownExceptions" value="false" /> + </inspection_tool> + <inspection_tool class="EqualsUsesNonFinalVariable" level="WARNING" enabled="true" /> + <inspection_tool class="CyclomaticComplexityJS" level="WARNING" enabled="false"> + <option name="m_limit" value="10" /> + </inspection_tool> + <inspection_tool class="ObjectEquality" level="WARNING" enabled="true"> + <option name="m_ignoreEnums" value="true" /> + <option name="m_ignoreClassObjects" value="false" /> + <option name="m_ignorePrivateConstructors" value="false" /> + </inspection_tool> + <inspection_tool class="EqualsWhichDoesntCheckParameterClass" level="WARNING" enabled="true" /> + <inspection_tool class="ExceptionFromCatchWhichDoesntWrap" level="WARNING" enabled="false"> + <option name="ignoreGetMessage" value="false" /> + </inspection_tool> + <inspection_tool class="RedundantThrowsDeclaration" level="WARNING" enabled="false" /> + <inspection_tool class="ChainedEqualityJS" level="WARNING" enabled="false" /> + <inspection_tool class="MultiplyOrDivideByPowerOfTwo" level="WARNING" enabled="false" /> + <inspection_tool class="RuntimeExec" level="WARNING" enabled="false" /> + <inspection_tool class="StringLiteralBreaksHTMLJS" level="WARNING" enabled="false" /> + <inspection_tool class="SerializableWithUnconstructableAncestor" level="WARNING" enabled="false" /> + <inspection_tool class="AssertStatement" level="WARNING" enabled="false" /> + <inspection_tool class="MissortedModifiers" level="WARNING" enabled="false"> + <option name="m_requireAnnotationsFirst" value="true" /> + </inspection_tool> + <inspection_tool class="SubtractionInCompareTo" level="WARNING" enabled="true" /> + <inspection_tool class="SleepWhileHoldingLock" level="WARNING" enabled="false" /> + <inspection_tool class="Singleton" level="WARNING" enabled="false" /> + <inspection_tool class="FieldRepeatedlyAccessed" level="WARNING" enabled="false"> + <option name="m_ignoreFinalFields" value="false" /> + </inspection_tool> + <inspection_tool class="UnnecessaryFinalOnParameter" level="WARNING" enabled="false" /> + <inspection_tool class="RedundantMethodOverride" level="WARNING" enabled="false" /> + <inspection_tool class="TestMethodInProductCode" level="WARNING" enabled="false" /> + <inspection_tool class="ThreadDeathRethrown" level="WARNING" enabled="false" /> + <inspection_tool class="OverlyStrongTypeCast" level="WARNING" enabled="false" /> + <inspection_tool class="LocalVariableOfConcreteClass" level="WARNING" enabled="false" /> + <inspection_tool class="RedundantImplements" level="WARNING" enabled="false" /> + <inspection_tool class="IfStatementWithTooManyBranches" level="WARNING" enabled="false"> + <option name="m_limit" value="3" /> + </inspection_tool> + <inspection_tool class="AssignmentToStaticFieldFromInstanceMethod" level="WARNING" enabled="false" /> + <inspection_tool class="NestingDepth" level="WARNING" enabled="false"> + <option name="m_limit" value="5" /> + </inspection_tool> + <inspection_tool class="StringCompareTo" level="WARNING" enabled="false" /> + <inspection_tool class="EqualityComparisonWithCoercionJS" level="WARNING" enabled="false" /> + <inspection_tool class="ReturnThis" level="WARNING" enabled="false" /> + <inspection_tool class="StringToUpperWithoutLocale" level="WARNING" enabled="false" /> + <inspection_tool class="VoidExpressionJS" level="WARNING" enabled="false" /> + <inspection_tool class="BusyWait" level="WARNING" enabled="false" /> + <inspection_tool class="WithStatementJS" level="WARNING" enabled="false" /> + <inspection_tool class="ReplaceAssignmentWithOperatorAssignmentJS" level="WARNING" enabled="false" /> + <inspection_tool class="UtilityClass" level="WARNING" enabled="false" /> + <inspection_tool class="CollectionAddedToSelf" level="WARNING" enabled="true" /> + <inspection_tool class="AbstractClassExtendsConcreteClass" level="WARNING" enabled="false" /> + <inspection_tool class="InstanceVariableOfConcreteClass" level="WARNING" enabled="false" /> + <inspection_tool class="StaticCollection" level="WARNING" enabled="false"> + <option name="m_ignoreWeakCollections" value="false" /> + </inspection_tool> + <inspection_tool class="CommaExpressionJS" level="WARNING" enabled="false" /> + <inspection_tool class="IntegerDivisionInFloatingPointContext" level="WARNING" enabled="false" /> + <inspection_tool class="CovariantEquals" level="WARNING" enabled="true" /> + <inspection_tool class="DuplicateConditionJS" level="WARNING" enabled="false" /> + <inspection_tool class="ReadResolveAndWriteReplaceProtected" level="WARNING" enabled="false" /> + <inspection_tool class="InterfaceNeverImplemented" level="WARNING" enabled="false"> + <option name="ignoreInterfacesThatOnlyDeclareConstants" value="false" /> + </inspection_tool> + <inspection_tool class="LengthOneStringsInConcatenation" level="WARNING" enabled="false" /> + <inspection_tool class="ThreadYield" level="WARNING" enabled="false" /> + <inspection_tool class="DeclareCollectionAsInterface" level="WARNING" enabled="false"> + <option name="ignoreLocalVariables" value="false" /> + <option name="ignorePrivateMethodsAndFields" value="false" /> + </inspection_tool> + <inspection_tool class="WaitNotInLoop" level="WARNING" enabled="false" /> + <inspection_tool class="ClassInitializer" level="WARNING" enabled="false" /> + <inspection_tool class="NonShortCircuitBoolean" level="WARNING" enabled="true" /> + <inspection_tool class="NestedConditionalExpressionJS" level="WARNING" enabled="false" /> + <inspection_tool class="PrivateMemberAccessBetweenOuterAndInnerClass" level="WARNING" enabled="false" /> + <inspection_tool class="NonThreadSafeLazyInitialization" level="WARNING" enabled="false" /> + <inspection_tool class="DuplicatePropertyInspection" level="WARNING" enabled="false"> + <option name="CURRENT_FILE" value="true" /> + <option name="MODULE_WITH_DEPENDENCIES" value="false" /> + <option name="CHECK_DUPLICATE_VALUES" value="true" /> + <option name="CHECK_DUPLICATE_KEYS" value="true" /> + <option name="CHECK_DUPLICATE_KEYS_WITH_DIFFERENT_VALUES" value="true" /> + </inspection_tool> + <inspection_tool class="PointlessIndexOfComparison" level="WARNING" enabled="false" /> + <inspection_tool class="OctalAndDecimalIntegersMixed" level="WARNING" enabled="false" /> + <inspection_tool class="CallToSimpleSetterInClass" level="WARNING" enabled="false"> + <option name="ignoreSetterCallsOnOtherObjects" value="false" /> + </inspection_tool> + <inspection_tool class="MethodOverridesPrivateMethod" level="WARNING" enabled="false" /> + <inspection_tool class="FallthruInSwitchStatement" level="WARNING" enabled="false" /> + <inspection_tool class="CallToNativeMethodWhileLocked" level="WARNING" enabled="false" /> + <inspection_tool class="NestedAssignmentJS" level="WARNING" enabled="false" /> + <inspection_tool class="SwitchStatement" level="WARNING" enabled="false" /> + <inspection_tool class="CustomClassloader" level="WARNING" enabled="false" /> + <inspection_tool class="NestedConditionalExpression" level="WARNING" enabled="false" /> + <inspection_tool class="AwaitWithoutCorrespondingSignal" level="WARNING" enabled="false" /> + <inspection_tool class="DuplicateCondition" level="WARNING" enabled="false"> + <option name="ignoreMethodCalls" value="false" /> + </inspection_tool> + <inspection_tool class="MethodWithMultipleLoops" level="WARNING" enabled="false" /> + <inspection_tool class="NonCommentSourceStatements" level="WARNING" enabled="false"> + <option name="m_limit" value="30" /> + </inspection_tool> + <inspection_tool class="HashCodeUsesNonFinalVariable" level="WARNING" enabled="true" /> + <inspection_tool class="Since15" level="ERROR" enabled="false" /> + <inspection_tool class="NegatedIfElse" level="WARNING" enabled="false"> + <option name="m_ignoreNegatedNullComparison" value="true" /> + </inspection_tool> + <inspection_tool class="ReuseOfLocalVariable" level="WARNING" enabled="false" /> + <inspection_tool class="SerializableInnerClassWithNonSerializableOuterClass" level="WARNING" enabled="false"> + <option name="m_ignoreSerializableDueToInheritance" value="true" /> + </inspection_tool> + <inspection_tool class="ConstantOnLHSOfComparisonJS" level="WARNING" enabled="false" /> + <inspection_tool class="DebuggerStatementJS" level="WARNING" enabled="false" /> + <inspection_tool class="IncrementDecrementUsedAsExpression" level="WARNING" enabled="false" /> + <inspection_tool class="IfStatementWithIdenticalBranchesJS" level="WARNING" enabled="false" /> + <inspection_tool class="MethodOverloadsParentMethod" level="WARNING" enabled="false" /> + <inspection_tool class="MethodNameSameAsClassName" level="WARNING" enabled="false" /> + <inspection_tool class="ChannelResource" level="WARNING" enabled="false" /> + <inspection_tool class="InnerHTMLJS" level="WARNING" enabled="false" /> + <inspection_tool class="InnerClassOnInterface" level="WARNING" enabled="false"> + <option name="m_ignoreInnerInterfaces" value="false" /> + </inspection_tool> + <inspection_tool class="CastToIncompatibleInterface" level="WARNING" enabled="true" /> + <inspection_tool class="MultipleTypedDeclaration" level="WARNING" enabled="false" /> + <inspection_tool class="JNDIResource" level="WARNING" enabled="false" /> + <inspection_tool class="OverlyComplexBooleanExpression" level="WARNING" enabled="false"> + <option name="m_limit" value="3" /> + <option name="m_ignorePureConjunctionsDisjunctions" value="true" /> + </inspection_tool> + <inspection_tool class="ThreadDumpStack" level="WARNING" enabled="false" /> + <inspection_tool class="UseOfAnotherObjectsPrivateField" level="WARNING" enabled="false" /> + <inspection_tool class="ConditionalExpressionWithIdenticalBranchesJS" level="WARNING" enabled="false" /> + <inspection_tool class="Annotation" level="WARNING" enabled="false" /> + <inspection_tool class="UseOfAWTPeerClass" level="WARNING" enabled="false" /> + <inspection_tool class="OverlyComplexBooleanExpressionJS" level="WARNING" enabled="false"> + <option name="m_limit" value="3" /> + </inspection_tool> + <inspection_tool class="InnerClassVariableHidesOuterClassVariable" level="WARNING" enabled="false"> + <option name="m_ignoreInvisibleFields" value="true" /> + </inspection_tool> + <inspection_tool class="NonSerializableObjectPassedToObjectStream" level="WARNING" enabled="false" /> + <inspection_tool class="StringEqualsIgnoreCase" level="WARNING" enabled="false" /> + <inspection_tool class="ContinueStatementWithLabel" level="WARNING" enabled="false" /> + <inspection_tool class="LocalVariableNamingConventionJS" level="WARNING" enabled="false"> + <option name="m_regex" value="[a-z][A-Za-z]*" /> + <option name="m_minLength" value="1" /> + <option name="m_maxLength" value="32" /> + </inspection_tool> + <inspection_tool class="ParameterNamingConventionJS" level="WARNING" enabled="false"> + <option name="m_regex" value="[a-z][A-Za-z]*" /> + <option name="m_minLength" value="1" /> + <option name="m_maxLength" value="32" /> + </inspection_tool> + <inspection_tool class="AssignmentToForLoopParameterJS" level="WARNING" enabled="false" /> + <inspection_tool class="CheckedExceptionClass" level="WARNING" enabled="false" /> + <inspection_tool class="CastThatLosesPrecision" level="WARNING" enabled="false" /> + <inspection_tool class="StringBufferField" level="WARNING" enabled="false" /> + <inspection_tool class="SwitchStatementWithConfusingDeclaration" level="WARNING" enabled="false" /> + <inspection_tool class="OverlyComplexArithmeticExpression" level="WARNING" enabled="false"> + <option name="m_limit" value="6" /> + </inspection_tool> + <inspection_tool class="JUnitAbstractTestClassNamingConvention" level="WARNING" enabled="false"> + <option name="m_regex" value="[A-Z][A-Za-z\d]*TestCase" /> + <option name="m_minLength" value="12" /> + <option name="m_maxLength" value="64" /> + </inspection_tool> + <inspection_tool class="UnnecessaryModuleDependencyInspection" level="WARNING" enabled="false" /> + <inspection_tool class="UnnecessaryParentheses" level="WARNING" enabled="false" /> + <inspection_tool class="IncrementDecrementResultUsedJS" level="WARNING" enabled="false" /> + <inspection_tool class="TestCaseInProductCode" level="WARNING" enabled="false" /> + <inspection_tool class="ChainedEquality" level="WARNING" enabled="false" /> + <inspection_tool class="SuppressionAnnotation" level="WARNING" enabled="false" /> + <inspection_tool class="OctalIntegerJS" level="WARNING" enabled="false" /> + <inspection_tool class="SerializableClassInSecureContext" level="WARNING" enabled="false" /> + <inspection_tool class="NonBlockStatementBodyJS" level="WARNING" enabled="false" /> + <inspection_tool class="InterfaceWithOnlyOneDirectInheritor" level="WARNING" enabled="false" /> + <inspection_tool class="NestedMethodCall" level="WARNING" enabled="false"> + <option name="m_ignoreFieldInitializations" value="true" /> + </inspection_tool> + <inspection_tool class="FieldAccessedSynchronizedAndUnsynchronized" level="WARNING" enabled="false"> + <option name="countGettersAndSetters" value="false" /> + </inspection_tool> + <inspection_tool class="OverloadedVarargsMethod" level="WARNING" enabled="false" /> + <inspection_tool class="CatchGenericClass" level="WARNING" enabled="false" /> + <inspection_tool class="ParametersPerFunctionJS" level="WARNING" enabled="false"> + <option name="m_limit" value="5" /> + </inspection_tool> + <inspection_tool class="ZeroLengthArrayInitialization" level="WARNING" enabled="false" /> + <inspection_tool class="PackageVisibleField" level="WARNING" enabled="false" /> + <inspection_tool class="AbstractClassWithOnlyOneDirectInheritor" level="WARNING" enabled="false" /> + <inspection_tool class="OverridableMethodCallDuringObjectConstruction" level="WARNING" enabled="false" /> + <inspection_tool class="StaticNonFinalField" level="WARNING" enabled="false" /> + <inspection_tool class="DynamicallyGeneratedCodeJS" level="WARNING" enabled="false" /> + <inspection_tool class="TimeToString" level="WARNING" enabled="false" /> + <inspection_tool class="SubstringZero" level="WARNING" enabled="false" /> + <inspection_tool class="ObsoleteCollection" level="WARNING" enabled="false" /> + <inspection_tool class="ClassWithoutNoArgConstructor" level="WARNING" enabled="false"> + <option name="m_ignoreClassesWithNoConstructors" value="true" /> + </inspection_tool> + <inspection_tool class="PublicField" level="WARNING" enabled="false" /> + <inspection_tool class="ConstantDeclaredInAbstractClass" level="WARNING" enabled="false" /> + <inspection_tool class="TooBroadCatch" level="WARNING" enabled="false" /> + <inspection_tool class="ThrownExceptionsPerMethod" level="WARNING" enabled="false"> + <option name="m_limit" value="3" /> + </inspection_tool> + <inspection_tool class="MethodOnlyUsedFromInnerClass" level="WARNING" enabled="false"> + <option name="ignoreMethodsAccessedFromAnonymousClass" value="false" /> + </inspection_tool> + <inspection_tool class="ResultOfObjectAllocationIgnored" level="WARNING" enabled="true" /> + <inspection_tool class="OverriddenMethodCallInConstructor" level="WARNING" enabled="false" /> + <inspection_tool class="PublicStaticArrayField" level="WARNING" enabled="false" /> + <inspection_tool class="AwaitNotInLoop" level="WARNING" enabled="false" /> + <inspection_tool class="UnsecureRandomNumberGeneration" level="WARNING" enabled="false" /> + <inspection_tool class="NestedFunctionJS" level="WARNING" enabled="false"> + <option name="m_includeAnonymousFunctions" value="false" /> + </inspection_tool> + <inspection_tool class="ParametersPerMethod" level="WARNING" enabled="false"> + <option name="m_limit" value="5" /> + </inspection_tool> + <inspection_tool class="InstanceofIncompatibleInterface" level="WARNING" enabled="true" /> + <inspection_tool class="AnonymousClassMethodCount" level="WARNING" enabled="false"> + <option name="m_limit" value="1" /> + </inspection_tool> + <inspection_tool class="WaitOrAwaitWithoutTimeout" level="WARNING" enabled="false" /> + <inspection_tool class="ClassComplexity" level="WARNING" enabled="false"> + <option name="m_limit" value="80" /> + </inspection_tool> + <inspection_tool class="ExtendsThread" level="WARNING" enabled="false" /> + <inspection_tool class="EqualsBetweenInconvertibleTypes" level="WARNING" enabled="true" /> + <inspection_tool class="InstanceofInterfaces" level="WARNING" enabled="false" /> + <inspection_tool class="StringEquals" level="WARNING" enabled="false" /> + <inspection_tool class="MagicNumberJS" level="WARNING" enabled="false" /> + <inspection_tool class="MisspelledTearDown" level="WARNING" enabled="false" /> + <inspection_tool class="NegatedConditionalExpressionJS" level="WARNING" enabled="false" /> + <inspection_tool class="TestCaseWithConstructor" level="WARNING" enabled="false" /> + <inspection_tool class="MisspelledHashcode" level="WARNING" enabled="true" /> + <inspection_tool class="EnumSwitchStatementWhichMissesCases" level="WARNING" enabled="false"> + <option name="ignoreSwitchStatementsWithDefault" value="false" /> + </inspection_tool> + <inspection_tool class="BlockStatementJS" level="WARNING" enabled="false" /> + <inspection_tool class="ClassReferencesSubclass" level="WARNING" enabled="false" /> + <inspection_tool class="SetupCallsSuperSetup" level="WARNING" enabled="false" /> + <inspection_tool class="UnconstructableTestCase" level="WARNING" enabled="false" /> + <inspection_tool class="AssignmentResultUsedJS" level="WARNING" enabled="false" /> + <inspection_tool class="ClassWithoutLogger" level="WARNING" enabled="false"> + <option name="loggerClassName" value="java.util.logging.Logger" /> + <option name="ignoreSuperLoggers" value="false" /> + </inspection_tool> + <inspection_tool class="VolatileLongOrDoubleField" level="WARNING" enabled="false" /> + <inspection_tool class="AnnotationClass" level="WARNING" enabled="false" /> + <inspection_tool class="TailRecursionJS" level="WARNING" enabled="false" /> + <inspection_tool class="StringBufferMustHaveInitialCapacity" level="WARNING" enabled="false" /> + <inspection_tool class="MethodMayBeStatic" level="WARNING" enabled="false"> + <option name="m_onlyPrivateOrFinal" value="false" /> + <option name="m_ignoreEmptyMethods" value="true" /> + </inspection_tool> + <inspection_tool class="TypeParameterHidesVisibleType" level="WARNING" enabled="false" /> + <inspection_tool class="DateToString" level="WARNING" enabled="false" /> + <inspection_tool class="OverloadedMethodsWithSameNumberOfParameters" level="WARNING" enabled="false" /> + <inspection_tool class="NestedSwitchStatement" level="WARNING" enabled="false" /> + <inspection_tool class="CStyleArrayDeclaration" level="WARNING" enabled="false" /> + <inspection_tool class="NakedNotify" level="WARNING" enabled="false" /> + <inspection_tool class="SwitchStatementDensity" level="WARNING" enabled="false"> + <option name="m_limit" value="20" /> + </inspection_tool> + <inspection_tool class="RefusedBequest" level="WARNING" enabled="false"> + <option name="ignoreEmptySuperMethods" value="false" /> + </inspection_tool> + <inspection_tool class="NonSerializableWithSerialVersionUIDField" level="WARNING" enabled="false" /> + <inspection_tool class="SwitchStatementWithTooFewBranches" level="WARNING" enabled="false"> + <option name="m_limit" value="2" /> + </inspection_tool> + <inspection_tool class="ForeachStatement" level="WARNING" enabled="false" /> + <inspection_tool class="NestingDepthJS" level="WARNING" enabled="false"> + <option name="m_limit" value="5" /> + </inspection_tool> + <inspection_tool class="AnonymousInnerClassMayBeStatic" level="WARNING" enabled="false" /> + <inspection_tool class="CheckForOutOfMemoryOnLargeArrayAllocation" level="WARNING" enabled="false"> + <option name="m_limit" value="64" /> + </inspection_tool> + <inspection_tool class="JDBCPrepareStatementWithNonConstantString" level="WARNING" enabled="false" /> + <inspection_tool class="NonStaticFinalLogger" level="WARNING" enabled="false"> + <option name="loggerClassName" value="java.util.logging.Logger" /> + </inspection_tool> + <inspection_tool class="NoopMethodInAbstractClass" level="WARNING" enabled="false" /> + <inspection_tool class="SystemGC" level="WARNING" enabled="false" /> + <inspection_tool class="NonFinalFieldOfException" level="WARNING" enabled="false" /> + <inspection_tool class="ConditionSignal" level="WARNING" enabled="false" /> + <inspection_tool class="NestedTryStatement" level="WARNING" enabled="false" /> + <inspection_tool class="JDBCExecuteWithNonConstantString" level="WARNING" enabled="false" /> + <inspection_tool class="SystemSetSecurityManager" level="WARNING" enabled="false" /> + <inspection_tool class="ProtectedInnerClass" level="WARNING" enabled="false" /> + <inspection_tool class="BreakStatementWithLabelJS" level="WARNING" enabled="false" /> + <inspection_tool class="Finalize" level="WARNING" enabled="false" /> + <inspection_tool class="SignalWithoutCorrespondingAwait" level="WARNING" enabled="false" /> + <inspection_tool class="ControlFlowStatementWithoutBraces" level="WARNING" enabled="false" /> + <inspection_tool class="ThreadWithDefaultRunMethod" level="WARNING" enabled="false" /> + <inspection_tool class="ConfusingFloatingPointLiteralJS" level="WARNING" enabled="false" /> + <inspection_tool class="ClassEscapesItsScope" level="WARNING" enabled="false" /> + <inspection_tool class="InstantiationOfUtilityClass" level="WARNING" enabled="true" /> + <inspection_tool class="WhileLoopSpinsOnField" level="WARNING" enabled="false" /> + <inspection_tool class="IfStatementWithIdenticalBranches" level="WARNING" enabled="false" /> + <inspection_tool class="TestMethodIsPublicVoidNoArg" level="WARNING" enabled="false" /> + <inspection_tool class="ObjectToString" level="WARNING" enabled="true" /> + <inspection_tool class="LocalVariableHidingMemberVariable" level="WARNING" enabled="false"> + <option name="m_ignoreInvisibleFields" value="true" /> + <option name="m_ignoreStaticMethods" value="true" /> + </inspection_tool> + <inspection_tool class="MultipleReturnPointsPerMethod" level="WARNING" enabled="false"> + <option name="m_limit" value="1" /> + </inspection_tool> + <inspection_tool class="BreakStatementWithLabel" level="WARNING" enabled="false" /> + <inspection_tool class="UnnecessaryBlockStatement" level="WARNING" enabled="false" /> + <inspection_tool class="CloneInNonCloneableClass" level="WARNING" enabled="false" /> + <inspection_tool class="AbstractMethodOverridesConcreteMethod" level="WARNING" enabled="false" /> + <inspection_tool class="ReadObjectAndWriteObjectPrivate" level="WARNING" enabled="false" /> + <inspection_tool class="ThreadStopSuspendResume" level="WARNING" enabled="false" /> + <inspection_tool class="LengthOneStringInIndexOf" level="WARNING" enabled="false" /> + <inspection_tool class="VolatileArrayField" level="WARNING" enabled="false" /> + <inspection_tool class="LiteralAsArgToStringEquals" level="WARNING" enabled="false" /> + <inspection_tool class="NativeMethods" level="WARNING" enabled="false" /> + <inspection_tool class="UnnecessaryFinalOnLocalVariable" level="WARNING" enabled="false" /> + <inspection_tool class="AnonymousClassComplexity" level="WARNING" enabled="false"> + <option name="m_limit" value="3" /> + </inspection_tool> + <inspection_tool class="InnerClassMayBeStatic" level="WARNING" enabled="false" /> + <inspection_tool class="RedundantFieldInitialization" level="WARNING" enabled="false" /> + <inspection_tool class="StaticSuite" level="WARNING" enabled="false" /> + <inspection_tool class="StringBufferToStringInConcatenation" level="WARNING" enabled="false" /> + <inspection_tool class="ConstantStringIntern" level="WARNING" enabled="false" /> + <inspection_tool class="DuplicateBooleanBranch" level="WARNING" enabled="false" /> + <inspection_tool class="MethodOverridesStaticMethod" level="WARNING" enabled="false" /> + <inspection_tool class="DesignForExtension" level="WARNING" enabled="false" /> + <inspection_tool class="UtilityClassWithPublicConstructor" level="WARNING" enabled="false" /> + <inspection_tool class="ForLoopReplaceableByWhile" level="WARNING" enabled="false"> + <option name="m_ignoreLoopsWithoutConditions" value="false" /> + </inspection_tool> + <inspection_tool class="ThrowablePrintStackTrace" level="WARNING" enabled="false" /> + <inspection_tool class="CloneableClassInSecureContext" level="WARNING" enabled="false" /> + <inspection_tool class="AssignmentToForLoopParameter" level="WARNING" enabled="false"> + <option name="m_checkForeachParameters" value="false" /> + </inspection_tool> + <inspection_tool class="ObjectAllocationIgnoredJS" level="WARNING" enabled="false" /> + <inspection_tool class="ClassNamePrefixedWithPackageName" level="WARNING" enabled="false" /> + <inspection_tool class="SSBasedInspection" level="WARNING" enabled="false" /> + <inspection_tool class="CallToSimpleGetterInClass" level="WARNING" enabled="false"> + <option name="ignoreGetterCallsOnOtherObjects" value="false" /> + </inspection_tool> + <inspection_tool class="EmptyCatchBlockJS" level="WARNING" enabled="false" /> + <inspection_tool class="ClassInheritanceDepth" level="WARNING" enabled="false"> + <option name="m_limit" value="2" /> + </inspection_tool> + <inspection_tool class="ClassNameDiffersFromFileName" level="WARNING" enabled="false" /> + <inspection_tool class="LoadLibraryWithNonConstantString" level="WARNING" enabled="false" /> + <inspection_tool class="TextLabelInSwitchStatement" level="WARNING" enabled="true" /> + <inspection_tool class="SuspiciousSystemArraycopy" level="WARNING" enabled="true" /> + <inspection_tool class="SocketResource" level="WARNING" enabled="false" /> + <inspection_tool class="LocalCanBeFinal" level="WARNING" enabled="false"> + <option name="REPORT_VARIABLES" value="true" /> + <option name="REPORT_PARAMETERS" value="true" /> + </inspection_tool> + <inspection_tool class="InstanceofCatchParameter" level="WARNING" enabled="false" /> + <inspection_tool class="ImplicitNumericConversion" level="WARNING" enabled="false"> + <option name="m_ignoreWideningConversions" value="false" /> + </inspection_tool> + <inspection_tool class="UnnecessaryInterfaceModifier" level="WARNING" enabled="false" /> + <inspection_tool class="ConfusingPlusesOrMinusesJS" level="WARNING" enabled="false" /> + <inspection_tool class="MisorderedAssertEqualsParameters" level="WARNING" enabled="false" /> + <inspection_tool class="UnnecessaryConstructor" level="WARNING" enabled="false" /> + <inspection_tool class="MethodNameSameAsParentName" level="WARNING" enabled="false" /> + <inspection_tool class="JavaLangReflect" level="WARNING" enabled="false" /> + <inspection_tool class="NestedAssignment" level="WARNING" enabled="false" /> + <inspection_tool class="ThisEscapedInConstructor" level="WARNING" enabled="false" /> + <inspection_tool class="WaitNotInSynchronizedContext" level="WARNING" enabled="false" /> + <inspection_tool class="UseOfProcessBuilder" level="WARNING" enabled="false" /> + <inspection_tool class="ImplicitCallToSuper" level="WARNING" enabled="false"> + <option name="m_ignoreForObjectSubclasses" value="false" /> + </inspection_tool> + <inspection_tool class="CompareToUsesNonFinalVariable" level="WARNING" enabled="true" /> + <inspection_tool class="NonSerializableFieldInSerializableClass" level="WARNING" enabled="false"> + <option name="ignoreSerializableDueToInheritance" value="true" /> + </inspection_tool> + <inspection_tool class="UnqualifiedStaticUsage" level="WARNING" enabled="false"> + <option name="m_ignoreStaticFieldAccesses" value="false" /> + <option name="m_ignoreStaticMethodCalls" value="false" /> + <option name="m_ignoreStaticAccessFromStaticContext" value="false" /> + </inspection_tool> + <inspection_tool class="CallerJS" level="WARNING" enabled="false" /> + <inspection_tool class="SimplifiableJUnitAssertion" level="WARNING" enabled="false" /> + <inspection_tool class="ObjectNotify" level="WARNING" enabled="false" /> + <inspection_tool class="CloneCallsCons... [truncated message content] |
From: <chr...@us...> - 2006-12-10 19:07:55
|
Revision: 1030 http://svn.sourceforge.net/gridarta/?rev=1030&view=rev Author: christianhujer Date: 2006-12-10 11:07:55 -0800 (Sun, 10 Dec 2006) Log Message: ----------- Hardened policy. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/gameobject/GameObject.java trunk/crossfire/src/cfeditor/map/DefaultMapModel.java trunk/crossfire/src/cfeditor/map/MapModel.java trunk/crossfire/src/cfeditor/menu/MenuHelper.java trunk/daimonin/src/daieditor/gameobject/GameObject.java trunk/daimonin/src/daieditor/map/DefaultMapModel.java trunk/daimonin/src/daieditor/map/MapModel.java trunk/gridarta.ipr Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-10 18:40:10 UTC (rev 1029) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-10 19:07:55 UTC (rev 1030) @@ -1692,6 +1692,7 @@ /** * Runs the garbage collection. */ + @SuppressWarnings({"InstanceMethodNamingConvention"}) public void gc() { System.gc(); refreshMenusAndToolbars(); Modified: trunk/crossfire/src/cfeditor/gameobject/GameObject.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2006-12-10 18:40:10 UTC (rev 1029) +++ trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2006-12-10 19:07:55 UTC (rev 1030) @@ -420,8 +420,8 @@ return archType; } - public void setArchTypNr(final int type) { - archType = type; + public void setArchTypNr(final int typNr) { + archType = typNr; } /* Set the default face. Number is index of face list */ Modified: trunk/crossfire/src/cfeditor/map/DefaultMapModel.java =================================================================== --- trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-12-10 18:40:10 UTC (rev 1029) +++ trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-12-10 19:07:55 UTC (rev 1030) @@ -256,7 +256,7 @@ } /** {@inheritDoc} */ - public boolean insertArchToMap(GameObject newArch, String archName, final GameObject next, final Point pos, final boolean join) { + public boolean insertArchToMap(GameObject newObject, String archName, final GameObject next, final Point pos, final boolean join) { // map coords must be valid if (!isPointValid(pos)) { return false; @@ -265,20 +265,20 @@ if (next == null || !next.isInContainer()) { // put arch on the map - if (newArch == null || newArch.isArchetype()) { + if (newObject == null || newObject.isArchetype()) { // just make sure we never insert an uninitialized default arch from the stack - if (newArch != null && newArch.isArchetype()) { - archName = newArch.getArchetypeName(); + if (newObject != null && newObject.isArchetype()) { + archName = newObject.getArchetypeName(); } // insert a new instance of the default arch (number 'archName') if (!addArchToMap(archName, pos, true, join, false)) { return false; } } else { - // insert the given 'newArch' (multis not allowed here yet - sorry) - if (!newArch.isMulti()) { - newArch = newArch.createClone(pos.x, pos.y); // create a clone - addGameObjectToMap(newArch, false); // insert it to the map + // insert the given 'newObject' (multis not allowed here yet - sorry) + if (!newObject.isMulti()) { + newObject = newObject.createClone(pos.x, pos.y); // create a clone + addGameObjectToMap(newObject, false); // insert it to the map } else { return false; // tried to insert multi (probably from pickmap) } @@ -298,16 +298,16 @@ } else { // insert the new arch into the inventory of a map arch final GameObject invnew; // new arch to be inserted - if (newArch == null || newArch.isArchetype()) { - if (newArch != null && newArch.isArchetype()) { - archName = newArch.getArchetypeName(); + if (newObject == null || newObject.isArchetype()) { + if (newObject != null && newObject.isArchetype()) { + archName = newObject.getArchetypeName(); } // create a new copy of a default arch invnew = getArchetype(archName).createArch(); } else { // create clone from a pickmap - if (!newArch.isMulti()) { - invnew = newArch.createClone(pos.x, pos.y); + if (!newObject.isMulti()) { + invnew = newObject.createClone(pos.x, pos.y); } else { return false; } Modified: trunk/crossfire/src/cfeditor/map/MapModel.java =================================================================== --- trunk/crossfire/src/cfeditor/map/MapModel.java 2006-12-10 18:40:10 UTC (rev 1029) +++ trunk/crossfire/src/cfeditor/map/MapModel.java 2006-12-10 19:07:55 UTC (rev 1030) @@ -54,14 +54,14 @@ /** * Insert a new arch to the map at a specified position. This function * allows either to choose from the default arches (->archName) or to insert - * a copy from an existing arch (->newarch). It also works for + * a copy from an existing arch (->newObject). It also works for * container-inventory. - * @param newarch A clone copy of this GameObject gets inserted to the map. + * @param newObject A clone copy of this GameObject gets inserted to the map. * It can be an arch directly from a pickmap or even a - * default arch. if ('newarch'==null) the default arch + * default arch. if ('newObject'==null) the default arch * 'archName' gets inserted * @param archName Name of a default arch to get inserted. This value gets - * used ONLY when 'newarch' is null + * used ONLY when 'newObject' is null * @param next the new arch gets inserted before 'next' if * ('next'==null) the arch gets inserted at bottom * -> 'next' must be an arch from the map! (or null) @@ -69,7 +69,7 @@ * @param join if set to JOIN_ENABLE auto-joining is supported * @return true if insertion was successful */ - boolean insertArchToMap(GameObject newarch, String archName, GameObject next, Point pos, boolean join); + boolean insertArchToMap(GameObject newObject, String archName, GameObject next, Point pos, boolean join); /** * Delete an existing arch from the map. (If the specified arch doesn't Modified: trunk/crossfire/src/cfeditor/menu/MenuHelper.java =================================================================== --- trunk/crossfire/src/cfeditor/menu/MenuHelper.java 2006-12-10 18:40:10 UTC (rev 1029) +++ trunk/crossfire/src/cfeditor/menu/MenuHelper.java 2006-12-10 19:07:55 UTC (rev 1030) @@ -22,11 +22,11 @@ * @return the newly created JMenuBar */ public static JMenuBar getLocationBar(final MenuLocation location) { - final JMenuBar bar = new JMenuBar(); + final JMenuBar menuBar = new JMenuBar(); final Set s = location.getMenuEntries(); for (final Object value : s) { - bar.add(((MenuEntry) value).getMenuBarComponent()); + menuBar.add(((MenuEntry) value).getMenuBarComponent()); } - return bar; + return menuBar; } } Modified: trunk/daimonin/src/daieditor/gameobject/GameObject.java =================================================================== --- trunk/daimonin/src/daieditor/gameobject/GameObject.java 2006-12-10 18:40:10 UTC (rev 1029) +++ trunk/daimonin/src/daieditor/gameobject/GameObject.java 2006-12-10 19:07:55 UTC (rev 1030) @@ -373,8 +373,8 @@ return null; } - public void setArchTypNr(final int type) { - archType = type; + public void setArchTypNr(final int typNr) { + archType = typNr; } /** {@inheritDoc} */ Modified: trunk/daimonin/src/daieditor/map/DefaultMapModel.java =================================================================== --- trunk/daimonin/src/daieditor/map/DefaultMapModel.java 2006-12-10 18:40:10 UTC (rev 1029) +++ trunk/daimonin/src/daieditor/map/DefaultMapModel.java 2006-12-10 19:07:55 UTC (rev 1030) @@ -32,7 +32,6 @@ import java.awt.Point; import java.awt.Toolkit; import java.util.List; -import net.sf.gridarta.gameobject.Archetype; import net.sf.gridarta.map.AbstractMapModel; import net.sf.gridarta.map.MapSquare; import net.sf.japi.swing.ActionFactory; @@ -171,7 +170,7 @@ * {@inheritDoc} * @xxx I'm too complex */ - public boolean insertArchToMap(GameObject newArch, String archName, final GameObject next, final Point pos) { + public boolean insertArchToMap(GameObject newObject, String archName, final GameObject next, final Point pos) { // map coords must be valid if (!isPointValid(pos)) { return false; @@ -180,20 +179,20 @@ if (next == null || !next.isInContainer()) { // put arch on the map - if (newArch == null || newArch.isArchetype()) { + if (newObject == null || newObject.isArchetype()) { // just make sure we never insert an uninitialized default arch from the stack - if (newArch != null && newArch.isArchetype()) { - archName = newArch.getArchetypeName(); + if (newObject != null && newObject.isArchetype()) { + archName = newObject.getArchetypeName(); } // insert a new instance of the default arch (number 'archName') if (!addArchToMap(archName, pos, true, false)) { return false; } } else { - // insert the given 'newArch' (multis not allowed here yet - sorry) - if (!newArch.isMulti()) { - newArch = newArch.createClone(pos.x, pos.y); // create a clone - addGameObjectToMap(newArch, false); // insert it to the map + // insert the given 'newObject' (multis not allowed here yet - sorry) + if (!newObject.isMulti()) { + newObject = newObject.createClone(pos.x, pos.y); // create a clone + addGameObjectToMap(newObject, false); // insert it to the map } else { return false; // tried to insert multi (probably from pickmap) } @@ -213,16 +212,16 @@ } else { // insert the new arch into the inventory of a map arch final GameObject invnew; // new arch to be inserted - if (newArch == null || newArch.isArchetype()) { - if (newArch != null && newArch.isArchetype()) { - archName = newArch.getArchetypeName(); + if (newObject == null || newObject.isArchetype()) { + if (newObject != null && newObject.isArchetype()) { + archName = newObject.getArchetypeName(); } // create a new copy of a default arch invnew = getArchetype(archName).createArch(); } else { // create clone from a pickmap - if (!newArch.isMulti()) { - invnew = newArch.createClone(pos.x, pos.y); + if (!newObject.isMulti()) { + invnew = newObject.createClone(pos.x, pos.y); } else { return false; } Modified: trunk/daimonin/src/daieditor/map/MapModel.java =================================================================== --- trunk/daimonin/src/daieditor/map/MapModel.java 2006-12-10 18:40:10 UTC (rev 1029) +++ trunk/daimonin/src/daieditor/map/MapModel.java 2006-12-10 19:07:55 UTC (rev 1030) @@ -49,21 +49,21 @@ /** * Insert a new arch to the map at a specified position. This function * allows either to choose from the default arches (->archName) or to insert - * a copy from an existing arch (->newarch). It also works for + * a copy from an existing arch (->newObject). It also works for * container-inventory. - * @param newarch A clone copy of this GameObject gets inserted to the map. + * @param newObject A clone copy of this GameObject gets inserted to the map. * It can be an arch directly from a pickmap or even a - * default arch. if ('newarch'==null) the default arch + * default arch. if ('newObject'==null) the default arch * 'archName' gets inserted * @param archName Name of a default arch to get inserted. This value gets - * used ONLY when 'newarch' is null + * used ONLY when 'newObject' is null * @param next the new arch gets inserted before 'next' if * ('next'==null) the arch gets inserted at bottom * -> 'next' must be an arch from the map! (or null) * @param pos map position to insert the new arch * @return true if insertion was successful */ - boolean insertArchToMap(GameObject newarch, String archName, GameObject next, Point pos); + boolean insertArchToMap(GameObject newObject, String archName, GameObject next, Point pos); /** * Get the first exit on the MapSquare described by <var>hspot</var>. Modified: trunk/gridarta.ipr =================================================================== --- trunk/gridarta.ipr 2006-12-10 18:40:10 UTC (rev 1029) +++ trunk/gridarta.ipr 2006-12-10 19:07:55 UTC (rev 1030) @@ -891,6 +891,30 @@ <option name="nameCheckString" value="is,can,has,should,could,will,shall,check,contains,equals,startsWith,endsWith" /> </inspection_tool> <inspection_tool class="RedundantSuppression" level="ERROR" enabled="true" /> + <inspection_tool class="UpperCaseFieldNameNotConstant" level="ERROR" enabled="true" /> + <inspection_tool class="NonExceptionNameEndsWithException" level="ERROR" enabled="true" /> + <inspection_tool class="ParameterNameDiffersFromOverriddenParameter" level="ERROR" enabled="true"> + <option name="m_ignoreSingleCharacterNames" value="false" /> + <option name="m_ignoreOverridesOfLibraryMethods" value="false" /> + </inspection_tool> + <inspection_tool class="QuestionableName" level="ERROR" enabled="true"> + <option name="nameCheckString" value="foo,bar,baz" /> + </inspection_tool> + <inspection_tool class="StaticMethodNamingConvention" level="ERROR" enabled="true"> + <option name="m_regex" value="[a-z][A-Za-z\d]*" /> + <option name="m_minLength" value="3" /> + <option name="m_maxLength" value="32" /> + </inspection_tool> + <inspection_tool class="StaticVariableNamingConvention" level="ERROR" enabled="true"> + <option name="m_regex" value="[a-z][A-Za-z\d]*" /> + <option name="m_minLength" value="5" /> + <option name="m_maxLength" value="32" /> + </inspection_tool> + <inspection_tool class="TypeParameterNamingConvention" level="ERROR" enabled="true"> + <option name="m_regex" value="[A-Z\d]" /> + <option name="m_minLength" value="1" /> + <option name="m_maxLength" value="1" /> + </inspection_tool> </profile> <profile version="1.0" is_locked="false"> <option name="myName" value="Project Default" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |