Changeset 1884 in josm


Ignore:
Timestamp:
2009-08-02T19:13:42+02:00 (15 years ago)
Author:
jttt
Message:

Fix ArrayIndexOutOfBoundsException 0:-2 in relation editor when Shift-Tab is pressed in table without selected cell

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/.settings/org.eclipse.jdt.core.prefs

    r1650 r1884  
    1 #Sat Jun 06 11:00:10 CEST 2009
     1#Thu Jul 09 20:42:21 CEST 2009
    22eclipse.preferences.version=1
     3org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
     4org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
     5org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
     6org.eclipse.jdt.core.compiler.compliance=1.5
     7org.eclipse.jdt.core.compiler.debug.lineNumber=generate
     8org.eclipse.jdt.core.compiler.debug.localVariable=generate
     9org.eclipse.jdt.core.compiler.debug.sourceFile=generate
    310org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
     11org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
    412org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
    513org.eclipse.jdt.core.compiler.problem.deprecation=warning
     
    816org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
    917org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
     18org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
    1019org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
    1120org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
     
    3241org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
    3342org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
    34 org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
     43org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
     44org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
    3545org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
    3646org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
     
    4151org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
    4252org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
    43 org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
     53org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
    4454org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
    4555org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
    4656org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
     57org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
     58org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
    4759org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
    4860org.eclipse.jdt.core.compiler.problem.unusedImport=warning
     
    5466org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
    5567org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
     68org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
    5669org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
     70org.eclipse.jdt.core.compiler.source=1.5
    5771org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
    5872org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
     
    101115org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
    102116org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
    103 org.eclipse.jdt.core.formatter.comment.format_block_comments=true
     117org.eclipse.jdt.core.formatter.comment.format_block_comments=false
    104118org.eclipse.jdt.core.formatter.comment.format_comments=true
    105119org.eclipse.jdt.core.formatter.comment.format_header=false
    106120org.eclipse.jdt.core.formatter.comment.format_html=false
    107 org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
    108 org.eclipse.jdt.core.formatter.comment.format_line_comments=true
     121org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
     122org.eclipse.jdt.core.formatter.comment.format_line_comments=false
    109123org.eclipse.jdt.core.formatter.comment.format_source_code=false
    110124org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTable.java

    r1868 r1884  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.gui.dialogs.relation;
     3
     4import static org.openstreetmap.josm.tools.I18n.tr;
    35
    46import java.awt.event.ActionEvent;
     
    2527import org.openstreetmap.josm.gui.layer.Layer.LayerChangeListener;
    2628
    27 import static org.openstreetmap.josm.tools.I18n.tr;
    28 
    2929public class MemberTable extends JTable implements IMemberModelListener {
    3030
     
    3939    /**
    4040     * constructor
    41      * 
     41     *
    4242     * @param model
    4343     * @param columnModel
     
    7575     * adjusts the width of the columns for the tag name and the tag value to the width of the
    7676     * scroll panes viewport.
    77      * 
     77     *
    7878     * Note: {@see #getPreferredScrollableViewportSize()} did not work as expected
    79      * 
     79     *
    8080     * @param scrollPaneWidth the width of the scroll panes viewport
    8181     */
     
    104104     * <li>it jumps over cells in the first column</li> <li>it automatically add a new empty row
    105105     * when the user leaves the last cell in the table</li> <ul>
    106      * 
    107      * 
     106     *
     107     *
    108108     */
    109109    class SelectNextColumnCellAction extends AbstractAction {
     
    132132     * Action to be run when the user navigates to the previous cell in the table, for instance by
    133133     * pressing Shift-TAB
    134      * 
     134     *
    135135     */
    136136    class SelectPreviousColumnCellAction extends AbstractAction {
     
    143143            }
    144144
    145             if (col == 0 && row == 0) {
     145            if (col <= 0 && row <= 0) {
    146146                // change nothing
    147147            } else if (row > 0) {
     
    166166    /**
    167167     * Replies the popup menu for this table
    168      * 
     168     *
    169169     * @return the popup menu
    170170     */
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/TagTable.java

    r1781 r1884  
    3535/**
    3636 * This is the tabular editor component for OSM tags.
    37  * 
     37 *
    3838 */
    3939@SuppressWarnings("serial")
     
    4848     * The table has two columns. The first column is used for editing rendering and
    4949     * editing tag keys, the second for rendering and editing tag values.
    50      * 
     50     *
    5151     */
    5252    static class TagTableColumnModel extends DefaultTableColumnModel {
     
    8383     *   last cell in the table</li>
    8484     * <ul>
    85      * 
     85     *
    8686     * @author gubaer
    8787     *
     
    132132
    133133
    134             if (col == 0 && row == 0) {
     134            if (col <= 0 && row <= 0) {
    135135                // change nothing
    136136            } else if (col == 1) {
     
    147147     * Action to be run when the user invokes a delete action on the table, for
    148148     * instance by pressing DEL.
    149      * 
     149     *
    150150     * Depending on the shape on the current selection the action deletes individual
    151151     * values or entire tags from the model.
    152      * 
     152     *
    153153     * If the current selection consists of cells in the second column only, the keys of
    154154     * the selected tags are set to the empty string.
    155      * 
     155     *
    156156     * If the current selection consists of cell in the third column only, the values of the
    157157     * selected tags are set to the empty string.
    158      * 
     158     *
    159159     *  If the current selection consists of cells in the second and the third column,
    160160     *  the selected tags are removed from the model.
    161      * 
     161     *
    162162     *  This action listens to the table selection. It becomes enabled when the selection
    163163     *  is non-empty, otherwise it is disabled.
    164      * 
     164     *
    165165     *
    166166     */
     
    248248    /**
    249249     * Action to be run when the user adds a new tag.
    250      * 
     250     *
    251251     *
    252252     */
     
    274274
    275275    /**
    276      * 
     276     *
    277277     * @return the delete action used by this table
    278278     */
     
    326326    /**
    327327     * constructor
    328      * 
     328     *
    329329     * @param model
    330330     * @param columnModel
     
    340340     * adjusts the width of the columns for the tag name and the tag value
    341341     * to the width of the scroll panes viewport.
    342      * 
     342     *
    343343     * Note: {@see #getPreferredScrollableViewportSize()} did not work as expected
    344      * 
     344     *
    345345     * @param scrollPaneWidth the width of the scroll panes viewport
    346346     */
Note: See TracChangeset for help on using the changeset viewer.